Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7515060
Update LLVM reference
CaseyCarter Jul 26, 2020
46f7b77
Merge branch 'master' of https://github.com/microsoft/STL into HEAD
cbezault Oct 16, 2020
d4ff68b
Avoid relying on upstream libcxx lit.cfg
cbezault Oct 16, 2020
f62ad74
Skip bogus failing tests
CaseyCarter Oct 19, 2020
7a859cd
Apply suggestions from code review
CaseyCarter Oct 19, 2020
777d49b
Update LLVM reference to latest
cbezault Oct 19, 2020
5d3ee9a
Update atomic_init per P0883R3
CaseyCarter Oct 19, 2020
e46a162
Update LLVM reference once again
CaseyCarter Oct 20, 2020
40b5aac
Fix mis-formatted line in expected_results.txt
CaseyCarter Oct 20, 2020
16c00b2
Fix bad separators in libcxx/expected_results
CaseyCarter Oct 20, 2020
c72c9fd
Let's rewrite the test harness
cbezault Oct 23, 2020
0a379b4
Fix merge conflicts
cbezault Oct 23, 2020
8b3708f
Get past file validation
cbezault Oct 23, 2020
352715d
That's what I get for not testing x86
cbezault Oct 23, 2020
9bb228a
Undo unwanted changes to submodules fixup tests which embed /c flag
cbezault Oct 23, 2020
428a2fc
resolve merge conflict
cbezault Oct 23, 2020
0b5cdaf
Resolves GH-1382
cbezault Oct 23, 2020
1843c30
Merge branch 'master' of https://github.com/Microsoft/STL
cbezault Oct 23, 2020
1d3cc67
cleanup the new custom format
cbezault Oct 23, 2020
d6eab20
Fix broken custom format
cbezault Oct 23, 2020
f5d374c
Respect tests getting marked as unsupported
cbezault Oct 23, 2020
c332008
Fix .fail tests
cbezault Oct 23, 2020
d0cb477
STL_EDG_DROP at least does something now + other cleanups
cbezault Oct 23, 2020
9f400b0
Make handling the intellisense response file its own step type
cbezault Oct 23, 2020
dd9a2a2
Make all compile-only tests compile only
cbezault Oct 23, 2020
331017e
Actually find tests with new suffix
cbezault Oct 23, 2020
74660fd
Update format.py
cbezault Oct 29, 2020
5116e2c
Merge with master
cbezault Oct 31, 2020
82e8f41
Merge branch 'master' of github.com:cbezault/STL
cbezault Oct 31, 2020
be7e4a4
Fix a bug that STL found
cbezault Nov 1, 2020
2fab494
Code review feedback.
StephanTLavavej Nov 2, 2020
73e08c6
Fix issue with expected results file. Integrate @ben-craig's suggestions
cbezault Nov 2, 2020
b91bb8b
It might be deprecated but pickling a tuple is faster than pickling a…
cbezault Nov 2, 2020
54fa098
Update tests/utils/stl/test/format.py
cbezault Nov 3, 2020
0a7194c
Update tests/utils/stl/test/tests.py
cbezault Nov 3, 2020
25d73d5
Change `/analyze` to `/analyze:autolog-`.
StephanTLavavej Nov 3, 2020
19b9294
Merge branch 'master' of https://github.com/Microsoft/STL
cbezault Nov 5, 2020
6887ca0
Get new test format to work with sharding
cbezault Nov 5, 2020
4d34a2d
Merge with origin changes
cbezault Nov 5, 2020
4e51118
Update tests/utils/stl/test/format.py
cbezault Nov 5, 2020
ac12e3c
Update tests/utils/stl/test/tests.py
cbezault Nov 5, 2020
7417354
We don't need to set this internal variable
cbezault Nov 5, 2020
227efe0
Update tests/utils/stl/test/tests.py
cbezault Nov 5, 2020
3725d6d
Update tests/utils/stl/test/tests.py
cbezault Nov 5, 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
2 changes: 1 addition & 1 deletion azure-devops/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$(vcpkgLocation)\scripts\buildsystems\vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=${{ parameters.targetPlatform }}-windows -DCMAKE_CXX_COMPILER=cl ^
-DCMAKE_BUILD_TYPE=Release -DLIT_FLAGS=$(litFlags) ^
-DCMAKE_CXX_FLAGS=/analyze ^
-DCMAKE_CXX_FLAGS=/analyze:autolog- ^
-S $(Build.SourcesDirectory) -B $(buildOutputLocation)
cmake --build $(buildOutputLocation)
displayName: 'Build the STL'
Expand Down
2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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")
set(LIBCXX_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/libcxx" CACHE PATH
"Location of the libcxx source tree")

add_subdirectory(libcxx)
add_subdirectory(std)
Expand Down
4 changes: 2 additions & 2 deletions tests/libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

set(LIBCXX_ENVLST "${CMAKE_CURRENT_SOURCE_DIR}/usual_matrix.lst")
set(LIBCXX_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt")
set(LIBCXX_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/libcxx" CACHE PATH
"Location of the libcxx source tree")
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)

set(LIBCXX_LIT_CONFIG_MAP "map_config(\"${LIBCXX_SOURCE_DIR}/test/lit.cfg.py\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n")
string(APPEND LIBCXX_LIT_CONFIG_MAP "map_config(\"${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n")

set_property(GLOBAL APPEND_STRING PROPERTY STL_LIT_CONFIG_MAP ${LIBCXX_LIT_CONFIG_MAP})
set_property(GLOBAL APPEND PROPERTY STL_LIT_TEST_DIRS "${LIBCXX_SOURCE_DIR}/test/std")
30 changes: 4 additions & 26 deletions tests/libcxx/lit.cfg
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path
import importlib
import site

site.addsitedir(str(Path(__file__).parents[1] / "utils"))
site.addsitedir(str(Path(__file__).parent / "tests"))

config.name = 'libc++'
config.suffixes = {".pass.cpp", ".fail.cpp"}

if config.test_source_root is None:
config.test_source_root = str(Path(__file__).parent)

config.test_exec_root = getattr(config, 'test_exec_root', None)

if not config.test_exec_root:
import tempfile
config.test_exec_root = tempfile.mkdtemp(prefix=config.name + '-testsuite-')
lit_config.note('Creating temporary directory for tests: %s' % config.test_exec_root)

config_module_name = getattr(config, 'config_module_name', 'stl.test.config')
config_module = importlib.import_module(config_module_name)

configuration = config_module.Configuration(lit_config, config)
configuration.configure()
config.test_format = configuration.get_test_format()
lit_config.fatal(
"You seem to be running Lit directly -- you should be running Lit through "
"<build>/tests/utils/stl-lit/stl-lit.py, which will ensure that the right Lit configuration "
"file is used.")
51 changes: 33 additions & 18 deletions tests/libcxx/lit.site.cfg.in
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import os
import site
site.addsitedir("@STL_TEST_UTILS_DIR@")
site.addsitedir(os.path.join("@LIBCXX_SOURCE_DIR@", "utils"))
import stl.test.config
import stl.test.features
import stl.test.file_parsing
import stl.test.format
import stl.test.params

config.configuration_variant = "stl"
config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
config.cxx_headers = "@STL_TESTED_HEADERS_DIR@"
config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"
config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
config.envlst_path = "@LIBCXX_ENVLST@"
config.expected_results_list_path = "@LIBCXX_EXPECTED_RESULTS@"
config.format_name = "LibcxxTestFormat"
config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support"]
config.libcxx_obj_root = "@LIBCXX_TEST_OUTPUT_DIR@"
config.msvc_toolset_libs_root = "@TOOLSET_LIB@"
config.stl_build_root = "@STL_BUILD_ROOT@"
config.stl_src_root = "@STL_SOURCE_DIR@"
config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@"
config.test_exec_root = "@LIBCXX_TEST_OUTPUT_DIR@"
config.test_source_root = "@LIBCXX_SOURCE_DIR@/test"
config.test_subdirs = ["@LIBCXX_SOURCE_DIR@/test/std"]
config.envlst_path = '@LIBCXX_ENVLST@'
config.name = 'libc++'
config.suffixes = ['[.]pass[.]cpp$', '[.]fail[.]cpp$']
config.test_exec_root = '@LIBCXX_TEST_OUTPUT_DIR@'
config.test_format = stl.test.format.LibcxxTestFormat()
config.test_source_root = '@LIBCXX_SOURCE_DIR@/test'

lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
lit_config.expected_results = getattr(lit_config, 'expected_results', dict())
lit_config.include_dirs = getattr(lit_config, 'include_dirs', dict())
lit_config.library_dirs = getattr(lit_config, 'library_dirs', dict())
lit_config.test_subdirs = getattr(lit_config, 'test_subdirs', dict())

lit_config.expected_results[config.name] = stl.test.file_parsing.parse_result_file('@LIBCXX_EXPECTED_RESULTS@')
lit_config.include_dirs[config.name] = ['@STL_TESTED_HEADERS_DIR@', '@LIBCXX_SOURCE_DIR@/test/support']
lit_config.library_dirs[config.name] = ['@CMAKE_LIBRARY_OUTPUT_DIRECTORY@', '@TOOLSET_LIB@']
lit_config.test_subdirs[config.name] = ['@LIBCXX_SOURCE_DIR@/test/std']

lit_config.cxx_runtime = '@CMAKE_RUNTIME_OUTPUT_DIRECTORY@'
lit_config.target_arch = '@VCLIBS_TARGET_ARCHITECTURE@'

# Add parameters and features to the config
stl.test.config.configure(
stl.test.params.getDefaultParameters(config, lit_config),
stl.test.features.getDefaultFeatures(config, lit_config),
config,
lit_config
)
2 changes: 1 addition & 1 deletion tests/libcxx/usual_matrix.lst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ RUNALL_INCLUDE ..\universal_prefix.lst
RUNALL_CROSSLIST
PM_CL="/EHsc /MTd /std:c++latest /permissive- /FImsvc_stdlib_force_include.h /wd4643"
RUNALL_CROSSLIST
PM_CL="/analyze /Zc:preprocessor"
PM_CL="/analyze:autolog- /Zc:preprocessor"
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing"
30 changes: 4 additions & 26 deletions tests/std/lit.cfg
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path
import importlib
import site

site.addsitedir(str(Path(__file__).parents[1] / "utils"))
site.addsitedir(str(Path(__file__).parent / "tests"))

config.name = 'std'
config.suffixes.add('test.cpp')

if config.test_source_root is None:
config.test_source_root = str(Path(__file__).parent)

config.test_exec_root = getattr(config, 'test_exec_root', None)

if not config.test_exec_root:
import tempfile
config.test_exec_root = tempfile.mkdtemp(prefix=config.name + '-testsuite-')
lit_config.note('Creating temporary directory for tests: %s' % config.test_exec_root)

config_module_name = getattr(config, 'config_module_name', 'stl.test.config')
config_module = importlib.import_module(config_module_name)

configuration = config_module.Configuration(lit_config, config)
configuration.configure()
config.test_format = configuration.get_test_format()
lit_config.fatal(
"You seem to be running Lit directly -- you should be running Lit through "
"<build>/tests/utils/stl-lit/stl-lit.py, which will ensure that the right Lit configuration "
"file is used.")
52 changes: 38 additions & 14 deletions tests/std/lit.site.cfg.in
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

config.cxx_archive_root = "@CMAKE_ARCHIVE_OUTPUT_DIRECTORY@"
config.cxx_headers = "@STL_TESTED_HEADERS_DIR@"
config.cxx_library_root = "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@"
config.cxx_runtime_root = "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@"
config.expected_results_list_path = "@STD_EXPECTED_RESULTS@"
config.include_dirs = ["@LIBCXX_SOURCE_DIR@/test/support", "@STL_SOURCE_DIR@/tests/std/include"]
config.msvc_toolset_libs_root = "@TOOLSET_LIB@"
config.stl_build_root = "@STL_BUILD_ROOT@"
config.stl_src_root = "@STL_SOURCE_DIR@"
config.target_arch = "@VCLIBS_TARGET_ARCHITECTURE@"
config.test_exec_root = "@STD_TEST_OUTPUT_DIR@"
config.test_subdirs_file = "@STD_TEST_SUBDIRS_FILE@"
config.test_subdirs_root = "@STD_TEST_SUBDIRS_ROOT@"
import os
import site
site.addsitedir("@STL_TEST_UTILS_DIR@")
site.addsitedir(os.path.join("@LIBCXX_SOURCE_DIR@", "utils"))
import stl.test.config
import stl.test.features
import stl.test.file_parsing
import stl.test.format
import stl.test.params

lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
config.name = 'std'
config.suffixes = ['test[.]cpp$', 'test[.]compile[.]pass[.]cpp$']
config.test_exec_root = "@STD_TEST_OUTPUT_DIR@"
config.test_format = stl.test.format.STLTestFormat()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: when should something go in config vs lit_config? Is there any guiding principle, or do we just put things in the object that gets plumbed to the places we need?

Copy link
Contributor Author

@cbezault cbezault Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things should go in the config file if the information is needed to actually run the test. Otherwise you should attempt to keep the information in the lit_config. Configs are embedded in test objects which are pickled and sent to worker processes to execute. Keeping the test object small so the pickling and transmission is fast is important in my experience.

lit_config.expected_results = getattr(lit_config, 'expected_results', dict())
lit_config.include_dirs = getattr(lit_config, 'include_dirs', dict())
lit_config.library_dirs = getattr(lit_config, 'library_dirs', dict())
lit_config.test_subdirs = getattr(lit_config, 'test_subdirs', dict())

lit_config.expected_results[config.name] = stl.test.file_parsing.parse_result_file('@STD_EXPECTED_RESULTS@')
lit_config.include_dirs[config.name] = \
['@STL_TESTED_HEADERS_DIR@', '@LIBCXX_SOURCE_DIR@/test/support', '@STL_SOURCE_DIR@/tests/std/include']
lit_config.library_dirs[config.name] = ['@CMAKE_LIBRARY_OUTPUT_DIRECTORY@', '@TOOLSET_LIB@']
lit_config.test_subdirs[config.name] = \
[os.path.normpath(os.path.join('@STD_TEST_SUBDIRS_ROOT@', path)) for \
path in stl.test.file_parsing.parse_commented_file('@STD_TEST_SUBDIRS_FILE@')]

lit_config.cxx_headers = '@STL_TESTED_HEADERS_DIR@'
lit_config.cxx_runtime = '@CMAKE_RUNTIME_OUTPUT_DIRECTORY@'
lit_config.target_arch = '@VCLIBS_TARGET_ARCHITECTURE@'

# Add parameters and features to the config
stl.test.config.configure(
stl.test.params.getDefaultParameters(config, lit_config),
stl.test.features.getDefaultFeatures(config, lit_config),
config,
lit_config
)
49 changes: 15 additions & 34 deletions tests/std/tests/Dev09_056375_locale_cleanup/custom_format.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,23 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path
import os

from stl.test.format import STLTestFormat, TestStep


class CustomTestFormat(STLTestFormat):
def getBuildSteps(self, test, lit_config, shared):
exe_source = Path(test.getSourcePath())
dll_source = exe_source.parent / 'TestDll.cpp'
shared.exec_dir = test.getExecDir()
output_base = test.getOutputBaseName()
output_dir = test.getOutputDir()
pass_var, fail_var = test.getPassFailResultCodes()
dll_output = output_dir / 'TestDll.DLL'

dll_compile_cmd, out_files, exec_file = \
test.cxx.executeBasedOnFlagsCmd([dll_source], output_dir,
shared.exec_dir, 'TestDll',
['/Fe' + str(dll_output)],
[], ['/DLL'])

shared.dll_file = dll_output

yield TestStep(dll_compile_cmd, shared.exec_dir, [dll_source],
test.cxx.compile_env)

exe_compile_cmd, out_files, shared.exec_file = \
test.cxx.executeBasedOnFlagsCmd([exe_source], output_dir,
shared.exec_dir, output_base,
[], [], [])

yield TestStep(exe_compile_cmd, shared.exec_dir, [exe_source],
test.cxx.compile_env)

def getTestSteps(self, test, lit_config, shared):
if shared.exec_file is not None:
yield TestStep([str(shared.exec_file)], shared.exec_dir,
[shared.exec_file, shared.dll_file],
test.cxx.compile_env)
def getBuildSteps(self, test, litConfig, shared):
exeSource = test.getSourcePath()
dllSource = os.path.join(os.path.dirname(exeSource), 'TestDll.cpp')

outputDir, outputBase = test.getTempPaths()
dllOutput = os.path.join(outputDir, 'TestDll.DLL')

cmd = [test.cxx, dllSource, *test.flags, *test.compileFlags, '/Fe' + dllOutput,
'/link', '/DLL', *test.linkFlags]

yield TestStep(cmd, shared.execDir, shared.env, False)

for step in super().getBuildSteps(test, litConfig, shared):
yield step
9 changes: 4 additions & 5 deletions tests/std/tests/Dev09_056375_locale_cleanup/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import os
import site
site.addsitedir(os.path.dirname(os.path.dirname(__file__)))
import Dev09_056375_locale_cleanup.custom_format

config.test_format = \
Dev09_056375_locale_cleanup.custom_format.CustomTestFormat(config.test_format.cxx,
config.test_format.execute_external,
config.test_format.build_executor,
config.test_format.test_executor)
config.test_format = Dev09_056375_locale_cleanup.custom_format.CustomTestFormat()
27 changes: 14 additions & 13 deletions tests/std/tests/Dev09_172666_tr1_tuple_odr/custom_format.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path
import os

from stl.test.format import STLTestFormat, TestStep
from stl.test.tests import TestType


class CustomTestFormat(STLTestFormat):
def getBuildSteps(self, test, lit_config, shared):
shared.exec_dir = test.getExecDir()
exe_source = Path(test.getSourcePath())
test2_source = exe_source.parent / 'test2.cpp'
output_base = test.getOutputBaseName()
output_dir = test.getOutputDir()
def getBuildSteps(self, test, litConfig, shared):
exeSource = test.getSourcePath()
test2Source = os.path.join(os.path.dirname(exeSource), 'test2.cpp')

cmd, out_files, shared.exec_file = \
test.cxx.executeBasedOnFlagsCmd([exe_source, test2_source],
output_dir, shared.exec_dir,
output_base, [], [], [])
outputDir, outputBase = test.getTempPaths()

yield TestStep(cmd, shared.exec_dir, [exe_source, test2_source],
test.cxx.compile_env)
if TestType.COMPILE in test.testType:
cmd = [test.cxx, '/c', exeSource, test2Source, *test.flags, *test.compileFlags]
elif TestType.RUN in test.testType:
shared.execFile = outputBase + '.exe'
cmd = [test.cxx, exeSource, test2Source, *test.flags, *test.compileFlags, '/Fe' + shared.execFile,
'/link', *test.linkFlags]

yield TestStep(cmd, shared.execDir, shared.env, False)
9 changes: 4 additions & 5 deletions tests/std/tests/Dev09_172666_tr1_tuple_odr/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import os
import site
site.addsitedir(os.path.dirname(os.path.dirname(__file__)))
import Dev09_172666_tr1_tuple_odr.custom_format

config.test_format = \
Dev09_172666_tr1_tuple_odr.custom_format.CustomTestFormat(config.test_format.cxx,
config.test_format.execute_external,
config.test_format.build_executor,
config.test_format.test_executor)
config.test_format = Dev09_172666_tr1_tuple_odr.custom_format.CustomTestFormat()
29 changes: 14 additions & 15 deletions tests/std/tests/GH_000545_include_compare/custom_format.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from pathlib import Path
import os

from stl.test.format import STLTestFormat, TestStep
from stl.test.tests import TestType


class CustomTestFormat(STLTestFormat):
def getBuildSteps(self, test, lit_config, shared):
shared.exec_dir = test.getExecDir()
output_base = test.getOutputBaseName()
output_dir = test.getOutputDir()
exe_source_dir = Path(test.getSourcePath()).parent
def getBuildSteps(self, test, litConfig, shared):
exeSourceDir = os.path.dirname(test.getSourcePath())
_, outputBase = test.getTempPaths()

source_files = []
for filename in os.listdir(exe_source_dir):
sourceFiles = []
for filename in os.listdir(exeSourceDir):
if filename.endswith('.cpp'):
source_files.append(exe_source_dir / filename)
sourceFiles.append(os.path.join(exeSourceDir, filename))

cmd, out_files, shared.exec_file = \
test.cxx.executeBasedOnFlagsCmd(source_files, output_dir,
shared.exec_dir, output_base,
[], [], [])
if TestType.COMPILE in test.testType:
cmd = [test.cxx, '/c', *sourceFiles, *test.flags, *test.compileFlags]
elif TestType.RUN in test.testType:
shared.execFile = outputBase + '.exe'
cmd = [test.cxx, *sourceFiles, *test.flags, *test.compileFlags, '/Fe' + shared.execFile,
'/link', *test.linkFlags]

yield TestStep(cmd, shared.exec_dir, source_files,
test.cxx.compile_env)
yield TestStep(cmd, shared.execDir, shared.env, False)
Loading