spiegel-keyman/resources/build/test/builder-invalid-script.test.sh
Marc Durdin cd8121ef65 chore(common): builder scripts now use /resources/build/builder.inc.sh
Note: there is a bit of potential confusion about the difference between
/resources/builder.inc.sh (the full implementation for builder scripts),
and /resources/build/builder.inc.sh (the source script that builder
scripts should always use).

This allows us to make assumptions that will always be true for builder
scripts that may not be true for other scripts, such as setting base
folder.
2024-05-02 15:54:31 +07:00

27 lines
670 B
Bash
Executable file

#!/usr/bin/env bash
echo "Testing missing builder_describe"
./builder-invalid-script-1.test.sh
RES=$?
if [[ $RES -ne 1 ]]; then
echo "ERROR: expected builder-invalid-script-1.test.sh to exit with code 1 but instead got $RES"
exit 1
fi
echo "Testing missing builder_parse"
./builder-invalid-script-2.test.sh
RES=$?
if [[ $RES -ne 1 ]]; then
echo "ERROR: expected builder-invalid-script-2.test.sh to exit with code 1 but instead got $RES"
exit 2
fi
echo "Testing base case"
./builder-invalid-script-3.test.sh
RES=$?
if [[ $RES -ne 0 ]]; then
echo "ERROR: expected builder-invalid-script-3.test.sh to exit with code 0 but instead got $RES"
exit 3
fi
exit 0