Add run-test.sh too
authorEddie Hung <eddie@fpgeh.com>
Thu, 29 Aug 2019 01:47:48 +0000 (18:47 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 29 Aug 2019 01:47:48 +0000 (18:47 -0700)
tests/ice40/run-test.sh [new file with mode: 0755]

diff --git a/tests/ice40/run-test.sh b/tests/ice40/run-test.sh
new file mode 100755 (executable)
index 0000000..ea56b70
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+set -e
+{
+echo "all::"
+for x in *.ys; do
+       echo "all:: run-$x"
+       echo "run-$x:"
+       echo "  @echo 'Running $x..'"
+       echo "  @../../yosys -ql ${x%.ys}.log $x"
+done
+for s in *.sh; do
+       if [ "$s" != "run-test.sh" ]; then
+               echo "all:: run-$s"
+               echo "run-$s:"
+               echo "  @echo 'Running $s..'"
+               echo "  @bash $s"
+       fi
+done
+} > run-test.mk
+exec ${MAKE:-make} -f run-test.mk