-
-
Notifications
You must be signed in to change notification settings - Fork 691
Expand file tree
/
Copy pathrun-racket-tests.sh
More file actions
executable file
·90 lines (68 loc) · 1.88 KB
/
run-racket-tests.sh
File metadata and controls
executable file
·90 lines (68 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env bash
set -euo pipefail
HERE="$(dirname "$0")"
RACKET="racket"
RACO="raco"
echo Using `which "$RACKET"`
"$RACKET" -v
CPUS="$("$RACKET" -e '(processor-count)')"
echo Installing dt-test and racket-test using `which "$RACO"`
"$RACO" pkg install --auto --skip-installed db-test racket-test
do_test/notimeout() {
"$RACO" test -j "$CPUS" "$@"
}
do_test() {
do_test/notimeout --timeout 300 "$@"
}
# What Gets Tested
# ~~~~~~~~~~~~~~~~
# These tests run in GitHub Actions, where the environment isn't suited
# to run all the tests. This script tries to run most of the tests that
# can easily run in that environment. The rest of the tests are run by
# DrDr[1] whenever changes are made to the master branch.
#
# [1]: http://drdr.racket-lang.org/
# Core Tests.
# ~~~~~~~~~~~~~~~~
# The core test suite of Racket itself.
printf '\n\n\n\n%s\n\n' "== Testing core tests, 'tests/racket/test' =="
do_test/notimeout -l "tests/racket/test"
# Collection Tests
# ~~~~~~~~~~~~~~~~
# Tests where `raco test` can discover and run all the tests.
COLLECTIONS_TO_TEST=(
tests/file
tests/future
tests/generic
tests/json
tests/match
tests/net
tests/setup
tests/stxparse
tests/syntax
tests/units
tests/utils
tests/xml
)
for collection in "${COLLECTIONS_TO_TEST[@]}"; do
printf '\n\n\n\n%s\n\n' "== Testing collection '$collection' =="
do_test -c "$collection"
done
# Module Tests
# ~~~~~~~~~~~~
# Tests where a central module controls what gets tested.
MODULES_TO_TEST=(
tests/db/all-tests
tests/openssl/basic
tests/openssl/https
tests/zo-path
)
for mpath in "${MODULES_TO_TEST[@]}"; do
printf '\n\n\n\n%s\n\n' "== Testing module path '$mpath' =="
do_test -l "$mpath"
done
# Special Cases
# ~~~~~~~~~~~~~
# Tests that don't fit in the previous two buckets.
printf '\n\n\n\n%s\n\n' "== Testing 'tests/racket/contract/all' =="
"$RACKET" -l tests/racket/contract/all