diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-12-20 12:22:06 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-12-20 15:54:14 +0200 |
commit | 5a5064482f513e68a4a878898f21a577ab5f59ec (patch) | |
tree | 55aa6917fe4d205111b2b3266d5ccb59e1275406 /check | |
parent | bd66c9fbe065fcf9eb49a0572443808f8d37133a (diff) | |
download | subplot-5a5064482f513e68a4a878898f21a577ab5f59ec.tar.gz |
test: run test program with --log, if Python
This makes it easier to debug failures when ./check fails. For
example, when build is run in CI.
Diffstat (limited to 'check')
-rwxr-xr-x | check | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -26,8 +26,15 @@ fi codegen() { - $hideok cargo run $quiet --bin sp-codegen -- "$1" --output "$2" --run \ - --templates "$(pwd)/templates" + $hideok cargo run $quiet --bin sp-codegen -- \ + "$1" --output "$2" --templates "$(pwd)/templates" + rm -f test.log + template="$(sed -n '/^template: /s///p' "$1" | tail -n1)" + case "$template" in + python) $hideok python3 "$2" --log test.log ;; + bash) $hideok bash "$2" ;; + *) echo "Don't know interpreter for $2" ; exit 1 ;; + esac } docgen() { |