Skip to content

Commit d205af7

Browse files
authored
Better error message if AJAVADIR cannot be determined
1 parent 8de2ef1 commit d205af7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

checker/bin-devel/wpi-plumelib/test-wpi-plumelib.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,12 @@ test_wpi_plume_lib() {
9898
more "$DLJC_OUT_DIR"/*
9999
# The string is printed by `tools/wpi.py` in the do_like_javac repository.
100100
AJAVADIR="$(sed -n 's/Directory for generated annotation files: \(.*\)$/\1/p' "$DLJC_OUT_DIR"/dljc-stdout-*)"
101-
echo "AJAVADIR=$AJAVADIR"
102-
find "$AJAVADIR" -type f -print0 | xargs -0 more
101+
if [ -z "$AJAVADIR" ]; then
102+
echo "AJAVADIR cannot be determined from $DLJC_OUT_DIR/dljc-stdout-* (printed immediately above)"
103+
else
104+
echo "AJAVADIR=$AJAVADIR"
105+
find "$AJAVADIR" -type f -print0 | xargs -0 more
106+
fi
103107
# Repeat the actual error, so it appears at the end of the continuous integration log.
104108
echo "Comparing $EXPECTED_FILE $ACTUAL_FILE in $(pwd)"
105109
diff -u expected.txt actual.txt

0 commit comments

Comments
 (0)