Skip to content

Commit c1d007a

Browse files
authored
Merge pull request #25232 from compnerd/hash
validation-test: avoid shell in HashingRandomization
2 parents a97cdc4 + 299548d commit c1d007a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

validation-test/stdlib/HashingRandomization.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
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: (export -n %env-SWIFT_DETERMINISTIC_HASHING; %target-run %t/hash && %target-run %t/hash) | %FileCheck --check-prefixes=RANDOM %s
5-
// RUN: (export %env-SWIFT_DETERMINISTIC_HASHING=1; %target-run %t/hash && %target-run %t/hash) | %FileCheck --check-prefixes=STABLE %s
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
6+
// RUN: %FileCheck --check-prefixes=RANDOM %s < %t/nondeterministic.log
7+
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash > %t/deterministic.log
8+
// RUN: env %env-SWIFT_DETERMINISTIC_HASHING=1 %target-run %t/hash >> %t/deterministic.log
9+
// RUN: %FileCheck --check-prefixes=STABLE %s < %t/deterministic.log
610

711
// REQUIRES: executable_test
812

0 commit comments

Comments
 (0)