hack/make/test-integration-cli: introduce MAKEDIR variable

- every execution of dirname costs time
- less repeating

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 6533cb973f6bab672018148fd6a67644580cc61f
Component: engine
This commit is contained in:
Jörg Thalheim
2015-04-14 18:43:33 +02:00
parent 438e1a9b5d
commit 64b904ff2d
17 changed files with 27 additions and 26 deletions

View File

@ -39,12 +39,12 @@ bundle_test_unit() {
mkdir -p "$HOME/.parallel"
touch "$HOME/.parallel/ignored_vars"
echo "$TESTDIRS" | parallel --jobs "$PARALLEL_JOBS" --env _ "$(dirname "$BASH_SOURCE")/.go-compile-test-dir"
echo "$TESTDIRS" | parallel --jobs "$PARALLEL_JOBS" --env _ "${MAKEDIR}/.go-compile-test-dir"
rm -rf "$HOME"
else
# aww, no "parallel" available - fall back to boring
for test_dir in $TESTDIRS; do
"$(dirname "$BASH_SOURCE")/.go-compile-test-dir" "$test_dir" || true
"${MAKEDIR}/.go-compile-test-dir" "$test_dir" || true
# don't let one directory that fails to build tank _all_ our tests!
done
fi