Fix installing the documentation in the bindists
[ghc.git] / validate
1 #!/bin/sh
2
3 set -e
4
5 if [ -f mk/config.mk ]; then
6    make distclean
7 fi
8
9 case $OSTYPE in
10   cygwin|msys) config_args=--build=i386-unknown-mingw32
11                if [ -f c:/mingw/bin/gcc.exe ]; then
12                    config_args="$config_args --with-gcc=c:/mingw/bin/gcc"
13                fi
14                ;;
15 esac
16
17 if [ "$CPUS" = "" ]; then
18     threads=2
19 else
20     threads=`expr $CPUS + 1`
21 fi
22
23 sh boot
24 ./configure $config_args
25
26 make Validating=YES -j$threads
27
28 # ToDo: use THREADS=$threads, see #1558
29 make Validating=YES -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 2>&1 | tee testlog
30
31 if
32     grep '\<0 caused framework failures' testlog >/dev/null 2>/dev/null &&
33     grep '\<0 unexpected passes' testlog >/dev/null 2>/dev/null &&
34     grep '\<0 unexpected failures' testlog >/dev/null 2>/dev/null ; then
35    echo "-------------------------------------------------------------------"
36    echo "Congratulations!  This tree has passed minimal testing."
37    echo
38    echo "NOTE: If you have made changes that may cause failures not tested"
39    echo "for by the minimal testing procedure, please do further testing"
40    echo "as necessary."
41    echo
42    echo "When you are satisfied that you haven't broken anything, go ahead"
43    echo "and push/send your patches".
44    echo "-------------------------------------------------------------------"
45 else
46    echo "-------------------------------------------------------------------"
47    echo "Oops!  Looks like you have some unexpected test results or"
48    echo "framework failures."
49    echo "Please fix them before pushing/sending patches."
50    echo "-------------------------------------------------------------------"
51 fi