4 # --no-clean: don't make clean first, just carry on from
5 # a previous interrupted validation run
6 # --testsuite-only: don't build the compiler, just run
8 # --hpc: build stage2 with -fhpc, and see how much of the
9 # compiler the test suite covers.
10 # 2008-07-01: 63% slower than the default.
11 # HTML generated here: testsuite/hpc_output/hpc_index.html
12 # --fast: Default. Opposite to --slow.
13 # --slow: Build stage2 with -DDEBUG.
14 # 2008-07-01: 14% slower than the default.
42 echo "Bad argument: $1" >&2
48 if [ "$CPUS" = "" ]; then
51 threads=$(($CPUS + 1)) # `expr $CPUS + 1`
54 if [ $testsuite_only -eq 0 ]; then
56 if [ $no_clean -eq 0 ]; then
57 if [ -f mk/config.mk ]; then
62 if [ "$OSTYPE" = "cygwin" ]
64 INSTDIR=`cygpath -m "$INSTDIR"`
67 cygwin|msys) config_args=--build=i386-unknown-mingw32
68 if [ -f c:/mingw/bin/gcc.exe ]
70 config_args="$config_args --with-gcc=c:/mingw/bin/gcc"
72 if [ -f c:/mingw/bin/ld.exe ]
74 config_args="$config_args --with-ld=c:/mingw/bin/ld"
80 ./configure --prefix="$INSTDIR" $config_args
83 thisdir=`utils/ghc-pwd/ghc-pwd`
85 echo "Validating=YES" > mk/are-validating.mk
87 make -j$threads ValidateHpc=$hpc ValidateSlow=$slow
92 # XXX With threads we'd need to give a different tix file to each thread
93 # and then sum them up at the end
95 HPCTIXFILE=$thisdir/testsuite/hpc_output/ghc.tix
100 make -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 THREADS=$threads 2>&1 | tee testlog
104 utils/hpc/hpc markup --hpcdir=. --srcdir=compiler --srcdir=testsuite/hpc_output --destdir=testsuite/hpc_output testsuite/hpc_output/ghc.tix
107 echo "-------------------------------------------------------------------"
109 grep '\<0 caused framework failures' testlog >/dev/null 2>/dev/null &&
110 grep '\<0 unexpected passes' testlog >/dev/null 2>/dev/null &&
111 grep '\<0 unexpected failures' testlog >/dev/null 2>/dev/null ; then
112 if [ $testsuite_only -eq 0 ] && [ $no_clean -eq 0 ]
115 Congratulations! This tree has passed minimal testing.
117 NOTE: If you have made changes that may cause failures not tested for by
118 the minimal testing procedure, please do further testing as necessary.
120 When you are satisfied that you haven't broken anything, go ahead and
121 push/send your patches.
123 if grep -q "^[^#]" mk/validate.mk
127 WARNING: You seem to have things set in mk/validate.mk. Please check
128 that it is OK before pushing.
133 I didn't find any problems, but this wasn't a complete validate run,
136 NOTE: If you have made changes that may cause failures not tested for by
137 the minimal testing procedure, please do further testing as necessary.
142 Oops! Looks like you have some unexpected test results or framework failures.
143 Please fix them before pushing/sending patches.
146 echo "-------------------------------------------------------------------"