Skip to content

tests: Test that an SDK can be rebuilt without cleaning up #79

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 2 commits into from
Jan 29, 2024

Conversation

euanh
Copy link
Contributor

@euanh euanh commented Jan 26, 2024

Since #68, rebuilding a RHEL SDK bundle has failed with the following error unless the bundle is first deleted:

Error: The file “lib64” couldn’t be saved in the folder “rhel-ubi9.sdk” because a file with the same name already exists.

This is because the condition check around the cleanup logic was inverted when the check was moved into LinuxRecipe.swift.

Before:

https://github.com/apple/swift-sdk-generator/blob/5428358a282d53e4d714b90c0348a293cca0038d/Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator%2BEntrypoint.swift#L51-L52

After:

https://github.com/apple/swift-sdk-generator/blob/b94744f2b3d89511145072d907a18c9ea6aa5578/Sources/SwiftSDKGenerator/SwiftSDKRecipes/LinuxRecipe.swift#L129-L130

This PR adds a test which tries to build an SDK twice without cleaning up in between.

@euanh
Copy link
Contributor Author

euanh commented Jan 26, 2024

@swift-ci test

@euanh
Copy link
Contributor Author

euanh commented Jan 26, 2024

First commit only adds the test, to verify it runs in CI and fails.

@euanh euanh force-pushed the fix-nonincremental-rebuilds branch from df7a2f8 to 15bb533 Compare January 26, 2024 15:57
@euanh
Copy link
Contributor Author

euanh commented Jan 26, 2024

@swift-ci test

@euanh
Copy link
Contributor Author

euanh commented Jan 26, 2024

CI isn't currently running tests - see #45.

@euanh euanh force-pushed the fix-nonincremental-rebuilds branch from 15bb533 to 0db79f6 Compare January 29, 2024 11:45
@euanh
Copy link
Contributor Author

euanh commented Jan 29, 2024

@swift-ci test

@euanh euanh force-pushed the fix-nonincremental-rebuilds branch from 0db79f6 to c5ccbe5 Compare January 29, 2024 14:36
@euanh
Copy link
Contributor Author

euanh commented Jan 29, 2024

@swift-ci test

@euanh euanh marked this pull request as ready for review January 29, 2024 15:13
@euanh euanh requested a review from MaxDesiatov as a code owner January 29, 2024 15:13
@euanh euanh added bug Something isn't working test suite Changes to generator's test suite labels Jan 29, 2024
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MaxDesiatov MaxDesiatov merged commit dadbc3e into swiftlang:main Jan 29, 2024
@euanh euanh deleted the fix-nonincremental-rebuilds branch January 30, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test suite Changes to generator's test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants