components/stdcxx/Solaris/make_regress_tests.sh
changeset 402 94ae4d75524c
equal deleted inserted replaced
401:bf52ef48020c 402:94ae4d75524c
       
     1 #!/bin/bash
       
     2 #
       
     3 #
       
     4 # CDDL HEADER START
       
     5 #
       
     6 # The contents of this file are subject to the terms of the
       
     7 # Common Development and Distribution License (the "License").
       
     8 # You may not use this file except in compliance with the License.
       
     9 #
       
    10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
    11 # or http://www.opensolaris.org/os/licensing.
       
    12 # See the License for the specific language governing permissions
       
    13 # and limitations under the License.
       
    14 #
       
    15 # When distributing Covered Code, include this CDDL HEADER in each
       
    16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    17 # If applicable, add the following below this CDDL HEADER, with the
       
    18 # fields enclosed by brackets "[]" replaced with your own identifying
       
    19 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    20 #
       
    21 # CDDL HEADER END
       
    22 #
       
    23 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 #
       
    26 
       
    27 unset LD_LIBRARY_PATH
       
    28 unset LD_LIBRARY_PATH_32
       
    29 unset LD_LIBRARY_PATH_64
       
    30 unset LD_PRELOAD
       
    31 unset LD_PRELOAD_32
       
    32 unset LD_PRELOAD_64
       
    33 
       
    34 export TOPDIR="../../"
       
    35 export DO_CLEANUP="no"
       
    36 export DO_MAKE="no"
       
    37 
       
    38 UNKNOWN_ARG=no
       
    39 PRINT_HELP=no
       
    40 
       
    41 check_args() {
       
    42 	while [ "$#" -gt 0 ] ; do
       
    43 		UNKNOWN_ARG=no
       
    44 		case "$1" in
       
    45 		--cleanup)
       
    46 			DO_CLEANUP=yes
       
    47 		;;
       
    48 		--make)
       
    49 			DO_MAKE=yes
       
    50 		;;
       
    51 		*)
       
    52 			UNKNOWN_ARG=yes
       
    53 		;;
       
    54 		esac
       
    55 
       
    56 		if [ "${UNKNOWN_ARG}" = "yes" ] ; then
       
    57 			echo "$1: Invalid argument"
       
    58 			PRINT_HELP=yes
       
    59 			shift
       
    60 			continue
       
    61 		fi
       
    62 
       
    63 		shift
       
    64 	done
       
    65 
       
    66 	export DO_CLEANUP DO_MAKE TOPDIR
       
    67 
       
    68 	if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
       
    69 		echo "Usage: `basename $0` [ --cleanup ] [ --make ]"
       
    70 		exit 1
       
    71 	fi
       
    72 }
       
    73 
       
    74 run_make() {
       
    75 	if [ "${DO_MAKE}" = "no" ] ; then
       
    76 		return
       
    77 	fi
       
    78 
       
    79 	for file in \
       
    80 		"18.limits.stdcxx-436" \
       
    81 		"18.limits.traps.stdcxx-624" \
       
    82 		"20.specialized.stdcxx-390" \
       
    83 		"21.string.append.stdcxx-438" \
       
    84 		"21.string.io.stdcxx-206" \
       
    85 		"21.string.io.stdcxx-250" \
       
    86 		"21.string.replace.stdcxx-175" \
       
    87 		"21.string.stdcxx-162" \
       
    88 		"21.string.stdcxx-231" \
       
    89 		"21.string.stdcxx-466" \
       
    90 		"22.locale.codecvt.stdcxx-435" \
       
    91 		"22.locale.cons.stdcxx-485" \
       
    92 		"22.locale.messages.stdcxx-542" \
       
    93 		"22.locale.money.get.stdcxx-62" \
       
    94 		"22.locale.num.put.stdcxx-2" \
       
    95 		"22.locale.stdcxx-554" \
       
    96 		"23.associative.stdcxx-16" \
       
    97 		"23.bitset.cons.stdcxx-297" \
       
    98 		"23.deque.special.stdcxx-127" \
       
    99 		"23.list.cons.stdcxx-268" \
       
   100 		"23.list.insert.stdcxx-331" \
       
   101 		"23.list.special.stdcxx-334" \
       
   102 		"23.set.stdcxx-216" \
       
   103 		"23.vector.bool.stdcxx-235" \
       
   104 		"23.vector.stdcxx-611" \
       
   105 		"24.istream.iterator.cons.stdcxx-645" \
       
   106 		"24.istream.iterator.ops.stdcxx-321" \
       
   107 		"24.operations.stdcxx-234" \
       
   108 		"26.valarray.binary.stdcxx-237" \
       
   109 		"26.valarray.members.stdcxx-313" \
       
   110 		"26.valarray.members.stdcxx-318" \
       
   111 		"26.valarray.sub.stdcxx-224" \
       
   112 		"26.valarray.sub.stdcxx-309" \
       
   113 		"26.valarray.sub.stdcxx-448" \
       
   114 		"26.valarray.transcend.stdcxx-315" \
       
   115 		"26.valarray.unary.stdcxx-314" \
       
   116 		"27.basic.ios.copyfmt.stdcxx-766" \
       
   117 		"27.basic.ios.tie.stdcxx-804" \
       
   118 		"27.cstdio.stdcxx-195" \
       
   119 		"27.filebuf.members.stdcxx-308" \
       
   120 		"27.filebuf.virtuals.stdcxx-522" \
       
   121 		"27.ostream.unformatted.stdcxx-626" \
       
   122 		"27.streambuf.imbue.stdcxx-307" \
       
   123 		"27.stringbuf.members.stdcxx-427" \
       
   124 		"27.stringbuf.overflow.stdcxx-795" \
       
   125 		"27.stringbuf.str.stdcxx-514" \
       
   126 		"27.stringbuf.xsputn.stdcxx-515" \
       
   127 		"27.stringbuf.xsputn.stdcxx-576"
       
   128 	do
       
   129 		if [ -f "${file}.o" ] ; then
       
   130 			rm -f ${file}.o
       
   131 		fi
       
   132 		if [ -f "${file}" ] ; then
       
   133 			rm -f ${file}
       
   134 		fi
       
   135 
       
   136 		gmake ${file}
       
   137 	done
       
   138 }
       
   139 
       
   140 do_cleanup() {
       
   141 	if [ "${DO_CLEANUP}" = "no" ] ; then
       
   142 		return
       
   143 	fi
       
   144 
       
   145 	for file in \
       
   146 		"18.limits.stdcxx-436" \
       
   147 		"18.limits.traps.stdcxx-624" \
       
   148 		"20.specialized.stdcxx-390" \
       
   149 		"21.string.append.stdcxx-438" \
       
   150 		"21.string.io.stdcxx-206" \
       
   151 		"21.string.io.stdcxx-250" \
       
   152 		"21.string.replace.stdcxx-175" \
       
   153 		"21.string.stdcxx-162" \
       
   154 		"21.string.stdcxx-231" \
       
   155 		"21.string.stdcxx-466" \
       
   156 		"22.locale.codecvt.stdcxx-435" \
       
   157 		"22.locale.cons.stdcxx-485" \
       
   158 		"22.locale.messages.stdcxx-542" \
       
   159 		"22.locale.money.get.stdcxx-62" \
       
   160 		"22.locale.num.put.stdcxx-2" \
       
   161 		"22.locale.stdcxx-554" \
       
   162 		"23.associative.stdcxx-16" \
       
   163 		"23.bitset.cons.stdcxx-297" \
       
   164 		"23.deque.special.stdcxx-127" \
       
   165 		"23.list.cons.stdcxx-268" \
       
   166 		"23.list.insert.stdcxx-331" \
       
   167 		"23.list.special.stdcxx-334" \
       
   168 		"23.set.stdcxx-216" \
       
   169 		"23.vector.bool.stdcxx-235" \
       
   170 		"23.vector.stdcxx-611" \
       
   171 		"24.istream.iterator.cons.stdcxx-645" \
       
   172 		"24.istream.iterator.ops.stdcxx-321" \
       
   173 		"24.operations.stdcxx-234" \
       
   174 		"26.valarray.binary.stdcxx-237" \
       
   175 		"26.valarray.members.stdcxx-313" \
       
   176 		"26.valarray.members.stdcxx-318" \
       
   177 		"26.valarray.sub.stdcxx-224" \
       
   178 		"26.valarray.sub.stdcxx-309" \
       
   179 		"26.valarray.sub.stdcxx-448" \
       
   180 		"26.valarray.transcend.stdcxx-315" \
       
   181 		"26.valarray.unary.stdcxx-314" \
       
   182 		"27.basic.ios.copyfmt.stdcxx-766" \
       
   183 		"27.basic.ios.tie.stdcxx-804" \
       
   184 		"27.cstdio.stdcxx-195" \
       
   185 		"27.filebuf.members.stdcxx-308" \
       
   186 		"27.filebuf.virtuals.stdcxx-522" \
       
   187 		"27.ostream.unformatted.stdcxx-626" \
       
   188 		"27.streambuf.imbue.stdcxx-307" \
       
   189 		"27.stringbuf.members.stdcxx-427" \
       
   190 		"27.stringbuf.overflow.stdcxx-795" \
       
   191 		"27.stringbuf.str.stdcxx-514" \
       
   192 		"27.stringbuf.xsputn.stdcxx-515" \
       
   193 		"27.stringbuf.xsputn.stdcxx-576"
       
   194 	do
       
   195 		rm -f "${file}"
       
   196 	done
       
   197 }
       
   198 
       
   199 check_args $@
       
   200 run_make
       
   201 do_cleanup
       
   202 
       
   203 exit 0
       
   204