Add quiet mode for test runner(s) (#2228)

In one of the previous PR we have encountered a problem,
where the Travis cuts off the test execution
as the generated log file is too big.

By adding a quiet mode for the test runners, we will
only report the failing tests.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
Péter Gál
2018-03-02 02:18:17 +01:00
committed by yichoi
parent 575ec7e10a
commit 55058cf151
4 changed files with 34 additions and 11 deletions
+10 -3
View File
@@ -15,7 +15,7 @@
# limitations under the License.
# Usage:
# ./tools/runners/run-test-suite.sh ENGINE TESTS [--skip-list=item1,item2] [--snapshot] ENGINE_ARGS....
# ./tools/runners/run-test-suite.sh ENGINE TESTS [-q] [--skip-list=item1,item2] [--snapshot] ENGINE_ARGS....
TIMEOUT=${TIMEOUT:=5}
TIMEOUT_CMD=`which timeout`
@@ -37,6 +37,13 @@ TEST_FILES=$OUTPUT_DIR/$TESTS_BASENAME.files
TEST_FAILED=$OUTPUT_DIR/$TESTS_BASENAME.failed
TEST_PASSED=$OUTPUT_DIR/$TESTS_BASENAME.passed
VERBOSE=1
if [[ "$1" == "-q" ]]
then
unset VERBOSE
shift
fi
if [[ "$1" =~ ^--skip-list=.* ]]
then
SKIP_LIST=${1#--skip-list=}
@@ -147,7 +154,7 @@ do
if [ $status_code -eq 0 ]
then
echo "[$tested/$TOTAL] $cmd_line: PASS"
test $VERBOSE && echo "[$tested/$TOTAL] $cmd_line: PASS"
cmd_line="${ENGINE#$ROOT_DIR} $ENGINE_ARGS --exec-snapshot $SNAPSHOT_TEMP"
$TIMEOUT_CMD $TIMEOUT $ENGINE $ENGINE_ARGS --exec-snapshot $SNAPSHOT_TEMP &> $ENGINE_TEMP
@@ -175,7 +182,7 @@ do
failed=$((failed+1))
else
echo "[$tested/$TOTAL] $cmd_line: $PASS"
test $VERBOSE && echo "[$tested/$TOTAL] $cmd_line: $PASS"
echo "$test" >> $TEST_PASSED
+8 -1
View File
@@ -17,6 +17,13 @@
DIR="$1"
shift
VERBOSE=1
if [ "$1" == "-q" ]
then
unset VERBOSE
shift
fi
UNITTEST_ERROR=$DIR/unittests.failed
UNITTEST_OK=$DIR/unittests.passed
@@ -76,7 +83,7 @@ do
failed=$((failed+1))
else
echo "[$tested/$total] $cmd_line: PASS"
test $VERBOSE && echo "[$tested/$total] $cmd_line: PASS"
echo "$unit_test" >> $UNITTEST_OK