This commit modifies the xml output of lit so that we always open the
file as utf-8 and also encode any invalid characters with the xml
character reference.
I was hitting an encoding error on windows for some test output because
the xml file was using the windows cp1252 encoding and it ran into some
characters that could not be encoded.
In order to test the change I added a new flag to lit
`--xml-include-test-output` which will include all test output in the
xml. That way we can still expect the lit run to pass and also validate
that the xml file is properly encoded.
The way taef tests were gathered and executed previously flattened the
list of arguments to a string. This allowed the weird /select: flag to
work correctly, but if any of the arguments had spaces, they were
misinterpretted having lost the implicit quotes around each.
By removing the flattening, putting a space between the flag and the
argument for /select: and removing the explicit quotes around that
argument, the command executes properly whether there are spaces or not
Additionally added a way to detect when these commands failed since they
were silently failing and skipping a large swath of testing when spaces
were present.
Fixes#5719
Lit TAEF files fixes:
- Use filter parameter when enumerating tests. This enables listing of
just the tests that should run, and it also filtering by architecture.
This is crucial for isolating ARM64 and ARM64EC versions of tests that
are in the same test dll.
- Fix verbose parameter - it was not getting applied
- Enable verbose on all tests - the output is shown only when the test fails
Related to #5489.
* [lit] Port Support %if ... %else syntax for RUN lines from upstream
Based on
1041a9642b
This syntax allows to modify RUN lines based on features
available. For example:
RUN: ... | FileCheck %s --check-prefix=%if windows %{CHECK-W%} %else %{CHECK-NON-W%}
CHECK-W: ...
CHECK-NON-W: ...
This is merged to allow dxilver check apply on each RUN line.
* [enable lit] Keep same name for ClangHLSLTests when enable lit
This is for enable lit by default.
It will make sure with/without lit enabled, ClangHLSLTests output dll with same name.
Use ClangHLSLTests because LIT needs GoogleTest binaries to be named that way for test discovery.
1. added dxc_batch as dependent for clang tests.
2. Not run exec test by default.
3. Strip directory which has dxil.dll from %PATH% for taef test which not need it.
4. Add select_filter and use @Name for TestName.
* Enable mix select filter by use shell=True when open subprocess.
5. Only run execution test when dxil.dll exist or experimental mode enabled.
* Tweaks and fixes to clang build and test configs
* Setup dependencies for check-clang.
* Proprely adjust shlibdir for multi-configuraiton builds.
* Move TAEF platform verification earlier to avoid issues on Linux.
* Adjust TAEF suite config to handle build_mode specialization.
* Remove another DXC_BUILD_ARCH that snuck in.
* Add the intermediate library path as an rpath for unit tests.
* Make ClangUnitTests depend on ClangHLSLTests so taef tests build.
* Add clang-test-depends and test-depends targets.
* Fix spelling error.
Thanks @hekota!
* Support taef run in lib.
lit.formats.taef is added to run taef under lit.
New lit target check-clang-hlsl is added to run clang-hlsl-test taef tests.
Add lit-target for dxil conv to set different hlsl data dir.
* Restore lit and googletest sources from LLVM 3.7.0
This commit just re-adds sources that were removed somewhere along the
way.
* Pull in googletest & googlemock from LLVM 4.0
Googlemock was introduced in LLVM 4.0, and is used by SPIR-V's tests.
This pulls in the LLVM 4.0 version of GoogleTest and GoogleMock to
replace the external submodules.
LLVM's version of GoolgeTest and GoogleMock have some minor extensions
to work better with LIT for error reporting and producing cleaner test
output.
* Remove external googletest
* Fix lit to handle comment in gtest names
This fix came into LLVM with the updated googletest in a977582dead2
* Ignore raw_fd_ostream errors when not closing
There's some odditites with the changes in the filesystem code that
cause this to error sometimes in unit tests. Until we can dedicate time
to looking into the filesystem code, just swallow that error...
* Fix bot failure
Missed an option change.
* Fixing MSVC build failure
* A cleaner build fix
This should address issues with VS 2019 in a cleaner way.
* Fix build