tests/techmap/run-test.sh to cope with *.ys
authorEddie Hung <eddie@fpgeh.com>
Fri, 23 Aug 2019 18:09:50 +0000 (11:09 -0700)
committerEddie Hung <eddie@fpgeh.com>
Fri, 23 Aug 2019 18:09:50 +0000 (11:09 -0700)
tests/techmap/.gitignore
tests/techmap/run-test.sh

index 397b4a7624e35fa60563a9c03b1213d93f7b6546..cfed22fc56c7465cbe88a40659c3808ce7e96c2d 100644 (file)
@@ -1 +1,2 @@
 *.log
+/*.mk
index e2fc11e528724075d6ad4db36f0f95793fa9bbe0..96489ff155c0c5118af8e6fa4c2a1231f1dc4212 100755 (executable)
@@ -1,10 +1,20 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -e
-for x in *_runtest.sh; do
-       echo "Running $x.."
-       if ! bash $x &> ${x%.sh}.log; then
-               tail ${x%.sh}.log
-               echo ERROR
-               exit 1
+{
+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 > ${s%.sh}.log 2>&1"
        fi
 done
+} > run-test.mk
+exec ${MAKE:-make} -f run-test.mk