-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add tests using lit as a test harness #520
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
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
e37dd0c
Initial testing functionality which works with libcxx
cbezault f2b5e3c
First pass at integrating to the build system
cbezault 63238df
First working pass wired into CMake
cbezault 0b1ab95
Only add -m64 when targeting AMD64
cbezault 8114d6a
Fixup arch info
cbezault 6efbcaf
Reorder the includes to be before the force include
cbezault 803eaf5
put flags after compile_flags
cbezault 92ccf0e
Put includes in INCLUDE to deal with /FI bug
cbezault 207a5c0
Clean up useless code, avoid copying around large dicts, unify commen…
cbezault 694a920
Actually use the built environment
cbezault b5ac8e1
Some fixups and make compile only mode play well with nul
cbezault 17fab02
Placeholder commit
cbezault 82f93a5
Add ability to override lit expressions
cbezault 6bf3458
Fixups
cbezault 98cf222
add a newline
cbezault 7acf12c
Use CTest
cbezault 9447b5e
update cgmanifest.json
cbezault dded495
First pass at running tests in CI
cbezault 9d0db1d
Make x64 continue on bad validation and switch to powershell
cbezault 050e212
drop trailing whitespace
cbezault 321545e
Resolves all comments left by reviewers.
cbezault 177683c
Merge branch 'master' into lit-test
cbezault 373d4c3
Revert adding targets for all the stl libs and dll
cbezault 67ab970
Merge branch 'master' of github.com:microsoft/STL into lit-test
cbezault 91665d8
Update tests/CMakeLists.txt
cbezault ab6517f
Update tests/CMakeLists.txt
cbezault e659fd9
Update azure-devops/run-build.yml
cbezault ebe16a7
Apply suggestions from code review
cbezault 4c3fca7
Skip std tests which require a newer toolset than is available publicly
cbezault 9cefd00
Update tests/std/tests/GH_000545_include_compare/custom_format.py
cbezault ec1bb2d
Apply suggestions from code review
cbezault 4838384
Reverting skipped_tests and other cleanups
cbezault 20d1d4a
Rename skipped_tests.txt
cbezault 9da967b
Resolve rename conflict
cbezault da5b487
Restore skipped_tests.tmp
cbezault 3051e07
Add the machinery for the expected_results to skip tests. Tests are n…
cbezault 2ade731
Move a flaky thread test from expected_results to skipped_tests
cbezault be15d21
Merge branch 'master' into lit-test
cbezault 0487f93
Fix some XPASSes and a bug in the .fail tests
cbezault d7a1f10
Change the way expected_results prefixes are examined and the naming …
cbezault e42c599
Forgot that libcxx has multiple tests under a directory
cbezault af48ec6
Change Output to out to be consistent
cbezault acf1d11
Fix weird big indent
cbezault 21a74bf
Resolve some of STL's comments
cbezault 39a4f4c
Fix some issues with the libcxx exected results.
cbezault fc299f4
Change up the expected results one more time
cbezault c009379
Drop tags from env.lst file parsing
cbezault 807fbac
Drop force includes comment. Could not repro
cbezault c48e2d3
Add the LLVM banner to tests.py
cbezault 6e95ede
Resolve STL's comments
cbezault 6a61d03
Increase the timeout of the whole job
cbezault 0c1b63c
Bring the llvm-project submodule back to the right commit
cbezault 2d096c2
Port more skips to expected results
cbezault 18f13d2
Merge branch 'master' of github.com:microsoft/STL into lit-test
cbezault 02bf1a3
Fix damaged expected results
cbezault f1afdfd
Make the xml output filepath a little shorter. This isn't a real solu…
cbezault 08d9666
Resolve Charlie's comments and try to make the testing dir shorter
cbezault acc878d
Don't remove the entire 'pass.cpp' or 'fail.cpp' suffix for test names
cbezault File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| set(STL_BUILD_ROOT "${PROJECT_BINARY_DIR}/out") | ||
cbezault marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| set(STL_SOURCE_DIR "${PROJECT_SOURCE_DIR}") | ||
| set(STL_TEST_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") | ||
| set(STL_TEST_UTILS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/utils") | ||
| set(STL_TESTED_HEADERS_DIR "${STL_BUILD_ROOT}/inc") | ||
|
|
||
| set(LLVM_PROJECT_SOURCE_DIR "${STL_SOURCE_DIR}/llvm-project" CACHE PATH | ||
cbezault marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "Location of the llvm-project source tree") | ||
| # This being a cache variable serves the dual purpose of letting the user point | ||
| # to different out-of-tree LLVM components and also override the set() call | ||
| # in llvm-lit's CMakeLists.txt. | ||
| set(LLVM_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/llvm" CACHE PATH | ||
cbezault marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "Location of the llvm source tree") | ||
| set(LLVM_LIT_SOURCE_DIR "${LLVM_SOURCE_DIR}/utils/llvm-lit") | ||
| set(LLVM_LIT_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/llvm-lit") | ||
|
|
||
| # We need to define this here as opposed to the libcxx CMakeLists.txt as | ||
| # the std testsuite also needs to know where libcxx lives | ||
| set(LIBCXX_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/libcxx") | ||
|
|
||
| list(APPEND CMAKE_MODULE_PATH "${LLVM_SOURCE_DIR}/cmake/modules") | ||
| include(AddLLVM) # for get_llvm_lit_path needed in llvm-lit's CMakeLists.txt | ||
|
|
||
| # The result of the first call to get_llvm_lit_path is cached | ||
| get_llvm_lit_path(LIT_BASE_DIR LIT_FILE_NAME) | ||
| set(LLVM_LIT_LOCATION "${LIT_BASE_DIR}/${LIT_FILE_NAME}") | ||
|
|
||
| set(Python_FIND_STRATEGY VERSION) | ||
| find_package(Python3) | ||
|
|
||
| add_subdirectory(std) | ||
| add_subdirectory(libcxx) | ||
|
|
||
| # Add the llvm-lit subdirectory last so all the test directories have had a | ||
| # chance to add to the config map. | ||
| add_subdirectory(${LLVM_LIT_SOURCE_DIR} llvm-lit) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
|
||
| set(LIBCXX_ENVLST "${CMAKE_CURRENT_SOURCE_DIR}/usual_matrix.lst") | ||
| set(LIBCXX_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt") | ||
| set(LIBCXX_TEST_OUTPUT_DIR "${STL_TEST_OUTPUT_DIR}/libcxx") | ||
|
|
||
| configure_file( | ||
| ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in | ||
| ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) | ||
|
|
||
| get_property(LLVM_LIT_CONFIG_MAP GLOBAL PROPERTY LLVM_LIT_CONFIG_MAP) | ||
| string(APPEND LLVM_LIT_CONFIG_MAP "map_config(\"${LIBCXX_SOURCE_DIR}/test/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n") | ||
| set_property(GLOBAL PROPERTY LLVM_LIT_CONFIG_MAP ${LLVM_LIT_CONFIG_MAP}) | ||
|
|
||
| if(ENABLE_XUNIT_OUTPUT) | ||
| list(APPEND LIBCXX_ADDITIONAL_LIT_FLAGS "--xunit-xml-output" "${CMAKE_CURRENT_BINARY_DIR}/libcxx.test.xml") | ||
| endif() | ||
|
|
||
| list(APPEND LIBCXX_LLVM_LIT_COMMAND "${LLVM_LIT_LOCATION}" | ||
| "${ADDITIONAL_LIT_FLAGS}" | ||
| "${LIBCXX_ADDITIONAL_LIT_FLAGS}" | ||
| "${CMAKE_CURRENT_BINARY_DIR}") | ||
|
|
||
| add_test(NAME libcxx COMMAND ${Python3_EXECUTABLE} ${LIBCXX_LLVM_LIT_COMMAND} COMMAND_EXPAND_LISTS) | ||
| set_tests_properties(libcxx PROPERTIES RUN_SERIAL TRUE) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.