Skip to content

[Tests] Replace %{built_tests_dir} with %T #130

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
Jun 29, 2016
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
4 changes: 2 additions & 2 deletions Tests/Functional/Asynchronous/Expectations/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous
// RUN: %{built_tests_dir}/Asynchronous > %t || true
// RUN: %{swiftc} %s -o %T/Asynchronous
// RUN: %T/Asynchronous > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Asynchronous/Handler/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Handler
// RUN: %{built_tests_dir}/Handler > %t || true
// RUN: %{swiftc} %s -o %T/Handler
// RUN: %T/Handler > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Asynchronous/Misuse/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Misuse
// RUN: %{built_tests_dir}/Misuse > %t || true
// RUN: %{swiftc} %s -o %T/Misuse
// RUN: %T/Misuse > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Notifications
// RUN: %{built_tests_dir}/Asynchronous-Notifications > %t || true
// RUN: %{swiftc} %s -o %T/Asynchronous-Notifications
// RUN: %T/Asynchronous-Notifications > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Notifications-Handler
// RUN: %{built_tests_dir}/Asynchronous-Notifications-Handler > %t || true
// RUN: %{swiftc} %s -o %T/Asynchronous-Notifications-Handler
// RUN: %T/Asynchronous-Notifications-Handler > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Predicates
// RUN: %{built_tests_dir}/Asynchronous-Predicates > %t || true
// RUN: %{swiftc} %s -o %T/Asynchronous-Predicates
// RUN: %T/Asynchronous-Predicates > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Asynchronous/Predicates/Handler/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Asynchronous-Predicates-Handler
// RUN: %{built_tests_dir}/Asynchronous-Predicates-Handler > %t || true
// RUN: %{swiftc} %s -o %T/Asynchronous-Predicates-Handler
// RUN: %T/Asynchronous-Predicates-Handler > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/ErrorHandling/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/ErrorHandling
// RUN: %{built_tests_dir}/ErrorHandling > %t || true
// RUN: %{swiftc} %s -o %T/ErrorHandling
// RUN: %T/ErrorHandling > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/FailingTestSuite/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/FailingTestSuite
// RUN: %{built_tests_dir}/FailingTestSuite > %t || true
// RUN: %{swiftc} %s -o %T/FailingTestSuite
// RUN: %T/FailingTestSuite > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/FailureMessagesTestCase/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/FailureMessagesTestCase
// RUN: %{built_tests_dir}/FailureMessagesTestCase > %t || true
// RUN: %{swiftc} %s -o %T/FailureMessagesTestCase
// RUN: %T/FailureMessagesTestCase > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/ListTests/main.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/ListTests
// RUN: %{built_tests_dir}/ListTests --list-tests > %t_list || true
// RUN: %{swiftc} %s -o %T/ListTests
// RUN: %T/ListTests --list-tests > %t_list || true
// RUN: %{xctest_checker} %t_list %s
// RUN: %{built_tests_dir}/ListTests --dump-tests-json > %t_json || true
// RUN: %{built_tests_dir}/ListTests --verify %t_json > %t_verify
// RUN: %T/ListTests --dump-tests-json > %t_json || true
// RUN: %T/ListTests --verify %t_json > %t_verify
// RUN: %{xctest_checker} %t_verify verify_json.expected

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/NegativeAccuracyTestCase/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/NegativeAccuracyTestCase
// RUN: %{built_tests_dir}/NegativeAccuracyTestCase > %t || true
// RUN: %{swiftc} %s -o %T/NegativeAccuracyTestCase
// RUN: %T/NegativeAccuracyTestCase > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Observation/All/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/All
// RUN: %{built_tests_dir}/All > %t || true
// RUN: %{swiftc} %s -o %T/All
// RUN: %T/All > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Observation/Selected/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Selected
// RUN: %{built_tests_dir}/Selected Selected.ExecutedTestCase/test_executed > %t || true
// RUN: %{swiftc} %s -o %T/Selected
// RUN: %T/Selected Selected.ExecutedTestCase/test_executed > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Performance/Misuse/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/PerformanceMisuse
// RUN: %{built_tests_dir}/PerformanceMisuse > %t || true
// RUN: %{swiftc} %s -o %T/PerformanceMisuse
// RUN: %T/PerformanceMisuse > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Performance/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/Performance
// RUN: %{built_tests_dir}/Performance > %t || true
// RUN: %{swiftc} %s -o %T/Performance
// RUN: %T/Performance > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/SelectedTest/main.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/SelectedTest
// RUN: %{built_tests_dir}/SelectedTest SelectedTest.ExecutedTestCase/test_foo > %T/one_test_case || true
// RUN: %{built_tests_dir}/SelectedTest SelectedTest.ExecutedTestCase > %T/one_test_case_class || true
// RUN: %{built_tests_dir}/SelectedTest > %T/all || true
// RUN: %{swiftc} %s -o %T/SelectedTest
// RUN: %T/SelectedTest SelectedTest.ExecutedTestCase/test_foo > %T/one_test_case || true
// RUN: %T/SelectedTest SelectedTest.ExecutedTestCase > %T/one_test_case_class || true
// RUN: %T/SelectedTest > %T/all || true
// RUN: %{xctest_checker} -p "// CHECK-METHOD:" %T/one_test_case %s
// RUN: %{xctest_checker} -p "// CHECK-CLASS:" %T/one_test_case_class %s
// RUN: %{xctest_checker} -p "// CHECK-ALL:" %T/all %s
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/SingleFailingTestCase/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/SingleFailingTestCase
// RUN: %{built_tests_dir}/SingleFailingTestCase > %t || true
// RUN: %{swiftc} %s -o %T/SingleFailingTestCase
// RUN: %T/SingleFailingTestCase > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/TestCaseLifecycle/main.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %{swiftc} %s -o %{built_tests_dir}/TestCaseLifecycle
// RUN: %{built_tests_dir}/TestCaseLifecycle > %t || true
// RUN: %{swiftc} %s -o %T/TestCaseLifecycle
// RUN: %T/TestCaseLifecycle > %t || true
// RUN: %{xctest_checker} %t %s

#if os(Linux) || os(FreeBSD)
Expand Down
5 changes: 0 additions & 5 deletions Tests/Functional/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ else:
# Having prepared the swiftc command, we set the substitution.
config.substitutions.append(('%{swiftc}', ' '.join(swift_exec)))

# Add the %built_tests_dir substitution, which is a temporary
# directory used to store built files.
built_tests_dir = tempfile.mkdtemp()
config.substitutions.append(('%{built_tests_dir}', built_tests_dir))

# Add the %xctest_checker substitution, which is a Python script
# can be used to compare the actual XCTest output to the expected
# output.
Expand Down