Skip to content

Commit 1bbff87

Browse files
committed
ci: allow early stop
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent ab4b688 commit 1bbff87

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

flow/test/test_helper.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ cd "$(dirname "$(readlink -f "$0")")/../"
88
DESIGN_NAME=${1:-gcd}
99
PLATFORM=${2:-nangate45}
1010
CONFIG_MK=${3:-config.mk}
11-
if [ $# -eq 4 ]; then
11+
if [ $# -ge 4 ]; then
1212
FLOW_VARIANT=$4
1313
fi
14+
TARGET=${5:-'finish metadata'}
1415
DESIGN_CONFIG=./designs/$PLATFORM/$DESIGN_NAME/$CONFIG_MK
1516
LOG_FILE=./logs/$PLATFORM/$DESIGN_NAME.log
1617
mkdir -p "./logs/$PLATFORM"
@@ -26,12 +27,16 @@ $__make clean_all clean_metadata 2>&1 | tee "$LOG_FILE"
2627
# turn off abort on error so we can always capture the result
2728
set +e
2829

29-
$__make finish metadata 2>&1 | tee -a "$LOG_FILE"
30+
$__make "${TARGET}" 2>&1 | tee -a "$LOG_FILE"
3031

3132
# Save the return code to return as the overall status after we package
3233
# the results
3334
ret=$?
3435

36+
if [ "${TARGET}" != "finish metadata" ]; then
37+
exit $ret
38+
fi
39+
3540
if [ -z "${PRIVATE_DIR+x}" ]; then
3641
PRIVATE_DIR="../../private_tool_scripts"
3742
fi

0 commit comments

Comments
 (0)