Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
David Peixotto d936753d6a
Write lit xml output as utf-8 (#6130)
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.
2024-01-05 11:32:49 -08:00
Greg Roth 4d132f95ff
[lit] allow for spaces in taef commands (#5720)
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
2023-09-18 19:58:04 +00:00
Helena Kotas 96e13a0e0a
Lit TAEF fixes: Use filter when listing tests and fix verbose parameter (#5494)
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.
2023-08-08 10:28:39 -07:00
Xiang Li 1775fffc0b
[lit] allow find git usr bin in path directly. (#5385)
This is for case where git usr bin is not in winreg.
2023-07-03 13:31:29 -04:00
Xiang Li 29b55d138c
[lit] Add git usr bin to path automatically. (#5355)
This will avoid test fail when forget to add git usr bin to PATH.

Port from
0f1f13fcb1
2023-06-29 17:20:35 -04:00
Xiang Li a65635b0ea
[lit] Pass the USERPROFILE variable through on Windows (#5331)
This is to fix the failure when running hcttest inside docker image.

Upstream PR is in

9de63b2e05
2023-06-27 19:20:08 +00:00
Xiang Li 18c9e114f9
[lit] Port Support %if ... %else syntax for RUN lines from upstream (#5227)
* [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.
2023-05-26 14:10:34 -07:00
Xiang Li 14063a661c
[enable lit] Keep same name for ClangHLSLTests when enable lit (#5167)
* [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.
2023-04-21 15:27:35 -07:00
Xiang Li 689084cadd
Fix lit test fails (#4973)
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.
2023-02-02 16:24:03 -08:00
Xiang Li 9c3dab6896
Add lit test for execution test. (#4964)
* Add lit test for execution test.
* Treat taef skipped as lit Unsupported.
2023-01-27 01:34:56 +00:00
Chris B ac3a6ae9f4
Enable building with ninja through Visual Studio (#4889) 2023-01-05 23:07:36 -06:00
Chris B 3ae7054214
Tweaks and fixes to clang build and test configs (#4832)
* 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!
2022-12-01 11:06:42 -06:00
Xiang Li 24ca1f498e
Support taef run in lit. (#4762)
* 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.
2022-11-14 10:33:16 -08:00
Chris B 4ca3a04252
Restore LLVM Testing Infrastructure (#4012)
* 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
2021-10-19 15:24:11 -05:00