File tree 5 files changed +59
-0
lines changed
5 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,10 @@ jobs:
184
184
--platform "${{matrix.platform}}" \
185
185
--config "${{matrix.config}}" \
186
186
--skip-file tests/expected-example-failure-github.txt
187
+ - name : Run slangc tests
188
+ if : steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
189
+ run : |
190
+ PATH=$bin_dir:$PATH tools/slangc-test/test.sh
187
191
- name : Test Slang via glsl
188
192
if : steps.filter.outputs.should-run == 'true' && matrix.full-gpu-tests && matrix.platform != 'wasm'
189
193
run : |
Original file line number Diff line number Diff line change
1
+ module A;
2
+
3
+ public int test() { return 1 ; }
Original file line number Diff line number Diff line change
1
+ module source1;
2
+
3
+ import A;
4
+
5
+ [shader(" compute" )]
6
+ void computeMain1() { int a = test(); }
Original file line number Diff line number Diff line change
1
+ [shader(" compute" )]
2
+ void computeMain2() { }
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd) "
6
+
7
+ summary=()
8
+ failure_count=0
9
+ test_count=0
10
+
11
+ test () {
12
+ local name
13
+ local exit_code
14
+ name=$1
15
+ shift
16
+ pushd " $name " 1> /dev/null 2>&1
17
+ echo " Running $name ..."
18
+ " $@ " || exit_code=$?
19
+ summary=(" ${summary[@]} " " $name : " )
20
+ if [[ $exit_code -eq 0 ]]; then
21
+ summary=(" ${summary[@]} " " success" )
22
+ else
23
+ summary=(" ${summary[@]} " " failure (exit code: $exit_code )" )
24
+ fi
25
+ popd 1> /dev/null 2>&1
26
+ echo
27
+ test_count=$(( test_count + 1 ))
28
+ }
29
+
30
+ cd " ${script_dir} "
31
+
32
+ test multiple-source-files slangc source1.slang source2.slang
33
+
34
+ echo " "
35
+ echo " Summary: "
36
+ echo
37
+ for line in " ${summary[@]} " ; do
38
+ printf ' %s\n' " $line "
39
+ done
40
+ echo " "
41
+ echo " $failure_count failed, out of $test_count tests"
42
+ if [[ $failure_count -ne 0 ]]; then
43
+ exit 1
44
+ fi
You can’t perform that action at this time.
0 commit comments