Compare commits

..

No commits in common. "bc798acffa1e7fa05ac1155c5c7bdcefe70892cc" and "aa0d489e886115466ac127a1ae5ab0fc567db019" have entirely different histories.

2 changed files with 18 additions and 29 deletions

View File

@ -1,3 +1,4 @@
isle version | grep -q 'Release:' version="$(isle version)"
isle version | grep -q 'Platform:' echo "$version" | grep -q 'Release:'
isle version | grep -q 'Build Platform:' echo "$version" | grep -q 'Platform:'
echo "$version" | grep -q 'Build Platform:'

View File

@ -15,41 +15,29 @@ done
# cd into script's directory # cd into script's directory
cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null
root=$(pwd)
TMPDIR="$(mktemp --tmpdir -d isle-tests.XXXXXX)" tmp="$(mktemp --tmpdir -d isle-tests.XXXXXX)"
trap 'rm -rf $TMPDIR' EXIT trap 'rm -rf $tmp' EXIT
export TMPDIR export TMPDIR="$tmp"
echo "tmp dir is $TMPDIR" echo "tmp dir is $TMPDIR"
test_files=$( echo -e '\nrunning all tests...\n'
find . -type f -name '*.sh' \
| sed "s|^\./||" \
| grep -v entrypoint.sh \
| sort -n\
)
echo -e "number of tests: $(echo "$test_files" | wc -l)\n" for file in $(find . -type f -name '*.sh' | grep -v entrypoint.sh | sort -n); do
for file in $test_files; do echo "running test $file"
echo "$file"
[ -z "$VERBOSE" ] && output="$TMPDIR/$file.log" || output=/dev/stdout [ -z "$VERBOSE" ] && output="$tmp/$file.log" || output=/dev/stdout
tmp="$TMPDIR/$file.tmp" if ! $SHELL -e -x "$file" >"$output" 2>&1; then
mkdir -p "$tmp" echo "TEST FAILED"
if ! (cd "$tmp" && TMPDIR="$tmp" $SHELL -e -x "$root/$file" >"$output" 2>&1); then
echo "$file FAILED"
if [ -z "$VERBOSE" ]; then
echo "output of test is as follows" echo "output of test is as follows"
echo "------------------------------" echo "------------------------------"
cat "$TMPDIR/$file.log" cat "$tmp/$file.log"
echo "------------------------------" echo "------------------------------"
fi
exit 1 exit 1
fi fi
done done
echo -e '\nall tests succeeded!' echo -e '\ntests succeeded!'