Skip to content

CMake & build-script: add a new tier of testing, "long tests" #2213

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
Apr 18, 2016

Conversation

gribozavr
Copy link
Contributor

@gribozavr gribozavr commented Apr 16, 2016

What's in this pull request?

We are adding a new tier of tests, "long tests", and moving SIL parsing tests into this tier.

  • The behavior of build-script -t is unchanged.
  • build-script -T continues to run primary and validation test suites, but without the long tests.
  • build-script --long-test runs just the long tests.
  • build-script -T --long-test runs all tests.

Tests:

$ ./utils/build-script -R
Building the standard library for: swift-test-stdlib-macosx-x86_64

$ ./utils/build-script -Rt
Building the standard library for: swift-test-stdlib-macosx-x86_64
Running Swift tests for: check-swift-macosx-x86_64

$ ./utils/build-script -RT
Building the standard library for: swift-stdlib-macosx-x86_64
Running Swift tests for: check-swift-validation-macosx-x86_64

$ ./utils/build-script -R --long-test
Building the standard library for: swift-test-stdlib-macosx-x86_64
Running Swift tests for: check-swift-only_long-macosx-x86_64

$ ./utils/build-script -RT --long-test
Building the standard library for: swift-stdlib-macosx-x86_64
Running Swift tests for: check-swift-all-macosx-x86_64

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@gribozavr
Copy link
Contributor Author

@swift-ci Please test

@gribozavr
Copy link
Contributor Author

@shahmishal @modocache Would you mind reviewing?


test=0
validation-test=0
long-test=1
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need =1 here, so this should just be long-test. It may not seem like a big deal, but migrating build-script-impl arguments like this to Python ends up being tricky--Python's argparse does not allow numerical values for boolean command-line arguments. For more details, see #1745.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh! I see you've addressed this concern in the argument parser directly, with argparse_bool. Thanks for that!! 💯

@gottesmm
Copy link
Contributor

For those who are just listening in, this change should significantly speed up all of our testing. The justification for this change is that these tests are mainly meant to ensure that when frontend engineers change the AST that we can always parse the stdlib.

In terms of getting this information, running these tests once a day should provide the coverage that we need given the amount of times that this type of issues happens.

As a huge benefit all of our normal testing should speed up significantly including the smoke tests. IIRC 1/3 - 1/2 of the smoke test testing time (ignoring building time) is related to running these tests.

@gottesmm
Copy link
Contributor

(What I am trying to say is @gribozavr, go get em!) = ).

@modocache
Copy link
Contributor

LGTM, thanks @gribozavr! It looks like this will turn off long_test by default, which I imagine will speed up all of the CI jobs as an immediate result. @shahmishal, are you planning on running long_test periodically?

Aside: could we run package tests at the same frequency as long_test? It's my understanding that those are also very time-consuming (please let me know if I'm mistaken).

@gottesmm
Copy link
Contributor

@modocache On the test frequency, see my post above.

* The behavior of `build-script -t` is unchanged.

* `build-script -T` continues to run primary and validation test suite,
  but without the long tests.

* `build-script --long-test` runs just the long tests.

* `build-script -T --long-test` runs all tests.
@gribozavr gribozavr force-pushed the build-script-long-tests branch from 210bda7 to 457f2b9 Compare April 16, 2016 21:04
@gribozavr
Copy link
Contributor Author

@modocache Thank you for the review!

We are planning on setting up a buildbot for master that runs long tests. I also enabled long tests in the presets that are used to produce packages (just pushed this change).

@gribozavr
Copy link
Contributor Author

@swift-ci Please test

@shahmishal shahmishal merged commit 039331c into master Apr 18, 2016
@shahmishal shahmishal deleted the build-script-long-tests branch April 18, 2016 20:04
gribozavr added a commit that referenced this pull request Apr 19, 2016
This fixes a regression from PR #2213.

We needed a way to disable testing in a preset, even though previous
flags already requested tests.  So I added an argument to the '--test'
and '--validation-test' flags.  The argparse module treats '-T' and
'--validation-test' the same, so it thinks that in -RTi the 'i' is an
argument to '-T'.
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.

5 participants