mononoke: suggest not using buck run scm/mononoke/tests/integration:integration_runner -- TEST

Summary:
Since the integration tests depend on a whole lot of Mononoke binaries, running them through Buck requires a lot of rebuilding (since you need to rebuild each individual binary).

If you're iterating on something, it's probably worth taking the time to rebuild only what you need manually, and bypass Buck altogether. This adds a prompt to do so.

Reviewed By: farnz

Differential Revision: D15923140

fbshipit-source-id: 767ced5777a344cb637031e7a8bb1c571afe3a7c
This commit is contained in:
Thomas Orozco 2019-06-25 08:30:05 -07:00 committed by Facebook Github Bot
parent 196a363236
commit 0c9fe75c35
2 changed files with 31 additions and 4 deletions

View File

@ -14,8 +14,9 @@ Use:
buck run scm/mononoke/tests/integration:integration_runner -- TEST
```
But! Keep reading. There are better ways to run the tests if you're going to be
iterating on something.
But! Keep reading: there are faster ways to run the tests if you're going to be
iterating on something. You might as well read on while you wait for that build
to complete.
## Running Tests Incrementally: a better way

View File

@ -5,11 +5,37 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# This script is provided as a compatibility shim for those who want to run
# individual tests, using Buck:
#
# buck run scm/mononoke/tests/integration:integration_runner -- TEST
function protip() {
local real_runner real_manifest
real_runner="$(readlink "$1")"
real_manifest="$(readlink "$2")"
shift
shift
real_runner="$(readlink "$runner")"
real_manifest="$(readlink "$manifest")"
echo >&2
echo "======" >&2
echo "|| Pro tip: save time on your incremental test runs!" >&2
echo "|| Run this command instead:" >&2
echo "||" >&2
echo "|| $real_runner $real_manifest $*" >&2
echo "||" >&2
echo "|| Between test runs, manually rebuild only the binaries you care about using buck build." >&2
echo "|| Check out the README.md for integration tests to learn more." >&2
echo "======"
echo >&2
}
d="$BUCK_DEFAULT_RUNTIME_RESOURCES"
exec "${d}/integration_runner_real" "${d}/manifest.json" "$@"
runner="${d}/integration_runner_real"
manifest="${d}/manifest.json"
protip "$runner" "$manifest" "$@"
exec "$runner" "$manifest" "$@"