Skip to content

Commit ba99c96

Browse files
committed
solana: Update run-tests script to fail on error
1 parent aad3e9b commit ba99c96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

solana/run-tests

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#!/usr/bin/env bash
22

3+
set -euo pipefail
4+
35
# Run each tests/*.test.ts file separately to avoid account state persisting between tests
46
for file in `ls tests/*.test.ts`
57
do
68
# convert file-name to FILE_NAME
7-
declare -u env_flag
89
filename=$(basename -- "$file")
910
filename="${filename%.test.*}"
10-
env_flag=${filename//-/_}
11-
11+
env_flag="$(tr '[:lower:]' '[:upper:]' <<< ${filename//-/_})"
12+
1213
env $env_flag=1 bash -c 'anchor test --skip-build'
1314
done

0 commit comments

Comments
 (0)