Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly script #9221

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions etc/scripts/test-nightly.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/bin/bash
#
# Copyright (c) 2022, 2024 Oracle and/or its affiliates.
#
Expand All @@ -20,18 +20,18 @@ set -o errtrace || true # trace ERR through commands and functions
set -o errexit || true # exit the script if any statement returns a non-true return value

on_error(){
CODE="${?}" && \
set +x && \
printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \
"${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}"
CODE="${?}" && \
set +x && \
printf "[ERROR] Error(code=%s) occurred at %s:%s command: %s\n" \
"${CODE}" "${BASH_SOURCE[0]}" "${LINENO}" "${BASH_COMMAND}"
}
trap on_error ERR

# Path to this script
if [ -h "${0}" ] ; then
SCRIPT_PATH="$(readlink "${0}")"
SCRIPT_PATH="$(readlink "${0}")"
else
SCRIPT_PATH="${0}"
SCRIPT_PATH="${0}"
fi
readonly SCRIPT_PATH

Expand All @@ -40,19 +40,23 @@ readonly SCRIPT_PATH
WS_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; cd ../.. ; pwd -P)
readonly WS_DIR

readonly MODULES_TO_BUILD="\
microprofile/tests/tck/tck-fault-tolerance\
"
readonly MODULES=(
)

if [ ${#MODULES[*]} -eq 0 ]; then
echo "Modules list is empty"
exit 0
fi

cd "${WS_DIR}"

# Do priming build
mvn clean install -DskipTests
mvn -T8 clean install -DskipTests -Ptests

# Build/run tests
for M in ${MODULES_TO_BUILD}; do
cd "${WS_DIR}/${M}"
mvn clean install
for M in "${MODULES[@]}"; do
cd "${WS_DIR}/${M}"
mvn clean install
done

echo "Completed ${MODULES_TO_BUILD}"
echo "Completed ${MODULES[*]}"