Skip to content

[test] Isolate build-script calls in skip-local-build.test-sh #37611

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
May 25, 2021

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented May 24, 2021

...and reenable llvm-targets-options.test (previously disabled in #37573).

This will align skip-local-build.test-sh with the behaviour of the
other BuildSystem tests, by

  • ensuring we use the cmake exposed in lit.cfg, so that under Linux we
    don't attempt to rebuild it
  • using a separate build folder for build-script invocations, so that
    side effects will not affect the main invocation and other lit tests.

I expect these changes to prevent llvm-targets-options.test to fail in Linux
presets with an error related to cmake, e.g.

build-script: error: argument --cmake: /home/buildnode/jenkins/workspace/
oss-swift-package-linux-ubuntu-18_04/build/cmake-linux-x86_64/bin/cmake is not an executable

Addresses rdar://78320684

@edymtt
Copy link
Contributor Author

edymtt commented May 24, 2021

@swift-ci please smoke test

@benlangmuir
Copy link
Contributor

@edymtt is there a way to test the original issue in PR? I assume regular testing didn't cover it or you would have caught it before merging. Change LGTM

@edymtt
Copy link
Contributor Author

edymtt commented May 24, 2021

@benlangmuir not at the moment, since I don't know why the permissions on that file changed in the first place -- in my investigation I was not able to reproduce this bug, even when running llvm-targets-options.test and skip-local-build.test-sh in parallel (the final cmake executable was never updated, only a bunch of intermediate files were)

So before introducing logic for a failure I don't fully understand, I preferred to focus first on reducing any chance for existing tests to rebuild CMake to narrow down the scope (and in part to leverage the scale on the CI should this reoccur)

edymtt added 2 commits May 24, 2021 20:13
This will align skip-local-build.test-sh with the behaviour of the
other BuildSystem tests, by

* ensuring we use the cmake exposed in lit.cfg, so that under Linux we
don't attempt to rebuild it
* using a separate build folder for build-script invocations, so that
side effects will not affect the main invocation and other lit tests.

I expect these changes to prevent llvm-targets-options.test to fail in
Linux presets with an error related to cmake, e.g.

```
build-script: error: argument --cmake:
/home/buildnode/jenkins/workspace/
oss-swift-package-linux-ubuntu-18_04/build/cmake-linux-x86_64/bin/cmake
is not an executable
```

Addresses rdar://78320684
This was previously disabled in swiftlang#37573.
@edymtt edymtt force-pushed the harden-skip-local-build-test-sh branch from 74223aa to d70b15d Compare May 24, 2021 20:15
@edymtt edymtt requested a review from porglezomp May 24, 2021 20:17
@edymtt
Copy link
Contributor Author

edymtt commented May 24, 2021

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented May 24, 2021

@swift-ci please smoke test macOS

@edymtt edymtt merged commit 06a2a71 into swiftlang:main May 25, 2021
@edymtt edymtt deleted the harden-skip-local-build-test-sh branch May 25, 2021 17:09
edymtt added a commit to edymtt/swift that referenced this pull request Aug 11, 2021
This will prevent the tests to rebuild CMake (especially under Linux)
and cause transient issues.

This is similar to what was done for swiftlang#37611
edymtt added a commit that referenced this pull request Aug 12, 2021
This will prevent the tests to rebuild CMake (especially under Linux)
and cause transient issues.

This is similar to what was done for #37611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants