This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 99fd5fcbb5 HDDS-11801. Logs missing if kubernetes check fails before
tests (#7496)
99fd5fcbb5 is described below
commit 99fd5fcbb55cfed6d5d6b90420f44fcf4068a28d
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Fri Jan 3 13:51:22 2025 +0100
HDDS-11801. Logs missing if kubernetes check fails before tests (#7496)
---
hadoop-ozone/dist/src/main/k8s/examples/test-all.sh | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/hadoop-ozone/dist/src/main/k8s/examples/test-all.sh
b/hadoop-ozone/dist/src/main/k8s/examples/test-all.sh
index 5d866514be..6f72fc7e6c 100755
--- a/hadoop-ozone/dist/src/main/k8s/examples/test-all.sh
+++ b/hadoop-ozone/dist/src/main/k8s/examples/test-all.sh
@@ -15,14 +15,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -u -o pipefail
#
-# Test executor to test all the compose/*/test.sh test scripts.
+# Test executor to test all the k8s/examples/*/test.sh test scripts.
#
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )
-set -ex
-
ALL_RESULT_DIR="$SCRIPT_DIR/result"
rm "$ALL_RESULT_DIR"/* || true
mkdir -p "$ALL_RESULT_DIR"
@@ -35,15 +34,23 @@ for test in $(find "$SCRIPT_DIR" -name test.sh | grep
"${OZONE_TEST_SELECTOR:-""
TEST_NAME="$(basename "$TEST_DIR")"
echo ""
- echo "#### Executing tests of ${TEST_DIR} #####"
+ echo "#### Executing tests of ${TEST_NAME} #####"
echo ""
cd "$TEST_DIR" || continue
- ./test.sh
+ if ! ./test.sh; then
+ RESULT=1
+ echo "ERROR: Test execution of ${TEST_NAME} is FAILED!!!!"
+ fi
- cp "$TEST_DIR"/result/output.xml "$ALL_RESULT_DIR"/"${TEST_NAME}".xml
+ cp "$TEST_DIR"/result/output.xml "$ALL_RESULT_DIR"/"${TEST_NAME}".xml || true
mkdir -p "$ALL_RESULT_DIR"/"${TEST_NAME}"
- mv "$TEST_DIR"/logs/*log "$ALL_RESULT_DIR"/"${TEST_NAME}"/
+ mv "$TEST_DIR"/logs/*log "$ALL_RESULT_DIR"/"${TEST_NAME}"/ || true
+
+ if [[ "${RESULT}" == "1" ]] && [[ "${FAIL_FAST:-}" == "true" ]]; then
+ break
+ fi
done
rebot -N "smoketests" -d "$ALL_RESULT_DIR/" "$ALL_RESULT_DIR/*.xml"
+exit ${RESULT}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]