| ... |
... |
@@ -9,6 +9,8 @@ usage() { |
|
9
|
9
|
echo "run-tests.sh [-?h] [-d test-dir] [-l lisp] [tests]"
|
|
10
|
10
|
echo " -d test-dir Directory containing the unit test files"
|
|
11
|
11
|
echo " -l lisp Lisp to use for the tests; defaults to lisp"
|
|
|
12
|
+ echo " -u Skip lisp-unit tests"
|
|
|
13
|
+ echo " -p Skip package-local-nicknames test"
|
|
12
|
14
|
echo " -? This help message"
|
|
13
|
15
|
echo " -h This help message"
|
|
14
|
16
|
echo ""
|
| ... |
... |
@@ -25,11 +27,13 @@ usage() { |
|
25
|
27
|
}
|
|
26
|
28
|
|
|
27
|
29
|
LISP=lisp
|
|
28
|
|
-while getopts "h?l:d:" arg
|
|
|
30
|
+while getopts "uph?l:d:" arg
|
|
29
|
31
|
do
|
|
30
|
32
|
case $arg in
|
|
31
|
33
|
l) LISP=$OPTARG ;;
|
|
32
|
34
|
d) TESTDIR=$OPTARG ;;
|
|
|
35
|
+ u) SKIP_UNIT=yes ;;
|
|
|
36
|
+ p) SKIP_PLN=yes ;;
|
|
33
|
37
|
h|\?) usage ;;
|
|
34
|
38
|
esac
|
|
35
|
39
|
done
|
| ... |
... |
@@ -69,39 +73,49 @@ fi |
|
69
|
73
|
# gcc since clang isn't always available.
|
|
70
|
74
|
(cd "$TESTDIR" || exit 1 ; gcc -m32 -O3 -c test-return.c)
|
|
71
|
75
|
|
|
72
|
|
-if [ $# -eq 0 ]; then
|
|
73
|
|
- # Test directory arg for run-all-tests if a non-default
|
|
74
|
|
- # No args so run all the tests
|
|
75
|
|
- $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(cmucl-test-runner:run-all-tests ${TESTDIRARG})"
|
|
76
|
|
-else
|
|
77
|
|
- # Run selected files. Convert each file name to uppercase and append "-TESTS"
|
|
78
|
|
- result=""
|
|
79
|
|
- for f in "$@"
|
|
80
|
|
- do
|
|
81
|
|
- new=$(echo "$f" | tr '[:lower:]' '[:upper:]')
|
|
82
|
|
- result="$result "\"$new-TESTS\"
|
|
83
|
|
- done
|
|
84
|
|
- $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))"
|
|
|
76
|
+if [ "$SKIP_UNIT" != "yes" ]; then
|
|
|
77
|
+ if [ $# -eq 0 ]; then
|
|
|
78
|
+ # Test directory arg for run-all-tests if a non-default
|
|
|
79
|
+ # No args so run all the tests
|
|
|
80
|
+ $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(cmucl-test-runner:run-all-tests ${TESTDIRARG})" ||
|
|
|
81
|
+ exit 1
|
|
|
82
|
+ else
|
|
|
83
|
+ # Run selected files. Convert each file name to uppercase and append "-TESTS"
|
|
|
84
|
+ result=""
|
|
|
85
|
+ for f in "$@"
|
|
|
86
|
+ do
|
|
|
87
|
+ new=$(echo "$f" | tr '[:lower:]' '[:upper:]')
|
|
|
88
|
+ result="$result "\"$new-TESTS\"
|
|
|
89
|
+ done
|
|
|
90
|
+ # Run unit tests. Exits with a non-zero code if there's a failure.
|
|
|
91
|
+
|
|
|
92
|
+ $LISP -nositeinit -noinit -load "$TESTDIR"/run-tests.lisp -eval "(progn (cmucl-test-runner:load-test-files) (cmucl-test-runner:run-test $result))" ||
|
|
|
93
|
+ exit 1
|
|
|
94
|
+ fi
|
|
85
|
95
|
fi
|
|
86
|
96
|
|
|
87
|
97
|
## Now run tests for trivial-package-local-nicknames
|
|
88
|
|
-REPO=trivial-package-local-nicknames
|
|
89
|
|
-BRANCH=cmucl-updates
|
|
|
98
|
+echo SKIP_PLN = $SKIP_PLN
|
|
90
|
99
|
|
|
91
|
|
-set -x
|
|
92
|
|
-if [ -d ../$REPO ]; then
|
|
93
|
|
- (cd ../$REPO || exit 1; git stash; git checkout $BRANCH; git pull --rebase)
|
|
94
|
|
-else
|
|
95
|
|
- (cd ..; git clone https://gitlab.common-lisp.net/cmucl/$REPO.git)
|
|
96
|
|
-fi
|
|
|
100
|
+if [ "$SKIP_PLN" != "yes" ]; then
|
|
|
101
|
+ REPO=trivial-package-local-nicknames
|
|
|
102
|
+ BRANCH=cmucl-updates
|
|
|
103
|
+
|
|
|
104
|
+ set -x
|
|
|
105
|
+ if [ -d ../$REPO ]; then
|
|
|
106
|
+ (cd ../$REPO || exit 1; git stash; git checkout $BRANCH; git pull --rebase)
|
|
|
107
|
+ else
|
|
|
108
|
+ (cd ..; git clone https://gitlab.common-lisp.net/cmucl/$REPO.git)
|
|
|
109
|
+ fi
|
|
97
|
110
|
|
|
98
|
|
-LISP=$PWD/$LISP
|
|
99
|
|
-cd ../$REPO || exit 1
|
|
100
|
|
-git checkout $BRANCH
|
|
|
111
|
+ LISP=$PWD/$LISP
|
|
|
112
|
+ cd ../$REPO || exit 1
|
|
|
113
|
+ git checkout $BRANCH
|
|
101
|
114
|
|
|
102
|
|
-# Run the tests. Exits with a non-zero code if there's a failure.
|
|
103
|
|
-$LISP -noinit -nositeinit -batch <<'EOF'
|
|
|
115
|
+ # Run the tests. Exits with a non-zero code if there's a failure.
|
|
|
116
|
+ $LISP -noinit -nositeinit -batch <<'EOF'
|
|
104
|
117
|
(require :asdf)
|
|
105
|
118
|
(push (default-directory) asdf:*central-registry*)
|
|
106
|
119
|
(asdf:test-system :trivial-package-local-nicknames)
|
|
107
|
120
|
EOF
|
|
|
121
|
+fi |