Skip to content

Commit def5695

Browse files
author
Mike Ferris
authored
Merge pull request #130 from modocache/remove-built-tests-dir
[Tests] Replace %{built_tests_dir} with %T
2 parents 2e5fbd7 + 5a870df commit def5695

File tree

20 files changed

+42
-47
lines changed

20 files changed

+42
-47
lines changed

Tests/Functional/Asynchronous/Expectations/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous
2-
// RUN: %{built_tests_dir}/Asynchronous > %t || true
1+
// RUN: %{swiftc} %s -o %T/Asynchronous
2+
// RUN: %T/Asynchronous > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Handler/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Handler
2-
// RUN: %{built_tests_dir}/Handler > %t || true
1+
// RUN: %{swiftc} %s -o %T/Handler
2+
// RUN: %T/Handler > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Misuse/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Misuse
2-
// RUN: %{built_tests_dir}/Misuse > %t || true
1+
// RUN: %{swiftc} %s -o %T/Misuse
2+
// RUN: %T/Misuse > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Notifications/Expectations/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Notifications
2-
// RUN: %{built_tests_dir}/Asynchronous-Notifications > %t || true
1+
// RUN: %{swiftc} %s -o %T/Asynchronous-Notifications
2+
// RUN: %T/Asynchronous-Notifications > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Notifications/Handler/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Notifications-Handler
2-
// RUN: %{built_tests_dir}/Asynchronous-Notifications-Handler > %t || true
1+
// RUN: %{swiftc} %s -o %T/Asynchronous-Notifications-Handler
2+
// RUN: %T/Asynchronous-Notifications-Handler > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Predicates/Expectations/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Predicates
2-
// RUN: %{built_tests_dir}/Asynchronous-Predicates > %t || true
1+
// RUN: %{swiftc} %s -o %T/Asynchronous-Predicates
2+
// RUN: %T/Asynchronous-Predicates > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Asynchronous/Predicates/Handler/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Predicates-Handler
2-
// RUN: %{built_tests_dir}/Asynchronous-Predicates-Handler > %t || true
1+
// RUN: %{swiftc} %s -o %T/Asynchronous-Predicates-Handler
2+
// RUN: %T/Asynchronous-Predicates-Handler > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/ErrorHandling/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/ErrorHandling
2-
// RUN: %{built_tests_dir}/ErrorHandling > %t || true
1+
// RUN: %{swiftc} %s -o %T/ErrorHandling
2+
// RUN: %T/ErrorHandling > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/FailingTestSuite/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/FailingTestSuite
2-
// RUN: %{built_tests_dir}/FailingTestSuite > %t || true
1+
// RUN: %{swiftc} %s -o %T/FailingTestSuite
2+
// RUN: %T/FailingTestSuite > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/FailureMessagesTestCase/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/FailureMessagesTestCase
2-
// RUN: %{built_tests_dir}/FailureMessagesTestCase > %t || true
1+
// RUN: %{swiftc} %s -o %T/FailureMessagesTestCase
2+
// RUN: %T/FailureMessagesTestCase > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/ListTests/main.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/ListTests
2-
// RUN: %{built_tests_dir}/ListTests --list-tests > %t_list || true
1+
// RUN: %{swiftc} %s -o %T/ListTests
2+
// RUN: %T/ListTests --list-tests > %t_list || true
33
// RUN: %{xctest_checker} %t_list %s
4-
// RUN: %{built_tests_dir}/ListTests --dump-tests-json > %t_json || true
5-
// RUN: %{built_tests_dir}/ListTests --verify %t_json > %t_verify
4+
// RUN: %T/ListTests --dump-tests-json > %t_json || true
5+
// RUN: %T/ListTests --verify %t_json > %t_verify
66
// RUN: %{xctest_checker} %t_verify verify_json.expected
77

88
#if os(Linux) || os(FreeBSD)

Tests/Functional/NegativeAccuracyTestCase/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/NegativeAccuracyTestCase
2-
// RUN: %{built_tests_dir}/NegativeAccuracyTestCase > %t || true
1+
// RUN: %{swiftc} %s -o %T/NegativeAccuracyTestCase
2+
// RUN: %T/NegativeAccuracyTestCase > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Observation/All/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/All
2-
// RUN: %{built_tests_dir}/All > %t || true
1+
// RUN: %{swiftc} %s -o %T/All
2+
// RUN: %T/All > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Observation/Selected/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Selected
2-
// RUN: %{built_tests_dir}/Selected Selected.ExecutedTestCase/test_executed > %t || true
1+
// RUN: %{swiftc} %s -o %T/Selected
2+
// RUN: %T/Selected Selected.ExecutedTestCase/test_executed > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Performance/Misuse/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/PerformanceMisuse
2-
// RUN: %{built_tests_dir}/PerformanceMisuse > %t || true
1+
// RUN: %{swiftc} %s -o %T/PerformanceMisuse
2+
// RUN: %T/PerformanceMisuse > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/Performance/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/Performance
2-
// RUN: %{built_tests_dir}/Performance > %t || true
1+
// RUN: %{swiftc} %s -o %T/Performance
2+
// RUN: %T/Performance > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/SelectedTest/main.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/SelectedTest
2-
// RUN: %{built_tests_dir}/SelectedTest SelectedTest.ExecutedTestCase/test_foo > %T/one_test_case || true
3-
// RUN: %{built_tests_dir}/SelectedTest SelectedTest.ExecutedTestCase > %T/one_test_case_class || true
4-
// RUN: %{built_tests_dir}/SelectedTest > %T/all || true
1+
// RUN: %{swiftc} %s -o %T/SelectedTest
2+
// RUN: %T/SelectedTest SelectedTest.ExecutedTestCase/test_foo > %T/one_test_case || true
3+
// RUN: %T/SelectedTest SelectedTest.ExecutedTestCase > %T/one_test_case_class || true
4+
// RUN: %T/SelectedTest > %T/all || true
55
// RUN: %{xctest_checker} -p "// CHECK-METHOD:" %T/one_test_case %s
66
// RUN: %{xctest_checker} -p "// CHECK-CLASS:" %T/one_test_case_class %s
77
// RUN: %{xctest_checker} -p "// CHECK-ALL:" %T/all %s

Tests/Functional/SingleFailingTestCase/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/SingleFailingTestCase
2-
// RUN: %{built_tests_dir}/SingleFailingTestCase > %t || true
1+
// RUN: %{swiftc} %s -o %T/SingleFailingTestCase
2+
// RUN: %T/SingleFailingTestCase > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/TestCaseLifecycle/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %{swiftc} %s -o %{built_tests_dir}/TestCaseLifecycle
2-
// RUN: %{built_tests_dir}/TestCaseLifecycle > %t || true
1+
// RUN: %{swiftc} %s -o %T/TestCaseLifecycle
2+
// RUN: %T/TestCaseLifecycle > %t || true
33
// RUN: %{xctest_checker} %t %s
44

55
#if os(Linux) || os(FreeBSD)

Tests/Functional/lit.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,6 @@ else:
9090
# Having prepared the swiftc command, we set the substitution.
9191
config.substitutions.append(('%{swiftc}', ' '.join(swift_exec)))
9292

93-
# Add the %built_tests_dir substitution, which is a temporary
94-
# directory used to store built files.
95-
built_tests_dir = tempfile.mkdtemp()
96-
config.substitutions.append(('%{built_tests_dir}', built_tests_dir))
97-
9893
# Add the %xctest_checker substitution, which is a Python script
9994
# can be used to compare the actual XCTest output to the expected
10095
# output.

0 commit comments

Comments
 (0)