Skip to content

Commit e91c60e

Browse files
committed
wip: Run tests separately for easier CI debugging
1 parent 9a11b9e commit e91c60e

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

agent/bin/test_run

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
#!/usr/bin/env bash
2-
set -e
2+
set -ex
33

4-
shopt -s extglob
5-
set -x
4+
# Run tests separately so it's easier to see which fails in CI
5+
for f in $(find test -name '*.bats' | grep -v http_client); do
6+
bats "$f"
7+
done
68

7-
# Use -r to discover tests. It comes with a couple of caveats:
8-
#
9-
# * it has problems reporting test scripts errors, i.e. problems in the scripts themselves, not
10-
# with commands they run. If you see failures that don't have sensible errors messages, try
11-
# something like
12-
#
13-
# $ bats $(find test/!(http_client) -name \*.bats)
14-
#
15-
# * just doing bats -r test doesn't discover a setup_suite.bash file correctly. http_client uses
16-
# one, so it needs to be run separately
17-
18-
bats -r test/!(http_client)/
9+
# This must run separately because it uses a setup_suite.bash file
1910
bats -r test/http_client/

0 commit comments

Comments
 (0)