diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-18 20:48:27 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-18 21:07:11 +0300 |
| commit | 4af5176d6377958a457da3e5f671ce21540fad70 (patch) | |
| tree | 04e7f2fe66e7c2e05f6a47b0c8108cf407ee6c93 /tests/scripts/gen-simple-xfail | |
| parent | cdbe058f69f1db9c552e1b4a1ec5f94c12fc48a2 (diff) | |
| download | qbt-4af5176d6377958a457da3e5f671ce21540fad70.tar.gz qbt-4af5176d6377958a457da3e5f671ce21540fad70.zip | |
add tests and fixes on top of 674438
Diffstat (limited to 'tests/scripts/gen-simple-xfail')
| -rwxr-xr-x | tests/scripts/gen-simple-xfail | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/scripts/gen-simple-xfail b/tests/scripts/gen-simple-xfail new file mode 100755 index 0000000..41c272a --- /dev/null +++ b/tests/scripts/gen-simple-xfail @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p $(for d in "${@}"; do echo "$d"; done \ + | sed "s|,.*||" | uniq | sed "s|^|reports/|") + +for s in "${@}" +do + NAME=${s%%,*} + EMSG=${s#${NAME},} + echo ".PHONY: $NAME" >> tests.mk + echo "$NAME:" >> tests.mk + echo " @../qbt $NAME/$NAME.qbt > reports/$NAME/log 2>&1 \\" >> tests.mk + echo " && echo 'Wrong retval' > reports/$NAME/OK \\" >> tests.mk + echo " || :" >> tests.mk + echo " @grep '$EMSG' reports/$NAME/log > /dev/null; \\" >> tests.mk + echo " [ \$\$? -eq 0 ] \\" >> tests.mk + echo " && echo OK > reports/$NAME/OK \\" >> tests.mk + echo " || echo EMSG > reports/$NAME/OK" >> tests.mk +done + +echo -n "TESTS +=" >> tests.mk +for s in "${@}" +do + NAME=${s%%,*} + echo -n " $NAME" >> tests.mk +done + +# append newline +echo "" >> tests.mk |
