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

Tests: Support running only a subset of the test suites #1021

Merged
merged 1 commit into from Jul 28, 2020

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Jul 28, 2020

Previously make test ran all unit test suites against all stacks, which would take up to an hour locally. This could be sped up by using one of the stack-specific targets (such as make test-heroku-18), however there was still no way to only run one of the test suites.

Now make test can be controlled more precisely using optional STACK and TEST_CMD arguments, eg:

make test STACK=heroku-16 TEST_CMD=test/versions

Travis has now been made to use this feature, which unblocks future Travis speedups (such as splitting the jobs up further in #1018) and means on Travis the correct Docker image is now used (see #958).

The tests.sh script has been removed since it's unused after #839 and redundant given the make targets.

Fixes #958.
Fixes #1020.

[skip changelog]

@edmorley edmorley self-assigned this Jul 28, 2020
Before `make test` ran all unit test suites against all stacks, which
would take up to an hour locally. This could be sped up by using one of
the stack-specific targets (such as `make test-heroku-18`), however
there was still no way to only run one of the test suites.

Now `make test` can be controlled more precisely using optional `STACK`
and `TEST_CMD` arguments, eg:

`make test STACK=heroku-16 TEST_CMD=test/versions`

Travis has now been made to use this feature, which unblocks future
Travis speedups (such as splitting the jobs up further in #1018) and
means on Travis the correct Docker image is now used.

The `tests.sh` script has been removed since it's unused after #839 and
redundant given the make targets.

Fixes #958.
Fixes #1020.
@edmorley edmorley marked this pull request as ready for review July 28, 2020 13:46
@edmorley edmorley requested a review from a team as a code owner July 28, 2020 13:46
@edmorley edmorley merged commit 93a5b40 into master Jul 28, 2020
@edmorley edmorley deleted the testing-make-targets branch July 28, 2020 14:08
edmorley added a commit that referenced this pull request Jul 28, 2020
This change (along with #1021, which skips an unnecessary docker build)
reduces the wall clock time from ~22 minutes to 5-6 minutes. Even with
the additional overhead from increased parallelism, the combined job
duration (~50 minutes) has not increased due to the other time savings.

Changes:

- for the unit tests, each stack is now tested in its own job and so
  tested in parallel
- the use of Travis stages has been removed, since by design it blocks
  later tasks on earlier stages having completed - reducing parallelism
  unnecessarily for this use case
- all jobs except for the Hatchet job now use Travis' `minimal` image,
  and no longer install redundant Ruby + bundler
- the `sudo: {required,false}` references have been removed, since
  Travis no longer supports its non-sudo container infrastructure so
  ignores that option

Fixes #1019.

[skip changelog]
edmorley added a commit that referenced this pull request Jul 28, 2020
This change (along with #1021, which skips an unnecessary docker build)
reduces the wall clock time from ~22 minutes to ~6 minutes. Even with
the additional overhead from increased parallelism, the combined job
duration (~50 minutes) has not increased due to the other time savings.

Changes:

- for the unit tests, each stack is now tested in its own job and so
  tested in parallel
- the use of Travis stages has been removed, since by design it blocks
  later tasks on earlier stages having completed - reducing parallelism
  unnecessarily for this use case
- all jobs except for the Hatchet job now use Travis' `minimal` image,
  and no longer install redundant Ruby + bundler
- the `sudo: {required,false}` references have been removed, since
  Travis no longer supports its non-sudo container infrastructure so
  ignores that option

Fixes #1018.

[skip changelog]
dryan pushed a commit to dryan/heroku-buildpack-python that referenced this pull request Nov 19, 2020
Previously `make test` ran all unit test suites against all stacks, which
would take up to an hour locally. This could be sped up by using one of
the stack-specific targets (such as `make test-heroku-18`), however
there was still no way to only run one of the test suites.

Now `make test` can be controlled more precisely using optional `STACK`
and `TEST_CMD` arguments, eg:

`make test STACK=heroku-16 TEST_CMD=test/versions`

Travis has now been made to use this feature, which unblocks future
Travis speedups (such as splitting the jobs up further in heroku#1018) and
means on Travis the correct Docker image is now used (see heroku#958).

The `tests.sh` script has been removed since it's unused after heroku#839 and
redundant given the make targets.

Fixes heroku#958.
Fixes heroku#1020.
dryan pushed a commit to dryan/heroku-buildpack-python that referenced this pull request Nov 19, 2020
This change (along with heroku#1021, which skips an unnecessary docker build)
reduces the wall clock time from ~22 minutes to ~6 minutes. Even with
the additional overhead from increased parallelism, the combined job
duration (~50 minutes) has not increased due to the other time savings.

Changes:

- for the unit tests, each stack is now tested in its own job and so
  tested in parallel
- the use of Travis stages has been removed, since by design it blocks
  later tasks on earlier stages having completed - reducing parallelism
  unnecessarily for this use case
- all jobs except for the Hatchet job now use Travis' `minimal` image,
  and no longer install redundant Ruby + bundler
- the `sudo: {required,false}` references have been removed, since
  Travis no longer supports its non-sudo container infrastructure so
  ignores that option

Fixes heroku#1018.

[skip changelog]
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.

Make it easier to run a subset of the buildpack unit tests locally Travis run uses wrong images to run tests
2 participants