Raymond Toy pushed to branch master at cmucl / cmucl
Commits: f9ccc188 by Raymond Toy at 2023-08-21T18:03:25+00:00 Fix #252: Add script to run ansi-tests
- - - - - eab9b876 by Raymond Toy at 2023-08-21T18:04:16+00:00 Merge branch 'issue-252-script-to-run-ansi-tests' into 'master'
Fix #252: Add script to run ansi-tests
Closes #252
See merge request cmucl/cmucl!165 - - - - -
3 changed files:
- .gitlab-ci.yml - + bin/run-ansi-tests.sh - bin/run-tests.sh → bin/run-unit-tests.sh
Changes:
===================================== .gitlab-ci.yml ===================================== @@ -62,7 +62,7 @@ linux:test: - job: linux:build artifacts: true script: - - bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log + - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
linux:ansi-test: stage: ansi-test @@ -75,14 +75,8 @@ linux:ansi-test: # Needs artifacts from build (dist/) - job: linux:build artifacts: true - before_script: - - git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git - - (cd ansi-test; git checkout cmucl-expected-failures) script: - - cd ansi-test - - make LISP="../dist/bin/lisp -batch -noinit -nositeinit" - # There should be no unexpected successes or failures; check these separately. - - grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out + - bin/run-ansi-tests.sh -l dist/bin/lisp
linux:benchmark: stage: benchmark @@ -149,7 +143,7 @@ osx:test: - job: osx:build artifacts: true script: - - bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log + - bin/run-unit-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
osx:ansi-test: stage: ansi-test @@ -162,14 +156,8 @@ osx:ansi-test: # Needs artifacts from build (dist/) - job: osx:build artifacts: true - before_script: - - /opt/local/bin/git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git - - (cd ansi-test; /opt/local/bin/git checkout cmucl-expected-failures) script: - - cd ansi-test - - make LISP="../dist/bin/lisp -batch -noinit -nositeinit" - # There should be no unexpected successes or failures; check these separately. - - grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out + - bin/run-ansi-tests.sh -l dist/bin/lisp
osx:benchmark: stage: benchmark
===================================== bin/run-ansi-tests.sh ===================================== @@ -0,0 +1,48 @@ +#! /bin/bash + +# Run the ansi-tests. +# +# We need to check ou ansi-tests if we haven't already. We expect +# this to be run from the root of the cmucl git tree. We will check +# it out one level up from where we are. + +usage() { + echo "run-ansi-tests.sh [?h] [-l lisp]" + echo " -l lisp Lisp to use for the tests; defaults to lisp" + echo " -h|? This help message" + echo "" + echo "Run the ansi-tests" + echo "" + echo "If ../ansi-test does not exist a clone is checked out there." + echo "Then the ansi-test is run in the clone using the given lisp." + exit 0; +} + +LISP=lisp +while getopts "h?l:" arg +do + case $arg in + l) LISP="$PWD/$OPTARG" ;; + ?) usage ;; + h) usage ;; + esac +done + +# Shift out the options +shift $[$OPTIND - 1] + +set -x +if [ -d ../ansi-test ]; then + # We already have clone; make sure it's clean by stashing any changes. + (cd ../ansi-test; git stash) +else + (cd ../; git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git) +fi + +cd ../ansi-test +git checkout cmucl-expected-failures + +make LISP="$LISP batch -noinit -nositeinit" +# There should be no unexpected successes or failures; check these separately +grep -a 'No unexpected successes' test.out && grep -a 'No unexpected failures' test.out +
===================================== bin/run-tests.sh → bin/run-unit-tests.sh =====================================
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5b3e11f9235825ec3687933...