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 [ "$THREADS" = "" ]; then
49 if [ "$CPUS" = "" ]; then
52 threads=$(($CPUS + 1)) # `expr $CPUS + 1`
58 if type gmake > /dev/null 2> /dev/null
65 if [ $testsuite_only -eq 0 ]; then
67 if [ $no_clean -eq 0 ]; then
68 $make maintainer-clean NO_CLEAN_GMP=YES
71 if [ "$OSTYPE" = "cygwin" ]
73 INSTDIR=`cygpath -m "$INSTDIR"`
76 /usr/bin/perl -w boot --validate --required-tag=dph
77 ./configure --prefix="$INSTDIR" $config_args
80 thisdir=`utils/ghc-pwd/dist-boot/ghc-pwd`
82 echo "Validating=YES" > mk/are-validating.mk
84 $make -j$threads ValidateHpc=$hpc ValidateSlow=$slow
86 $make binary-dist-prep
87 $make test_bindist TEST_PREP=YES
90 # Install the mtl package into the bindist, because it is used by some
91 # tests. It isn't essential that we do this (the failing tests will
92 # be treated as expected failures), but we get a bit more test
93 # coverage, and also verify that we can install a package into the
96 bindistdir="bindisttest/install dir"
98 "$thisdir/$bindistdir/bin/runhaskell" Setup.hs configure --with-ghc="$thisdir/$bindistdir/bin/ghc" --global --builddir=dist-bindist --prefix="$thisdir/$bindistdir"
99 "$thisdir/$bindistdir/bin/runhaskell" Setup.hs build --builddir=dist-bindist
100 "$thisdir/$bindistdir/bin/runhaskell" Setup.hs install --builddir=dist-bindist
101 "$thisdir/$bindistdir/bin/runhaskell" Setup.hs clean --builddir=dist-bindist
108 # XXX With threads we'd need to give a different tix file to each thread
109 # and then sum them up at the end
111 HPCTIXFILE=$thisdir/testsuite/hpc_output/ghc.tix
118 MAKE_TEST_TARGET=fulltest
120 MAKE_TEST_TARGET=test
123 $make $MAKE_TEST_TARGET stage=2 BINDIST=YES THREADS=$threads 2>&1 | tee testlog
127 utils/hpc/hpc markup --hpcdir=. --srcdir=compiler --srcdir=testsuite/hpc_output --destdir=testsuite/hpc_output testsuite/hpc_output/ghc.tix
130 echo "-------------------------------------------------------------------"
132 grep '\<0 caused framework failures' testlog >/dev/null 2>/dev/null &&
133 grep '\<0 unexpected passes' testlog >/dev/null 2>/dev/null &&
134 grep '\<0 unexpected failures' testlog >/dev/null 2>/dev/null ; then
135 if [ $testsuite_only -eq 0 ] && [ $no_clean -eq 0 ]
138 Congratulations! This tree has passed minimal testing.
140 NOTE: If you have made changes that may cause failures not tested for by
141 the minimal testing procedure, please do further testing as necessary.
143 When you are satisfied that you haven't broken anything, go ahead and
144 push/send your patches.
146 if grep -q "^[^#]" mk/validate.mk
150 WARNING: You seem to have things set in mk/validate.mk. Please check
151 that it is OK before pushing.
155 -------------------------------------------------------------------
159 I didn't find any problems, but this wasn't a complete validate run,
162 NOTE: If you have made changes that may cause failures not tested for by
163 the minimal testing procedure, please do further testing as necessary.
164 -------------------------------------------------------------------
169 Oops! Looks like you have some unexpected test results or framework failures.
170 Please fix them before pushing/sending patches.
171 -------------------------------------------------------------------