Skip to content

Commit 2d2a810

Browse files
authored
Merge pull request #35810 from 3405691582/ValidationTestsOpenBSD
2 parents bc04881 + e815349 commit 2d2a810

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

utils/rth

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ class ResilienceTest(object):
8383
def is_windows_host(self):
8484
return self.triple.split('-')[2] == 'windows'
8585

86+
def is_openbsd_host(self):
87+
return self.triple.split('-')[2].startswith('openbsd')
88+
8689
def compile_library(self):
8790
for config in self.config_dir_map:
8891
lib_file = self.lib_prefix + self.lib_name + self.lib_suffix
@@ -198,6 +201,9 @@ class ResilienceTest(object):
198201
# drives library searching on Windows
199202
os.chdir(self.config_dir_map[config1])
200203
else:
204+
if self.is_openbsd_host():
205+
compiler_flags.extend([
206+
'-Xlinker', '-z', '-Xlinker', 'origin'])
201207
compiler_flags.extend([
202208
'-Xlinker', '-rpath', '-Xlinker',
203209
os.path.join(rpath_origin,

validation-test/execution/dsohandle-multi-module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// RUN: %target-build-swift-dylib(%t/%target-library-name(first)) %S/Inputs/dsohandle-first.swift -emit-module -module-name first
44
// RUN: %target-build-swift-dylib(%t/%target-library-name(second)) %S/Inputs/dsohandle-second.swift -emit-module -module-name second
5-
// RUN: %target-build-swift -I %t -L %t -lfirst -lsecond %s -o %t/main
5+
// RUN: %target-build-swift -I %t -L %t -lfirst -lsecond %s -o %t/main %target-rpath(%t)
66
// RUN: %target-codesign %t/main %t/%target-library-name(first) %t/%target-library-name(second)
77
// RUN: %target-run %t/main %t/%target-library-name(first) %t/%target-library-name(second)
88

validation-test/stdlib/HashingRandomization.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -Xfrontend -disable-access-control -module-name main %s -o %t/hash
33
// RUN: %target-codesign %t/hash
4-
// RUN: env -u %env-SWIFT_DETERMINISTIC_HASHING %target-run %t/hash > %t/nondeterministic.log
5-
// RUN: env -u %env-SWIFT_DETERMINISTIC_HASHING %target-run %t/hash >> %t/nondeterministic.log
4+
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING='' %target-run %t/hash > %t/nondeterministic.log
5+
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING='' %target-run %t/hash >> %t/nondeterministic.log
66
// RUN: %FileCheck --check-prefixes=RANDOM %s < %t/nondeterministic.log
77
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash > %t/deterministic.log
88
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash >> %t/deterministic.log

0 commit comments

Comments
 (0)