diff --git a/hadoop-ozone/dist/src/main/compose/failing1/.env b/hadoop-ozone/dist/src/main/compose/failing1/.env new file mode 120000 index 000000000000..c9b103fa52e1 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing1/.env @@ -0,0 +1 @@ +../ozone/.env \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing1/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/failing1/docker-compose.yaml new file mode 120000 index 000000000000..76acad508c42 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing1/docker-compose.yaml @@ -0,0 +1 @@ +../ozone/docker-compose.yaml \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing1/docker-config b/hadoop-ozone/dist/src/main/compose/failing1/docker-config new file mode 120000 index 000000000000..49694527f1bd --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing1/docker-config @@ -0,0 +1 @@ +../ozone/docker-config \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing1/test.sh b/hadoop-ozone/dist/src/main/compose/failing1/test.sh new file mode 100755 index 000000000000..cb8687f6a4b6 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing1/test.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +#suite:failing + +COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +export COMPOSE_DIR + +export SECURITY_ENABLED=false +export OZONE_REPLICATION_FACTOR=3 + +# shellcheck source=/dev/null +source "$COMPOSE_DIR/../testlib.sh" + +start_docker_env + +execute_robot_test scm failing/test1.robot +execute_robot_test scm failing/test2.robot + +stop_docker_env + +generate_report diff --git a/hadoop-ozone/dist/src/main/compose/failing2/.env b/hadoop-ozone/dist/src/main/compose/failing2/.env new file mode 120000 index 000000000000..c9b103fa52e1 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing2/.env @@ -0,0 +1 @@ +../ozone/.env \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing2/docker-compose.yaml b/hadoop-ozone/dist/src/main/compose/failing2/docker-compose.yaml new file mode 120000 index 000000000000..76acad508c42 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing2/docker-compose.yaml @@ -0,0 +1 @@ +../ozone/docker-compose.yaml \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing2/docker-config b/hadoop-ozone/dist/src/main/compose/failing2/docker-config new file mode 120000 index 000000000000..49694527f1bd --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing2/docker-config @@ -0,0 +1 @@ +../ozone/docker-config \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/compose/failing2/test.sh b/hadoop-ozone/dist/src/main/compose/failing2/test.sh new file mode 100755 index 000000000000..cb8687f6a4b6 --- /dev/null +++ b/hadoop-ozone/dist/src/main/compose/failing2/test.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +#suite:failing + +COMPOSE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +export COMPOSE_DIR + +export SECURITY_ENABLED=false +export OZONE_REPLICATION_FACTOR=3 + +# shellcheck source=/dev/null +source "$COMPOSE_DIR/../testlib.sh" + +start_docker_env + +execute_robot_test scm failing/test1.robot +execute_robot_test scm failing/test2.robot + +stop_docker_env + +generate_report diff --git a/hadoop-ozone/dist/src/main/compose/test-all.sh b/hadoop-ozone/dist/src/main/compose/test-all.sh index 15e268867bf1..1fdc0ffcbb83 100755 --- a/hadoop-ozone/dist/src/main/compose/test-all.sh +++ b/hadoop-ozone/dist/src/main/compose/test-all.sh @@ -43,8 +43,10 @@ for t in ${tests}; do #required to read the .env file from the right location cd "${d}" || continue + set +e ./test.sh ret=$? + set -e if [[ $ret -ne 0 ]]; then RESULT=1 echo "ERROR: Test execution of ${d} is FAILED!!!!" @@ -52,12 +54,12 @@ for t in ${tests}; do cd "$SCRIPT_DIR" RESULT_DIR="${d}/result" TEST_DIR_NAME=$(basename ${d}) - rebot -N $TEST_DIR_NAME -o "$ALL_RESULT_DIR"/$TEST_DIR_NAME.xml "$RESULT_DIR"/"*.xml" + rebot --nostatusrc -N $TEST_DIR_NAME -o "$ALL_RESULT_DIR"/$TEST_DIR_NAME.xml "$RESULT_DIR"/"*.xml" cp "$RESULT_DIR"/docker-*.log "$ALL_RESULT_DIR"/ cp "$RESULT_DIR"/*.out* "$ALL_RESULT_DIR"/ || true done -rebot -N acceptance -d "$ALL_RESULT_DIR" "$ALL_RESULT_DIR"/*.xml +rebot --nostatusrc -N acceptance -d "$ALL_RESULT_DIR" "$ALL_RESULT_DIR"/*.xml if [ "$OZONE_WITH_COVERAGE" ]; then pkill -f JacocoServer diff --git a/hadoop-ozone/dist/src/main/smoketest/failing/test1.robot b/hadoop-ozone/dist/src/main/smoketest/failing/test1.robot new file mode 100644 index 000000000000..c1602496c8eb --- /dev/null +++ b/hadoop-ozone/dist/src/main/smoketest/failing/test1.robot @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +*** Settings *** +Documentation This test always fails + +*** Test Cases *** +Failure 1 + Fail diff --git a/hadoop-ozone/dist/src/main/smoketest/failing/test2.robot b/hadoop-ozone/dist/src/main/smoketest/failing/test2.robot new file mode 100644 index 000000000000..d161ffe4bf6d --- /dev/null +++ b/hadoop-ozone/dist/src/main/smoketest/failing/test2.robot @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +*** Settings *** +Documentation This test always fails + +*** Test Cases *** +Failure 2 + Fail