// swift-tools-version:6.0 // Trivial test for importing Swift Testing. // // REQUIRES: platform=Linux // // Make a sandbox dir. // RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir/tool // RUN: cp %s %t.dir/tool/Package.swift // RUN: cp %S/Tests.swift %t.dir/tool/Tests.swift // RUN: %{swift-build} --build-tests --package-path %t.dir/tool -v 2>&1 | tee %t.build-log // // Check the build log. // // RUN: %{FileCheck} --check-prefix CHECK-BUILD-LOG --input-file %t.build-log %s // // CHECK-BUILD-LOG: swiftc{{.*}} -module-name tool // // Verify that the tool exists and works. // // RUN: test -x %t.dir/tool/.build/debug/toolPackageTests.xctest // RUN: %t.dir/tool/.build/debug/toolPackageTests.xctest --testing-library swift-testing > %t.out // RUN: %{FileCheck} --check-prefix CHECK-TOOL-OUTPUT --input-file %t.out %s // // CHECK-TOOL-OUTPUT: HI import PackageDescription let package = Package( name: "tool", targets: [ .testTarget(name: "tool", path: "./"), ] )