diff --git a/tests/integration/README.md b/tests/integration/README.md index c2384c9b1f..6a62faf676 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -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 diff --git a/tests/integration/integration_runner.sh b/tests/integration/integration_runner.sh index e4ef89c1ab..aaa25393f0 100755 --- a/tests/integration/integration_runner.sh +++ b/tests/integration/integration_runner.sh @@ -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" "$@"