Stop using ctest by CaseyCarter · Pull Request #5169 · microsoft/STL (original) (raw)
It's pointless to use ctest to run one of two different LIT commands when we can simply run LIT directly. This will make it easier to add future tests: we can simply add more targets, we won't need to jump through hoops to tell ctest not to run the new test all the time. This change will ease adding a new EDG-only test target for the IntelliSense team.
Detailed changes:
- In
tests/CMakeLists.txt
:- Replace
add_test
targets withadd_custom_target
s. Thestl
andstlasan
tests are nowtest
andextra-asan-tests
targets, respectively. - Replace
list(APPEND unset_variable_name a b c d)
with the equivalentset(unset_variable_name a b c d)
which makes it clear that we expectunset_variable_name
to be undefined. - Merge
${Python_EXECUTABLE}
intoSTL_LIT_COMMAND
, and extract${STL_LIT_TEST_DIRS}
. The makes it easy to reuse${STL_LIT_COMMAND}
and${STL_LIT_TEST_DIRS}
with target-specific LIT options. - Note that
USES_TERMINAL
in theadd_custom_target
s makes ninja run those targets serially, maintaining the observable effects of the removedset_tests_properties(stl stlasan PROPERTIES RUN_SERIAL ON)
.
- Replace
- Remove
enable_testing
from the top-levelCMakeLists.txt
; it does nothing now that we have noadd_test
s. We still useBUILD_TESTING
to control including the test targets in the generated build system, but I'm not certain there's a good reason to do so. Maybe to enable folks without python to build but not test the STL? - In
run-tests.yml
, replacectestOptions
parameter with atestTargets
parameter, a list of targets to build viacmake --build meow --target woof quack
. This needs to be set inasan-pipeline.yml
and plumbed throughbuild-and-test.yml
with a default oftest
to run the vanilla STL tests. - Remove/Replace the
ctest
discussion inREADME.md
. - Drive-by: Report that the
psutil
python module is unavailable at most once perstl-lit
run. Seeing three repetitions in the CI logs bothered me.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as resolved.
It's pointless to use ctest to run one of two different LIT commands when we can simply run LIT directly. This will make it easier to add future tests: we can simply add more targets, we won't need to jump through hoops to tell ctest not to run the new test all the time. This change will ease adding a new EDG-only test target for the IntelliSense team.
Detailed changes:
- In
tests/CMakeLists.txt
:- Replace
add_test
targets withadd_custom_target
s. Thestl
andstlasan
tests are nowtest
andextra-asan-tests
targets, respectively. - Replace
list(APPEND unset_variable_name a b c d)
with the equivalentset(unset_variable_name a b c d)
which makes it clear that we expectunset_variable_name
to be undefined. - Merge
${Python_EXECUTABLE}
intoSTL_LIT_COMMAND
, and extract${STL_LIT_TEST_DIRS}
. The makes it easy to reuse${STL_LIT_COMMAND}
and${STL_LIT_TEST_DIRS}
with target-specific LIT options. - Note that
USES_TERMINAL
in theadd_custom_target
s makes ninja run those targets serially, maintaining the observable effects of the removedset_tests_properties(stl stlasan PROPERTIES RUN_SERIAL ON)
.
- Replace
- Remove
enable_testing
from the top-levelCMakeLists.txt
; it does nothing now that we have noadd_test
s. We still useBUILD_TESTING
to control including the test targets in the generated build system, but I'm not certain there's a good reason to do so. Maybe to enable folks without python to build but not test the STL? - In
run-tests.yml
, replacectestOptions
parameter with atestTargets
parameter, a list of targets to build viacmake --build meow --target woof quack
. This needs to be set inasan-pipeline.yml
and plumbed throughbuild-and-test.yml
with a default oftest
to run the vanilla STL tests. - Remove/Replace the
ctest
discussion inREADME.md
. - Drive-by: Report that the
psutil
python module is unavailable at most once perstl-lit
run. Seeing three repetitions in the CI logs bothered me.
This comment was marked as outdated.
This comment was marked as resolved.
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
- /azp run STL-ASan-CI (There's a later push in the PR, but it's a non-functional change to documentation so I didn't revalidate.)
This comment was marked as resolved.
README.md Outdated Show resolved Hide resolved
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.