pretty test output, and test stdout written to temporary file
This commit is contained in:
parent
35eb7c4605
commit
a70f1f6033
20
urchin
20
urchin
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
recurse() {
|
recurse() {
|
||||||
potential_test="$1"
|
potential_test="$1"
|
||||||
@ -14,17 +14,21 @@ recurse() {
|
|||||||
)
|
)
|
||||||
elif [ -x "$potential_test" ]
|
elif [ -x "$potential_test" ]
|
||||||
then
|
then
|
||||||
./"$potential_test"
|
#stdout_file=$(mktemp)
|
||||||
|
stdout_file=/tmp/urchin_stdout
|
||||||
|
./"$potential_test" > $stdout_file
|
||||||
if [ "$?" = '0' ]
|
if [ "$?" = '0' ]
|
||||||
then
|
then
|
||||||
# Print a '.'
|
# Print a '✓'
|
||||||
echo -n .
|
echo -ne '\033[32m✓ \033[0m'
|
||||||
|
echo "${potential_test}"
|
||||||
else
|
else
|
||||||
# Print a red 'F'
|
# Print a red '✗'
|
||||||
echo -ne '\033[31mF'
|
echo -ne '\033[31m✗ \033[0m'
|
||||||
echo -n "(${potential_test})"
|
echo "${potential_test}"
|
||||||
echo -ne "\033[0m"
|
cat $stdout_file
|
||||||
fi
|
fi
|
||||||
|
rm $stdout_file
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user