Skip to content

[validation] Fix some portability test issues. #35810

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 1 commit into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions utils/rth
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class ResilienceTest(object):
def is_windows_host(self):
return self.triple.split('-')[2] == 'windows'

def is_openbsd_host(self):
return self.triple.split('-')[2].startswith('openbsd')

def compile_library(self):
for config in self.config_dir_map:
lib_file = self.lib_prefix + self.lib_name + self.lib_suffix
Expand Down Expand Up @@ -198,6 +201,9 @@ class ResilienceTest(object):
# drives library searching on Windows
os.chdir(self.config_dir_map[config1])
else:
if self.is_openbsd_host():
compiler_flags.extend([
'-Xlinker', '-z', '-Xlinker', 'origin'])
compiler_flags.extend([
'-Xlinker', '-rpath', '-Xlinker',
os.path.join(rpath_origin,
Expand Down
2 changes: 1 addition & 1 deletion validation-test/execution/dsohandle-multi-module.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

Expand Down
4 changes: 2 additions & 2 deletions validation-test/stdlib/HashingRandomization.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -Xfrontend -disable-access-control -module-name main %s -o %t/hash
// RUN: %target-codesign %t/hash
// RUN: env -u %env-SWIFT_DETERMINISTIC_HASHING %target-run %t/hash > %t/nondeterministic.log
// RUN: env -u %env-SWIFT_DETERMINISTIC_HASHING %target-run %t/hash >> %t/nondeterministic.log
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING='' %target-run %t/hash > %t/nondeterministic.log
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING='' %target-run %t/hash >> %t/nondeterministic.log
// RUN: %FileCheck --check-prefixes=RANDOM %s < %t/nondeterministic.log
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash > %t/deterministic.log
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash >> %t/deterministic.log
Expand Down