[Git][cmucl/cmucl][rtoy-setexception-inexact] Add shell script to run the test suite.

Raymond Toy rtoy at common-lisp.net
Sat Dec 26 17:49:38 UTC 2015


Raymond Toy pushed to branch rtoy-setexception-inexact at cmucl / cmucl


Commits:
55b541e5 by Raymond Toy at 2015-12-26T09:49:25Z
Add shell script to run the test suite.

This makes it quite a bit easier to run the test suite instead of
trying to remember exactly how to invoke it from the command line.

- - - - -


1 changed file:

- + bin/run-tests.sh


Changes:

=====================================
bin/run-tests.sh
=====================================
--- /dev/null
+++ b/bin/run-tests.sh
@@ -0,0 +1,50 @@
+#! /bin/bash
+
+# Run the testsuite.
+#
+# By default, all the tests are run, but if additional args are given,
+# then just those tests are run.
+
+usage() {
+    echo "run-tests.sh [?] [-l lisp] [tests]"
+    echo "    -l lisp      Lisp to use for the tests; defaults to lisp"
+    echo "    -?           This help message"
+    echo ""
+    echo "Run the test suite"
+    echo ""
+    echo "Any remaining args are the names of the tests to run."
+    echo "These are basically the file names (without extension)"
+    echo "in the tests/ directory."
+    echo ""
+    echo "This script expects to be run from the top level of the"
+    echo "cmucl source tree.  That is, is should be invoked as"
+    echo "bin/run-tests.sh"
+    exit 0;
+}
+
+LISP=lisp
+while getopts "h?l:" arg
+do
+    case $arg in
+      l) LISP=$OPTARG ;;
+      \?) usage ;;
+    esac
+done
+
+# Shift out the options
+shift $[$OPTIND - 1]
+
+if [ $# -eq 0 ]; then
+    # No args so run all the tests
+    $LISP -noinit -load tests/run-tests.lisp -eval '(cmucl-test-runner:run-all-tests)'
+else
+    # Run selected files.  Convert each file name to uppercase and append "-TESTS"
+    result=""
+    for f in $*
+    do
+	new=`echo $f | tr '[a-z]' '[A-Z]'`
+        result="$result "\"$new-TESTS\"
+    done
+    $LISP -noinit -load tests/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))"
+fi
+



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/55b541e5fdac9794eae148597397bda915f96722
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20151226/70e3194e/attachment.html>


More information about the cmucl-cvs mailing list