Skip to content

Commit a8f6872

Browse files
committed
Add some progress printing to the test262 tests
Previously, these would run for several minutes without printing any progress. Now, at least print the number of tests executed. JerryScript-DCO-1.0-Signed-off-by: crazy2be crazy1be@gmail.com
1 parent afe2a80 commit a8f6872

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tools/runners/run-test-suite-test262.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,24 @@ rm -f "${PATH_TO_TEST262}/test/suite/ch15/15.9/15.9.3/S15.9.3.1_A5_T6.js"
6262

6363
echo "Starting test262 testing for ${ENGINE}. Running test262 may take a several minutes."
6464

65+
function progress_monitor() {
66+
NUM_LINES_GOTTEN=0
67+
(>&2 echo)
68+
while read line; do
69+
if [[ $((NUM_LINES_GOTTEN % 100)) == 0 ]]; then
70+
(>&2 echo -ne "\rExecuted approx ${NUM_LINES_GOTTEN} tests...")
71+
fi
72+
echo "$line"
73+
NUM_LINES_GOTTEN=$((NUM_LINES_GOTTEN+1))
74+
done
75+
(>&2 echo)
76+
(>&2 echo)
77+
}
78+
6579
python2 "${PATH_TO_TEST262}"/tools/packaging/test262.py --command "${COMMAND}" \
6680
--tests="${PATH_TO_TEST262}" --summary \
67-
&> "${REPORT_PATH}"
81+
| progress_monitor > "${REPORT_PATH}"
82+
6883
TEST262_EXIT_CODE=$?
6984
if [ $TEST262_EXIT_CODE -ne 0 ]
7085
then

0 commit comments

Comments
 (0)