Skip to content

Commit a769043

Browse files
committed
compiletest: update readme normalize examples
1 parent 209d0ff commit a769043

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

tests/compiletests/README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@ contents of `path/to/test.rs.stderr`.
7171
* `// normalize-stderr-test "targetSpecificMsg" -> ""` Replaces any substrings in stderr with another to normalise output
7272
between different machines and targets. By default, you should have to not specify any and only add them as needed.
7373
List of common substitutions:
74-
* `// normalize-stderr-test "OpLine .*\n" -> ""` remove all line numbers from debug info
75-
* `// normalize-stderr-test "OpSource .*\n" -> ""` remove all source code from debug info
76-
* `// normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/"` normalize path to the `spirv-std` crate
77-
* `// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""` remove the vulkan memory model *capability*, only used by vulkan targets
78-
* `// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""` remove the vulkan memory model *extension*, only used by vulkan targets
79-
* `// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"` replace the `Vulkan` memory model with `Simple`
80-
* `// normalize-stderr-test "\S*/lib/rustlib/" -> "$$SYSROOT/lib/rustlib/"` normalize path to crates delivered with rustc, such as `core`
74+
* remove debug info:
75+
* `// normalize-stderr-test "OpLine .*\n" -> ""` remove all line numbers
76+
* `// normalize-stderr-test "OpSource .*\n" -> ""` remove all source code
77+
* `// normalize-stderr-test "%\d+ = OpString .*\n" -> ""` remove all src file paths
78+
* when disassembling globals and testing on both `vulkan` and `spv` targets:
79+
* `// normalize-stderr-test "OpCapability VulkanMemoryModel\n" -> ""` remove the vulkan memory model *capability*, only used by `vulkan` targets
80+
* `// normalize-stderr-test "OpExtension .SPV_KHR_vulkan_memory_model.\n" -> ""` remove the vulkan memory model *extension*, only used by `vulkan` targets
81+
* `// normalize-stderr-test "OpMemoryModel Logical Vulkan" -> "OpMemoryModel Logical Simple"` replace the `Vulkan` memory model with `Simple`, which `spv` targets use
82+
* `// normalize-stderr-test "; .*\n" -> ""` remove comments on spirv version by rspirv
83+
* remove rustc error src paths:
84+
* `// normalize-stderr-test "\S*/lib/rustlib/" -> "$$SYSROOT/lib/rustlib/"` normalize path to crates delivered with rustc, such as `core`
85+
* `// normalize-stderr-test "\S*/crates/spirv-std/src/" -> "$$SPIRV_STD_SRC/"` normalize path to the `spirv-std` crate

0 commit comments

Comments
 (0)