Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

gb/test: scale test improvements #437

Merged
merged 2 commits into from
Nov 3, 2015
Merged

gb/test: scale test improvements #437

merged 2 commits into from
Nov 3, 2015

Conversation

davecheney
Copy link
Contributor

  • gb test now removes the _test/testmain file immediately after executing to
    reclaim space faster.
  • build all dependencies immediately, but arrange for linking _test/testmain
    to occur sequentially with execution, so that linking and execution are run
    in the same executor, this prevents multiple testmains being built on disk
    before being run.

Not exactly like the go tool, which enforced absolute ordering
between tests. We just try to kick of tests in alpha order, so
pkg a will start testing before pkg z.
* gb test now removes the _test/testmain file immediately after executing to
  reclaim space faster.
* build all dependencies immediately, but arrange for linking _test/testmain
  to occur sequentially with execution, so that linking and execution are run
  in the same executor, this prevents multiple testmains being built on disk
  before being run.
davecheney added a commit that referenced this pull request Nov 3, 2015
@davecheney davecheney merged commit 33c6e57 into master Nov 3, 2015
@davecheney davecheney deleted the gb-test-improvements branch November 3, 2015 07:34
@davecheney
Copy link
Contributor Author

With this branch, I can now run all the juju tests, previously it would consume several gb of /tmp (tmpfs) queuing up our enormous test binaries.

The fact that juju's test binaries are 40mb big is a problem, but that shouldn't stop gb from running the tests.

davecheney added a commit that referenced this pull request Nov 8, 2015
Fixes #440

Prior to #437 the name of the package under compile or test would be
printed *before* the operation started. This was a problem, because the
compilation output could occur later, and not line up with the package
name.

After #437, package name output was surpressed until the compile/test
action completed successfully. This helped improve the output for tests
but as the overall action, the print would never occur, only the output
to stdout from the child process.

This PR solves the problem at the source by delegating the responsibility
for printing the name of the package before any child output. If all
actions complete, then the final action in the set will print the name
of the package.

As it is now unused, `context.run` has been removed.

TODO:

- [ ] decide if the output should go to stderr, not stdout
- [ ] decide if we should include a # prefix as the go tool does
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant