Skip to content
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

Test: Merge IntegrationTests into Tests #8223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 0 additions & 25 deletions IntegrationTests/Package.swift

This file was deleted.

13 changes: 0 additions & 13 deletions IntegrationTests/README.md

This file was deleted.

12 changes: 12 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,18 @@ let package = Package(
name: "BuildTests",
dependencies: ["Build", "PackageModel", "Commands", "_InternalTestSupport"]
),
.testTarget(
name: "IntegrationTests",
dependencies: [
"swift-package-manager",
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
.product(name: "TSCTestSupport", package: "swift-tools-support-core"),
.target(name: "swift-build"),
.target(name: "swift-package"),
.target(name: "swift-run"),
.target(name: "swift-test")
]
),
.testTarget(
name: "LLBuildManifestTests",
dependencies: ["Basics", "LLBuildManifest", "_InternalTestSupport"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ final class XCBuildTests: XCTestCase {
XCTAssertFileExists(releasePath.appending(component: "bar"))
XCTAssertNoSuchPath(releasePath.appending(component: "cbar"))
}
}

func testExecutableProducts2() throws {
#if !os(macOS)
try XCTSkip("Test requires macOS")
#endif

fixture(name: "XCBuild/ExecutableProducts") { path in
let fooPath = path.appending(component: "Foo")
Expand All @@ -55,6 +61,12 @@ final class XCBuildTests: XCTestCase {
XCTAssertFileExists(releasePath.appending(component: "bar"))
XCTAssertNoSuchPath(releasePath.appending(component: "cbar"))
}
}

func testExecutableProducts3() throws {
#if !os(macOS)
try XCTSkip("Test requires macOS")
#endif

fixture(name: "XCBuild/ExecutableProducts") { path in
let fooPath = path.appending(component: "Foo")
Expand All @@ -74,6 +86,12 @@ final class XCBuildTests: XCTestCase {
XCTAssertNoSuchPath(releasePath.appending(component: "bar"))
XCTAssertNoSuchPath(releasePath.appending(component: "cbar"))
}
}

func testExecutableProducts4() throws {
#if !os(macOS)
try XCTSkip("Test requires macOS")
#endif

fixture(name: "XCBuild/ExecutableProducts") { path in
let fooPath = path.appending(component: "Foo")
Expand All @@ -93,6 +111,12 @@ final class XCBuildTests: XCTestCase {
XCTAssertFileExists(releasePath.appending(component: "bar"))
XCTAssertNoSuchPath(releasePath.appending(component: "cbar"))
}
}

func testExecutableProducts5() throws {
#if !os(macOS)
try XCTSkip("Test requires macOS")
#endif

fixture(name: "XCBuild/ExecutableProducts") { path in
let fooPath = path.appending(component: "Foo")
Expand Down
11 changes: 1 addition & 10 deletions Utilities/build-using-self
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ root_dir="$(cd ${__dir}/.. && pwd)"
cd "${root_dir}/"
echo "Current directory is ${PWD}"

CONFIGURATION=debug
CONFIGURATION=${CONFIGURATION:-debug}
export SWIFTCI_IS_SELF_HOSTED=1

# Ensure SDKROOT is configured
Expand All @@ -40,15 +40,6 @@ swift package update
swift build -c $CONFIGURATION
swift test -c $CONFIGURATION --parallel

# Run the integration tests with just built SwiftPM.
export SWIFTPM_BIN_DIR=$(swift build -c $CONFIGURATION --show-bin-path)
(
cd ${root_dir}/IntegrationTests
# Perform package update in order to get the latest commits for the dependencies.
swift package update
$SWIFTPM_BIN_DIR/swift-test --parallel
)

if [ "${host}" == "Darwin" ]; then
echo "Current working directory is ${PWD}"
echo "Bootstrapping with the XCBuild codepath..."
Expand Down
5 changes: 2 additions & 3 deletions Utilities/soundness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ for language in swift-or-c bash python; do
-o -path "./Sources/PackageSigning/embedded_resources.swift"
-o -path "./Examples/*"
-o -path "./Fixtures/*"
-o -path "./IntegrationTests/*"
-o -path "./Tests/ExtraTests/*"
-o -path "./Tests/PackageLoadingTests/Inputs/*"
)
Expand All @@ -91,7 +90,7 @@ for language in swift-or-c bash python; do
EOF
;;
bash)
exceptions=( -path "./Examples/*" -o -path "./Fixtures/*" -o -path "./IntegrationTests/*" -o -path "*/.build/*" )
exceptions=( -path "./Examples/*" -o -path "./Fixtures/*" -o -path "*/.build/*" )
matching_files=( -name '*.sh' )
cat > "$tmp" <<"EOF"
#!/bin/bash
Expand All @@ -109,7 +108,7 @@ EOF
EOF
;;
python)
exceptions=( -path "./Examples/*" -o -path "./Fixtures/*" -o -path "./IntegrationTests/*" -o -path "*/.build/*" )
exceptions=( -path "./Examples/*" -o -path "./Fixtures/*" -o -path "*/.build/*" )
matching_files=( -name '*.py' )
cat > "$tmp" <<"EOF"
#!/usr/bin/env python3
Expand Down
2 changes: 1 addition & 1 deletion Utilities/test-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test(args):
else:
cmd += ['%s=%s' % (key,value)]

integration_test_dir = os.path.join(args.project_root, "IntegrationTests")
integration_test_dir = os.path.join(args.project_root)
cmd += [
args.swift_test_path,
"--package-path", integration_test_dir,
Expand Down