Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FileCheck tests for several test commands #2747

Merged
merged 18 commits into from
Apr 11, 2023

Conversation

expipiplus1
Copy link
Collaborator

@expipiplus1 expipiplus1 commented Mar 28, 2023

  • SIMPLE, SIMPLE_EX
  • SIMPLE_LINE
  • REFLECTION, CPU_REFLECTION
  • CROSS_COMPILE

It does not currently support the render tests or the COMPARE_COMPUTE commands

It is invoked by adding (filecheck=MY_FILECHECK_PREFIX) to the test command, for example

TEST:CROSS_COMPILE(filecheck=SPIRV): -target spirv-assembly

Need to go through and neaten things up, and finish support for the
compute tests (which have both data and compiler diagnostic output to
confuse things).

depends on shader-slang/slang-llvm#64

premake5.lua Outdated
-- We link with llvm here for FileCheck support, LLVM-14 is the
-- library required according to llvm-config (llvm-config isn't in the
-- binary llvm distribution on Windows, so just inline the output here)
links { "compiler-core", "slang", "core", "miniz", "lz4", "LLVM-13" }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not done through slang-llvm wrapper?
Does this mean I need to pull llvm repo locally and setup my environment so the llvm headers can be found?

@expipiplus1 expipiplus1 force-pushed the filecheck branch 3 times, most recently from af79031 to f74519a Compare April 1, 2023 13:30
`slang-test -- tests/foo tests/bar`
Makes this issue present consistently: shader-slang#2766
- SIMPLE, SIMPLE_EX
- SIMPLE_LINE
- REFLECTION, CPU_REFLECTION
- CROSS_COMPILE

It does not currently support the render tests or the COMPARE_COMPUTE commands

It is invoked by adding `(filecheck=MY_FILECHECK_PREFIX)` to the test command, for example

TEST:CROSS_COMPILE(filecheck=SPIRV): -target spirv-assembly
Which were waiting on FileCheck
csyonghe
csyonghe previously approved these changes Apr 3, 2023
Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! This will significantly improve our productivity when working with tests. Thank you!

@jsmall-zzz jsmall-zzz merged commit d6dd38f into shader-slang:master Apr 11, 2023
@expipiplus1 expipiplus1 deleted the filecheck branch April 22, 2023 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants