From 315444aade6d9d0af5fccc6ae1de9c87366cb321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Mon, 3 Jun 2019 08:07:07 +0200 Subject: [PATCH 1/2] HDDS-1628. Fix the execution and return code of smoketest executor shell script. Contributed by Elek, Marton. --- hadoop-ozone/dev-support/checks/acceptance.sh | 3 ++- hadoop-ozone/dist/src/main/compose/test-all.sh | 2 +- hadoop-ozone/dist/src/main/smoketest/test.sh | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hadoop-ozone/dev-support/checks/acceptance.sh b/hadoop-ozone/dev-support/checks/acceptance.sh index 0a4c5d6f6fe00..3e50bedd49599 100755 --- a/hadoop-ozone/dev-support/checks/acceptance.sh +++ b/hadoop-ozone/dev-support/checks/acceptance.sh @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" export HADOOP_VERSION=3 -hadoop-ozone/dist/target/ozone-*-SNAPSHOT/smoketest/test.sh +$DIR/../../../hadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/test-all.sh exit $? diff --git a/hadoop-ozone/dist/src/main/compose/test-all.sh b/hadoop-ozone/dist/src/main/compose/test-all.sh index 225acecd4705c..a17ef4d83e7c1 100755 --- a/hadoop-ozone/dist/src/main/compose/test-all.sh +++ b/hadoop-ozone/dist/src/main/compose/test-all.sh @@ -34,7 +34,7 @@ for test in $(find $SCRIPT_DIR -name test.sh); do #required to read the .env file from the right location cd "$(dirname "$test")" || continue - $test + ./test.sh ret=$? if [[ $ret -ne 0 ]]; then RESULT=-1 diff --git a/hadoop-ozone/dist/src/main/smoketest/test.sh b/hadoop-ozone/dist/src/main/smoketest/test.sh index b2cdfc31bc828..e0a26b0793002 100755 --- a/hadoop-ozone/dist/src/main/smoketest/test.sh +++ b/hadoop-ozone/dist/src/main/smoketest/test.sh @@ -23,5 +23,6 @@ REPLACEMENT="$DIR/../compose/test-all.sh" echo "THIS SCRIPT IS DEPRECATED. Please use $REPLACEMENT instead." ${REPLACEMENT} - +RESULT=$? cp -r "$DIR/../compose/result" "$DIR" +exit $RESULT From 674779dfd4869c942aa7c91283757e459381baac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Elek?= Date: Wed, 5 Jun 2019 14:00:59 +0200 Subject: [PATCH 2/2] shellcheck fix --- hadoop-ozone/dev-support/checks/acceptance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-ozone/dev-support/checks/acceptance.sh b/hadoop-ozone/dev-support/checks/acceptance.sh index 3e50bedd49599..8de920ff9e556 100755 --- a/hadoop-ozone/dev-support/checks/acceptance.sh +++ b/hadoop-ozone/dev-support/checks/acceptance.sh @@ -15,5 +15,5 @@ # limitations under the License. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" export HADOOP_VERSION=3 -$DIR/../../../hadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/test-all.sh +"$DIR/../../../hadoop-ozone/dist/target/ozone-*-SNAPSHOT/compose/test-all.sh" exit $?