Skip to content

Commit 9ab33e8

Browse files
crazy2beLaszloLango
authored andcommitted
Add some progress printing to the test262 tests (#2559)
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 [email protected]
1 parent afe2a80 commit 9ab33e8

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,26 @@ 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
69+
do
70+
if [[ $((NUM_LINES_GOTTEN % 100)) == 0 ]]
71+
then
72+
(>&2 echo -ne "\rExecuted approx ${NUM_LINES_GOTTEN} tests...")
73+
fi
74+
echo "$line"
75+
NUM_LINES_GOTTEN=$((NUM_LINES_GOTTEN + 1))
76+
done
77+
(>&2 echo)
78+
(>&2 echo)
79+
}
80+
6581
python2 "${PATH_TO_TEST262}"/tools/packaging/test262.py --command "${COMMAND}" \
6682
--tests="${PATH_TO_TEST262}" --summary \
67-
&> "${REPORT_PATH}"
83+
| progress_monitor > "${REPORT_PATH}"
84+
6885
TEST262_EXIT_CODE=$?
6986
if [ $TEST262_EXIT_CODE -ne 0 ]
7087
then

0 commit comments

Comments
 (0)