Browse Source

ci: update test script

umarcor 1 month ago
parent
commit
24bee6a79b
2 changed files with 16 additions and 6 deletions
  1. 14
    4
      .github/test.sh
  2. 2
    2
      .github/workflows/simulation.yml

+ 14
- 4
.github/test.sh View File

@@ -4,14 +4,24 @@ set -e
4 4
 
5 5
 cd $(dirname "$0")/..
6 6
 
7
-run_sim() {
7
+case "$1" in
8
+  sim)
9
+    true
10
+  ;;
11
+  *)
12
+    echo "Unknown test suite '$1'"
13
+    exit 1
14
+  ;;
15
+esac
16
+
17
+run_task() {
8 18
   echo "::group::Test $1"
9
-  cd "$1"/sim/vhdl
10
-  $MAKE sim
19
+  cd "$1"/"$2"/vhdl
20
+  $MAKE "$2"
11 21
   cd ../../..
12 22
   echo '::endgroup::'
13 23
 }
14 24
 
15 25
 for item in aes cbcdes cbcmac_des cbctdes ctraes des tdes; do
16
-  run_sim $item
26
+  run_task "$item" "$1"
17 27
 done

+ 2
- 2
.github/workflows/simulation.yml View File

@@ -28,7 +28,7 @@ jobs:
28 28
         backend: llvm
29 29
 
30 30
     - name: '▶️ Test'
31
-      run: ./.github/test.sh
31
+      run: ./.github/test.sh sim
32 32
       env:
33 33
         MAKE: make
34 34
 
@@ -61,6 +61,6 @@ jobs:
61 61
           mingw-w64-x86_64-openssl
62 62
 
63 63
     - name: '▶️ Test'
64
-      run: ./.github/test.sh
64
+      run: ./.github/test.sh sim
65 65
       env:
66 66
         MAKE: mingw32-make