aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts/gen-simple-xfail
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-08-18 00:07:56 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-08-18 00:07:56 +0300
commit33fcf676128426f2ac9a4730d63fa481bb351518 (patch)
treefb8553e58fb3553e1b1da334b5a4d54e254f2340 /tests/scripts/gen-simple-xfail
parent0d4e9292d85a169f881926556992d4ae12dcb6f4 (diff)
downloadek-33fcf676128426f2ac9a4730d63fa481bb351518.tar.gz
ek-33fcf676128426f2ac9a4730d63fa481bb351518.zip
make check works again
Diffstat (limited to 'tests/scripts/gen-simple-xfail')
-rwxr-xr-xtests/scripts/gen-simple-xfail29
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..bb8c5ae
--- /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 " @../ek $NAME/$NAME.ek > 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