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

[SR-9963] Issues in swiftpm test suite while building Apple Swift 5 toolchain on PowerPC64LE #4877

Open
swift-ci opened this issue Feb 20, 2019 · 3 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-9963
Radar None
Original Reporter stamba (JIRA User)
Type Bug

Attachment: Download

Environment

PowerPC64LE

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 41ed1ce76e28d09ef5d90a4c4592ab9a

Issue Description:

Running the following tests for swiftpm test suite after building Apple Swift 5 toolchain on PowerPC64LE:-

[552/552] Testing WorkspaceTests.InitTests/testInitPackageExecutable

Test Suite 'Selected tests' started at 2019-02-19 12:55:59.632
Test Suite 'BuildPlanTests' started at 2019-02-19 12:55:59.634
Test Case 'BuildPlanTests.testBasicClangPackage' started at 2019-02-19 12:55:59.634
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:301: error: BuildPlanTests.testBasicClangPackage : XCTAssertEqual failed: ("["-target", "powerpc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=extlib", "-I", "/ExtPkg/Sources/extlib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") is not equal to ("["-target", "ppc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=extlib", "-I", "/ExtPkg/Sources/extlib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") -
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:318: error: BuildPlanTests.testBasicClangPackage : XCTAssertEqual failed: ("["-target", "powerpc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=exe", "-I", "/Pkg/Sources/exe/include", "-I", "/Pkg/Sources/lib/include", "-I", "/ExtPkg/Sources/extlib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") is not equal to ("["-target", "ppc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=exe", "-I", "/Pkg/Sources/exe/include", "-I", "/Pkg/Sources/lib/include", "-I", "/ExtPkg/Sources/extlib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") -
Test Case 'BuildPlanTests.testBasicClangPackage' failed (0.013 seconds)
Test Suite 'BuildPlanTests' failed at 2019-02-19 12:55:59.647
Executed 1 test, with 2 failures (0 unexpected) in 0.013 (0.013) seconds
Test Suite 'Selected tests' failed at 2019-02-19 12:55:59.647
Executed 1 test, with 2 failures (0 unexpected) in 0.013 (0.013) seconds

Test Suite 'Selected tests' started at 2019-02-19 12:55:59.660
Test Suite 'BuildPlanTests' started at 2019-02-19 12:55:59.662
Test Case 'BuildPlanTests.testClangTargets' started at 2019-02-19 12:55:59.662
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:859: error: BuildPlanTests.testClangTargets : XCTAssertEqual failed: ("["-target", "powerpc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=exe", "-I", "/Pkg/Sources/exe/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") is not equal to ("["-target", "ppc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=exe", "-I", "/Pkg/Sources/exe/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") -
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:868: error: BuildPlanTests.testClangTargets : XCTAssertEqual failed: ("["-target", "powerpc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=lib", "-I", "/Pkg/Sources/lib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") is not equal to ("["-target", "ppc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=lib", "-I", "/Pkg/Sources/lib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") -
Test Case 'BuildPlanTests.testClangTargets' failed (0.015 seconds)
Test Suite 'BuildPlanTests' failed at 2019-02-19 12:55:59.676
Executed 1 test, with 2 failures (0 unexpected) in 0.015 (0.015) seconds
Test Suite 'Selected tests' failed at 2019-02-19 12:55:59.676
Executed 1 test, with 2 failures (0 unexpected) in 0.015 (0.015) seconds

Test Suite 'Selected tests' started at 2019-02-19 12:55:59.835
Test Suite 'BuildPlanTests' started at 2019-02-19 12:55:59.836
Test Case 'BuildPlanTests.testPlatforms' started at 2019-02-19 12:55:59.836
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:1178: error: BuildPlanTests.testPlatforms : XCTAssertTrue failed - unexpected failure matching '["-target", "powerpc64le-unknown-linux", "-swift-version", "5", "-enable-batch-mode", "-Onone", "-g", "-enable-testing", "-j7", "-DSWIFT_PACKAGE", "-DDEBUG", "-module-cache-path", "/path/to/build/debug/ModuleCache"]' against pattern [TestSupport.StringPattern.equal("-target"), TestSupport.StringPattern.equal("ppc64le-unknown-linux"), TestSupport.StringPattern.anySequence]
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:1185: error: BuildPlanTests.testPlatforms : XCTAssertTrue failed - unexpected failure matching '["-target", "powerpc64le-unknown-linux", "-swift-version", "5", "-enable-batch-mode", "-Onone", "-g", "-enable-testing", "-j7", "-DSWIFT_PACKAGE", "-DDEBUG", "-module-cache-path", "/path/to/build/debug/ModuleCache"]' against pattern [TestSupport.StringPattern.equal("-target"), TestSupport.StringPattern.equal("ppc64le-unknown-linux"), TestSupport.StringPattern.anySequence]
Test Case 'BuildPlanTests.testPlatforms' failed (0.012 seconds)
Test Suite 'BuildPlanTests' failed at 2019-02-19 12:55:59.848
Executed 1 test, with 2 failures (0 unexpected) in 0.012 (0.012) seconds
Test Suite 'Selected tests' failed at 2019-02-19 12:55:59.848
Executed 1 test, with 2 failures (0 unexpected) in 0.012 (0.012) seconds

Test Suite 'Selected tests' started at 2019-02-19 12:55:59.855
Test Suite 'BuildPlanTests' started at 2019-02-19 12:55:59.857
Test Case 'BuildPlanTests.testSwiftCMixed' started at 2019-02-19 12:55:59.857
/home/sar/swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift:442: error: BuildPlanTests.testSwiftCMixed : XCTAssertEqual failed: ("["-target", "powerpc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=lib", "-I", "/Pkg/Sources/lib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") is not equal to ("["-target", "ppc64le-unknown-linux", "-g", "-O0", "-DSWIFT_PACKAGE=1", "-DDEBUG=1", "-fblocks", "-fmodules", "-fmodule-name=lib", "-I", "/Pkg/Sources/lib/include", "-fmodules-cache-path=/path/to/build/debug/ModuleCache"]") -
Test Case 'BuildPlanTests.testSwiftCMixed' failed (0.012 seconds)
Test Suite 'BuildPlanTests' failed at 2019-02-19 12:55:59.869
Executed 1 test, with 1 failure (0 unexpected) in 0.012 (0.012) seconds
Test Suite 'Selected tests' failed at 2019-02-19 12:55:59.869
Executed 1 test, with 1 failure (0 unexpected) in 0.012 (0.012) seconds
— bootstrap: error: tests failed with exit status 1
Building the standard library for: swift-stdlib-linux-powerpc64le
Running Swift tests for: check-swift-all-linux-powerpc64le check-swift-all-optimize-linux-powerpc64le
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

@belkadan
Copy link

If I recall correctly SwiftPM has its own set of platform/target-related code; if you haven't updated it to account for PowerPC64LE things might not work correctly.

@swift-ci
Copy link
Contributor Author

Comment by Sarvesh Tamba (JIRA)

Made following changes in the file "swift-source/swiftpm/Tests/BuildTests/BuildPlanTests.swift" to fix the failing swiftpm test cases:-

diff --git a/Tests/BuildTests/BuildPlanTests.swift b/Tests/BuildTests/BuildPlanTests.swift
index 1a08137..19f490f 100644

      • a/Tests/BuildTests/BuildPlanTests.swift
        +++ b/Tests/BuildTests/BuildPlanTests.swift
        @@ -28,7 +28,7 @@ import PackageLoading
        #elseif arch(i386)
        let defaultTargetTriple: String = "i386-unknown-linux"
        #elseif arch(powerpc64le)
        •  let defaultTargetTriple: String = "ppc64le-unknown-linux"  
          
        •  let defaultTargetTriple: String = "powerpc64le-unknown-linux"  
          
          #elseif arch(s390x)
          let defaultTargetTriple: String = "s390x-unknown-linux"
          #elseif arch(arm64)

However, errors are seen after downloading latest Swift master branch as mentioned in #SR-9969.

@swift-ci
Copy link
Contributor Author

Comment by Sarvesh Tamba (JIRA)

Filed bug at :- https://bugs.llvm.org/show_bug.cgi?id=41177

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants