Skip to content

[test] Modify run-test to allow unified LLVM builds #28300

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 1 commit into from
Nov 20, 2019

Conversation

drodriguez
Copy link
Contributor

The unified LLVM builds use a slightly different structure than the
Swift standalone builds. Modify the run-test utility tool to allow using
it in both standalone and unified builds.

The current Windows building instructions (https://github.com/apple/swift/blob/master/docs/WindowsBuild.md) recommend an unified build, and run-test will not work for people using those instructions. The unified builds are also possible in Linux and other platforms, but the instructions there are using the build-script, which will perform standalone builds.

The unified LLVM builds use a slightly different structure than the
Swift standalone builds. Modify the run-test utility tool to allow using
it in both standalone and unified builds.
@drodriguez
Copy link
Contributor Author

@swift-ci please smoke test

@compnerd
Copy link
Member

I dont have any objections to this, just curious. Are there users of run-test currently?

@drodriguez
Copy link
Contributor Author

I do. I imagine that others that have modified the file over time also do. I don't think any infra uses it (and I don't think it is mentioned in any documentation, it is kind a secret). It is useful to me because you type less, you will never forget to recompile before running the tests, it is easier to filter tests out, uploads the artifacts to Android devices automatically, and some other niceties.

@compnerd
Copy link
Member

I guess the other question is, why not invert the flag? Make it true by default

@rintaro
Copy link
Member

rintaro commented Nov 17, 2019

I am also a heavy user of run-test. I have no objection to this as long as this doesn't change the default behaviors.

But Isn't it possible to auto-detect the unified build instead of manually specifying --unified option? I.e. if there's $build_dir/tools/test-$target can we say it is a unified build?

@drodriguez
Copy link
Contributor Author

Re: "Why not invert the flag?". Because most of the people use build-script, and build-script do not build unified at all. This allows people that were using run-test to keep going without any modifications to their workflows. If unified someday becomes the standard, we can consider inverting the flag.

Re "auto-detect the unified build": I would prefer to be explicit, but I can change it to autodetect if people prefer so (I hope my layout is the same as other people's layouts).

@drodriguez drodriguez merged commit e830660 into swiftlang:master Nov 20, 2019
@drodriguez drodriguez deleted the run-test-for-unified-builds branch November 20, 2019 21:49
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