3 read -rd "\000" helpmessage <<EOF
4 $(basename $0): Orchestrate run-build-packages.sh for every target
7 WORKSPACE=/path/to/arvados $(basename $0) [options]
12 Build command to execute (default: use built-in Docker image command)
14 Run package install tests
16 Output debug information (default: false)
18 WORKSPACE=path Path to the Arvados source tree to build packages from
22 if ! [[ -n "$WORKSPACE" ]]; then
23 echo >&2 "$helpmessage"
25 echo >&2 "Error: WORKSPACE environment variable not set"
30 if ! [[ -d "$WORKSPACE" ]]; then
31 echo >&2 "$helpmessage"
33 echo >&2 "Error: $WORKSPACE is not a directory"
40 PARSEDOPTS=$(getopt --name "$0" --longoptions \
41 help,test-packages,debug,command:,only-test: \
52 eval set -- "$PARSEDOPTS"
53 while [ $# -gt 0 ]; do
56 echo >&2 "$helpmessage"
67 TEST_PACKAGES="--test-packages"
70 ONLY_TEST="$1 $2"; shift
74 echo >&2 "$0: unrecognized argument '$2'. Try: $0 --help"
86 for dockerfile_path in $(find -name Dockerfile); do
87 if ./run-build-packages-one-target.sh --target "$(basename $(dirname "$dockerfile_path"))" --command "$COMMAND" $DEBUG $TEST_PACKAGES $ONLY_TEST ; then
94 if test $FINAL_EXITCODE != 0 ; then
95 echo "Build packages failed with code $FINAL_EXITCODE" >&2