summaryrefslogtreecommitdiff
path: root/validate
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-06-16 19:45:57 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2016-06-18 12:51:59 +0200
commitd94c40561dde695e658169a3098642294f55c7e3 (patch)
tree94af58265a3f47bc6c949568661abe6f187b1aee /validate
parent6f6f515401a29d26eaa5daae308b8e700abd4c04 (diff)
downloadhaskell-d94c40561dde695e658169a3098642294f55c7e3.tar.gz
Testsuite: validate the tests/stage1 directory with the stage1 compiler
* See `Note [Why is there no stage1 setup function?]`. * Move T2632 to the tests/stage1 directory (#10382). Reviewed by: ezyang, nomeata, bgamari Differential Revision: https://phabricator.haskell.org/D2341 GHC Trac Issues: #12197
Diffstat (limited to 'validate')
-rwxr-xr-xvalidate31
1 files changed, 28 insertions, 3 deletions
diff --git a/validate b/validate
index 3efaf3aeed..fc289e5d17 100755
--- a/validate
+++ b/validate
@@ -266,11 +266,31 @@ FAST)
esac
if [ $be_quiet -eq 1 ] && [ -z $VERBOSE ]; then
- TEST_VERBOSITY="VERBOSE=1 NO_PRINT_SUMMARY=YES"
+ TEST_VERBOSITY="VERBOSE=1"
fi
+rm testsuite_summary.txt testsuite_summary_stage1.txt
+
# Use LOCAL=0, see Note [Running tests in /tmp].
-$make $MAKE_TEST_TARGET stage=2 $BINDIST LOCAL=0 $TEST_VERBOSITY THREADS=$threads 2>&1 | tee testlog
+$make -C testsuite/tests $BINDIST \
+ $MAKE_TEST_TARGET stage=2 LOCAL=0 $TEST_VERBOSITY THREADS=$threads \
+ NO_PRINT_SUMMARY=YES SUMMARY_FILE=../../testsuite_summary.txt \
+ 2>&1 | tee testlog
+
+# Run a few tests using the stage1 compiler.
+# See Note [Why is there no stage1 setup function?].
+# Don't use BINDIST=YES, as stage1 is not available in a bindist.
+$make -C testsuite/tests/stage1 \
+ $MAKE_TEST_TARGET stage=1 LOCAL=0 $TEST_VERBOSITY THREADS=$threads \
+ NO_PRINT_SUMMARY=YES SUMMARY_FILE=../../../testsuite_summary_stage1.txt \
+ 2>&1 | tee testlog-stage1
+
+echo
+echo '==== STAGE 1 TESTS ==== '
+cat testsuite_summary_stage1.txt
+
+echo '==== STAGE 2 TESTS ==== '
+cat testsuite_summary.txt
check_packages post-testsuite
@@ -284,7 +304,12 @@ if
grep '\<0 unexpected passes' testsuite_summary.txt >/dev/null 2>/dev/null &&
grep '\<0 unexpected failures' testsuite_summary.txt >/dev/null 2>/dev/null &&
grep '\<0 unexpected stat failures' testsuite_summary.txt >/dev/null 2>/dev/null &&
- ! grep 'Some files are written by multiple tests' testsuite_summary.txt >/dev/null 2>/dev/null ; then
+
+ grep '\<0 caused framework failures' testsuite_summary_stage1.txt >/dev/null 2>/dev/null &&
+ grep '\<0 unexpected passes' testsuite_summary_stage1.txt >/dev/null 2>/dev/null &&
+ grep '\<0 unexpected failures' testsuite_summary_stage1.txt >/dev/null 2>/dev/null &&
+ grep '\<0 unexpected stat failures' testsuite_summary_stage1.txt >/dev/null 2>/dev/null ; then
+
if [ $testsuite_only -eq 0 ] && [ $no_clean -eq 0 ]
then
cat <<EOF