Skip to content

Commit 4b14058

Browse files
committed
Make stage_id use the env
Without this the skip directives weren't working. This looks to largely be legacy anyway, but tests now run and pass in the correct environments.
1 parent efcb022 commit 4b14058

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

tests/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ impl Runner {
145145
// in different testing variations (i.e. experimental features), while
146146
// keeping *most* of the tests unchanged, we make use of "stage IDs",
147147
// which offer `// only-S` and `// ignore-S` for any stage ID `S`.
148-
let stage_id = variation.name;
148+
let stage_id = if variation.name == "default" {
149+
// Use the environment name as the stage ID.
150+
env
151+
} else {
152+
// Include the variation name in the stage ID.
153+
&format!("{}-{}", env, variation.name)
154+
};
149155

150156
let target = format!("{SPIRV_TARGET_PREFIX}{env}");
151157
let libs = build_deps(&self.deps_target_dir, &self.codegen_backend_path, &target);

tests/ui/lang/core/ref/member_ref_arg-broken.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// we care more that the error messages do not regress too much.
44

55
// build-fail
6-
6+
// normalize-stderr-test "ref/member_ref_arg-broken\.[^`]*" -> "ref/member_ref_arg-broken"
77
// normalize-stderr-test "38\[%38\]" -> "$$ID[%$$ID]"
88

99
use spirv_std::spirv;

tests/ui/lang/core/ref/member_ref_arg-broken.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ error: error:0:0 - OpLoad Pointer <id> '$ID[%$ID]' is not a logical pointer.
3838
%39 = OpLoad %uint %38
3939
|
4040
= note: spirv-val failed
41-
= note: module `$TEST_BUILD_DIR/lang/core/ref/member_ref_arg-broken.default`
41+
= note: module `$TEST_BUILD_DIR/lang/core/ref/member_ref_arg-broken`
4242

4343
error: aborting due to 1 previous error; 4 warnings emitted
4444

0 commit comments

Comments
 (0)