Skip to content

Commit db92019

Browse files
committed
[libunwind] Update the test configuration files to support the remote execution.
These changes allow remote execution for the libunwind library tests. Differential Revision: https://reviews.llvm.org/D123890
1 parent 31456ff commit db92019

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

libunwind/test/configs/llvm-libunwind-shared.cfg.in

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
2020
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
2121
config.recursiveExpansionLimit = 10
2222
config.test_exec_root = '@CMAKE_BINARY_DIR@'
23+
config.target_info = "@LIBUNWIND_TARGET_INFO@"
2324

2425
compile_flags = []
2526
link_flags = []
@@ -39,17 +40,22 @@ if '@CMAKE_SYSTEM_NAME@' == 'Linux':
3940
# Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
4041
compile_flags.append('-funwind-tables')
4142

43+
config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
44+
4245
config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
46+
local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
4347
config.substitutions.append(('%{flags}',
44-
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
48+
'-isysroot {}'.format(local_sysroot) if local_sysroot else ''
4549
))
4650
config.substitutions.append(('%{compile_flags}',
4751
'-nostdinc++ -I {}/include {}'.format('@LIBUNWIND_SOURCE_DIR@', ' '.join(compile_flags))
4852
))
4953
config.substitutions.append(('%{link_flags}',
5054
'-L {0} -Wl,-rpath,{0} -lunwind -ldl {1}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
5155
))
52-
config.substitutions.append(('%{exec}', ''))
56+
config.substitutions.append(('%{exec}',
57+
'%{executor} --execdir %T -- ' if '@LIBUNWIND_EXECUTOR@' else ''
58+
))
5359

5460
import os, site
5561
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))

libunwind/test/configs/llvm-libunwind-static.cfg.in

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ config.test_source_root = os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
2020
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
2121
config.recursiveExpansionLimit = 10
2222
config.test_exec_root = '@CMAKE_BINARY_DIR@'
23+
config.target_info = "@LIBUNWIND_TARGET_INFO@"
2324

2425
compile_flags = []
2526
link_flags = []
27+
2628
if @LIBUNWIND_USES_ARM_EHABI@:
2729
config.available_features.add('libunwind-arm-ehabi')
2830

@@ -38,20 +40,27 @@ if @LIBUNWIND_ENABLE_CET@:
3840
if '@CMAKE_SYSTEM_NAME@' == 'Linux':
3941
link_flags.append('-Wl,--export-dynamic')
4042

43+
4144
# Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
4245
compile_flags.append('-funwind-tables')
4346

47+
config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
48+
4449
config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
50+
51+
local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
4552
config.substitutions.append(('%{flags}',
46-
'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
53+
'-isysroot {}'.format(local_sysroot) if local_sysroot else ''
4754
))
4855
config.substitutions.append(('%{compile_flags}',
4956
'-nostdinc++ -I {}/include {}'.format('@LIBUNWIND_SOURCE_DIR@', ' '.join(compile_flags))
5057
))
5158
config.substitutions.append(('%{link_flags}',
5259
'{}/libunwind.a -ldl {}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
5360
))
54-
config.substitutions.append(('%{exec}', ''))
61+
config.substitutions.append(('%{exec}',
62+
'%{executor} --execdir %T -- ' if '@LIBUNWIND_EXECUTOR@' else ''
63+
))
5564

5665
import os, site
5766
site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))

0 commit comments

Comments
 (0)