The `.integration-test-helpers` script was sourced by `/etc/bash/bash.rc`.
However, the `$SCRIPTDIR` environment variable is set through `hack/make.sh`,
so will not be set when calling the `.integration-test-helpers` script directly.
Before this patch;
make BIND_DIR=. shell
...
bash: /make/.go-autogen: No such file or directory
After this patch, the warning is no longer printed
Also removed sourcing `.go-autogen` from test-integration and build-integration-test-binary,
as they already sourced `.integration-test-helpers` (which sources
`.go-autogen`).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -5,8 +5,10 @@ |
| 5 | 5 |
# |
| 6 | 6 |
# TESTFLAGS='-check.f DockerSuite.TestBuild*' ./hack/make.sh binary test-integration |
| 7 | 7 |
# |
| 8 |
- |
|
| 9 |
-source "$SCRIPTDIR/make/.go-autogen" |
|
| 8 |
+if [ -z $MAKEDIR ]; then |
|
| 9 |
+ export MAKEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
| 10 |
+fi |
|
| 11 |
+source "$MAKEDIR/.go-autogen" |
|
| 10 | 12 |
|
| 11 | 13 |
# Set defaults |
| 12 | 14 |
: ${TEST_REPEAT:=1}
|