Skip to content
Merged
Show file tree
Hide file tree
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 Feb 10, 2020
f2b5e3c
First pass at integrating to the build system
cbezault Feb 11, 2020
63238df
First working pass wired into CMake
cbezault Feb 12, 2020
0b1ab95
Only add -m64 when targeting AMD64
cbezault Feb 14, 2020
8114d6a
Fixup arch info
cbezault Feb 14, 2020
6efbcaf
Reorder the includes to be before the force include
cbezault Feb 14, 2020
803eaf5
put flags after compile_flags
cbezault Feb 14, 2020
92ccf0e
Put includes in INCLUDE to deal with /FI bug
cbezault Feb 15, 2020
207a5c0
Clean up useless code, avoid copying around large dicts, unify commen…
cbezault Feb 18, 2020
694a920
Actually use the built environment
cbezault Feb 18, 2020
b5ac8e1
Some fixups and make compile only mode play well with nul
cbezault Feb 18, 2020
17fab02
Placeholder commit
cbezault Feb 19, 2020
82f93a5
Add ability to override lit expressions
cbezault Feb 20, 2020
6bf3458
Fixups
cbezault Feb 20, 2020
98cf222
add a newline
cbezault Feb 20, 2020
7acf12c
Use CTest
cbezault Feb 22, 2020
9447b5e
update cgmanifest.json
cbezault Feb 22, 2020
dded495
First pass at running tests in CI
cbezault Feb 22, 2020
9d0db1d
Make x64 continue on bad validation and switch to powershell
cbezault Feb 22, 2020
050e212
drop trailing whitespace
cbezault Feb 22, 2020
321545e
Resolves all comments left by reviewers.
cbezault Mar 13, 2020
177683c
Merge branch 'master' into lit-test
cbezault Mar 13, 2020
373d4c3
Revert adding targets for all the stl libs and dll
cbezault Mar 13, 2020
67ab970
Merge branch 'master' of github.com:microsoft/STL into lit-test
cbezault Mar 18, 2020
91665d8
Update tests/CMakeLists.txt
cbezault Mar 19, 2020
ab6517f
Update tests/CMakeLists.txt
cbezault Mar 19, 2020
e659fd9
Update azure-devops/run-build.yml
cbezault Mar 19, 2020
ebe16a7
Apply suggestions from code review
cbezault Mar 19, 2020
4c3fca7
Skip std tests which require a newer toolset than is available publicly
cbezault Mar 19, 2020
9cefd00
Update tests/std/tests/GH_000545_include_compare/custom_format.py
cbezault Mar 19, 2020
ec1bb2d
Apply suggestions from code review
cbezault Mar 19, 2020
4838384
Reverting skipped_tests and other cleanups
cbezault Mar 21, 2020
20d1d4a
Rename skipped_tests.txt
cbezault Mar 21, 2020
9da967b
Resolve rename conflict
cbezault Mar 21, 2020
da5b487
Restore skipped_tests.tmp
cbezault Mar 21, 2020
3051e07
Add the machinery for the expected_results to skip tests. Tests are n…
cbezault Mar 21, 2020
2ade731
Move a flaky thread test from expected_results to skipped_tests
cbezault Mar 21, 2020
be15d21
Merge branch 'master' into lit-test
cbezault Mar 21, 2020
0487f93
Fix some XPASSes and a bug in the .fail tests
cbezault Mar 22, 2020
d7a1f10
Change the way expected_results prefixes are examined and the naming …
cbezault Mar 22, 2020
e42c599
Forgot that libcxx has multiple tests under a directory
cbezault Mar 22, 2020
af48ec6
Change Output to out to be consistent
cbezault Mar 22, 2020
acf1d11
Fix weird big indent
cbezault Mar 22, 2020
21a74bf
Resolve some of STL's comments
cbezault Mar 22, 2020
39a4f4c
Fix some issues with the libcxx exected results.
cbezault Mar 22, 2020
fc299f4
Change up the expected results one more time
cbezault Mar 22, 2020
c009379
Drop tags from env.lst file parsing
cbezault Mar 23, 2020
807fbac
Drop force includes comment. Could not repro
cbezault Mar 23, 2020
c48e2d3
Add the LLVM banner to tests.py
cbezault Mar 24, 2020
6e95ede
Resolve STL's comments
cbezault Mar 24, 2020
6a61d03
Increase the timeout of the whole job
cbezault Mar 24, 2020
0c1b63c
Bring the llvm-project submodule back to the right commit
cbezault Mar 24, 2020
2d096c2
Port more skips to expected results
cbezault Mar 24, 2020
18f13d2
Merge branch 'master' of github.com:microsoft/STL into lit-test
cbezault Mar 24, 2020
02bf1a3
Fix damaged expected results
cbezault Mar 24, 2020
f1afdfd
Make the xml output filepath a little shorter. This isn't a real solu…
cbezault Mar 25, 2020
08d9666
Resolve Charlie's comments and try to make the testing dir shorter
cbezault Mar 25, 2020
acc878d
Don't remove the entire 'pass.cpp' or 'fail.cpp' suffix for test names
cbezault Mar 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

__pycache__/
.vs/
.vscode/
/build/
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ get_filename_component(TOOLSET_ROOT_DIR "${TOOLSET_ROOT_DIR}" DIRECTORY) # $\VC\
set(TOOLSET_LIB "${TOOLSET_ROOT_DIR}/lib/${VCLIBS_X86_OR_X64}")

add_subdirectory(stl)

# Since we don't configure any of the tests with CMake, there is no downside to enabling testing unconditionally.
enable_testing()
add_subdirectory(tests)
45 changes: 40 additions & 5 deletions azure-devops/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

jobs:
- job: ${{ parameters.targetPlatform }}
timeoutInMinutes: 360
pool:
name: StlBuild-2020-03-24

Expand All @@ -24,15 +25,16 @@ jobs:
condition: and(ne(variables.CACHE_RESTORED, 'true'), contains('${{ parameters.targetPlatform }}', 'arm'))
timeoutInMinutes: 10
inputs:
vcpkgArguments: 'boost-build:x86-windows'
vcpkgArguments: 'boost-build'
vcpkgDirectory: '$(vcpkgLocation)'
vcpkgTriplet: 'x86-windows'
- task: run-vcpkg@0
displayName: 'Run vcpkg'
timeoutInMinutes: 10
inputs:
vcpkgArguments: 'boost-math'
vcpkgDirectory: '$(vcpkgLocation)'
vcpkgTriplet: ${{ parameters.targetPlatform }}-windows
vcpkgTriplet: '${{ parameters.targetPlatform }}-windows'
- task: run-cmake@0
displayName: 'Build Support Tools'
timeoutInMinutes: 2
Expand Down Expand Up @@ -62,7 +64,40 @@ jobs:
displayName: 'Build the STL'
timeoutInMinutes: 10
inputs:
cmakeListsTxtPath: 'CMakeSettings.json'
useVcpkgToolchainFile: true
configurationRegexFilter: '.*${{ parameters.targetPlatform }}.*'
cmakeListsOrSettingsJson: 'CMakeListsTxtAdvanced'
cmakeListsTxtPath: '$(Build.SourcesDirectory)/CMakeLists.txt'
buildDirectory: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}
useVcpkgToolchainFile: true
cmakeAppendedArgs: '-G Ninja -DENABLE_XUNIT_OUTPUT=TRUE'
- task: PowerShell@2
displayName: 'Run Tests'
timeoutInMinutes: 120
condition: in('${{ parameters.targetPlatform }}', 'x64', 'x86')
inputs:
workingDirectory: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}
targetType: inline
script: |
Add-Content -Path ./run-tests.cmd -Value "set PATH=$(split-path (get-command ctest).source);%PATH%"
Add-Content -Path ./run-tests.cmd -Value "set PATH=$(split-path (get-command clang-cl).source);%PATH%"
$currentDir = "$((Get-Item -Path "./").FullName)"
Add-Content -Path ./run-tests.cmd -Value "cd $currentDir"
Add-Content -Path ./run-tests.cmd -Value "ctest -V"
$(vcpkgLocation)/vcpkg.exe env --triplet ${{ parameters.targetPlatform }}-windows "$currentDir/run-tests.cmd"
- task: PublishTestResults@2
displayName: 'Publish libcxx Tests'
timeoutInMinutes: 10
condition: in('${{ parameters.targetPlatform }}', 'x64', 'x86')
inputs:
searchFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}
testResultsFormat: JUnit
testResultsFiles: '**/libcxx.test.xml'
testRunTitle: 'libcxx-${{ parameters.targetPlatform }}'
- task: PublishTestResults@2
displayName: 'Publish std Tests'
timeoutInMinutes: 10
condition: in('${{ parameters.targetPlatform }}', 'x64', 'x86')
inputs:
searchFolder: $(Build.ArtifactStagingDirectory)/${{ parameters.targetPlatform }}
testResultsFormat: JUnit
testResultsFiles: '**/std.test.xml'
testRunTitle: 'std-${{ parameters.targetPlatform }}'
39 changes: 39 additions & 0 deletions tests/CMakeLists.txt
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")
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
"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
"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)
26 changes: 26 additions & 0 deletions tests/libcxx/CMakeLists.txt
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)
Loading