Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ Runtime, download and unzip `runtime-windows`, and pass the unzipped folder to `
python -I scripts/run_gpu_tests.py --build <unzipped runtime-windows>
```

`build.py` and `check.py` take the same folder as their second argument:
`check.py` takes the same folder as its second argument (`build.py` reads anything after the output folder as
test shader names):

```sh
python -I runtime/test/shaders/build.py <out dir>
Expand Down
2 changes: 1 addition & 1 deletion scripts/meta_to_xml.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Converts carved PSO ('PSIN') and RBF ('RBF0') metadata blobs to XML with CodeWalker.Core's parsers.
# Run in Windows PowerShell 5.1.
# .\meta_to_xml.ps1 -Carve <work>\carve -Out <work>\meta [-Limit N]
# Each blob becomes <Out>\<archive>\<offset>.xml. Failures go to <Out>\failures.txt with the error message.
# Each blob becomes <Out>\<archive>\<offset>.pso.xml or <offset>.rbf.xml. Failures go to <Out>\failures.txt with the error message.
param(
[string]$Carve = "<work>\carve",
[string]$Out = "<work>\meta",
Expand Down
8 changes: 8 additions & 0 deletions tests/test_shader_build_fallbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ def refuse(work, names):
self.fake_translate = keep
self.assertIn("did not produce validated SPIR-V for: cs_store", str(status))

def test_a_runtime_folder_as_second_argument_is_refused_as_a_shader_name(self):
# docs/testing.md: only check.py takes the runtime folder second; build.py reads test shader names there.
runtime = self.out.parent / "runtime-windows"
runtime.mkdir()
status, _ = self.run_build([str(runtime)], {})
self.assertEqual(status, "Unknown test shaders: " + str(runtime))
self.assertEqual(self.asked, [])


if __name__ == "__main__":
unittest.main()