Skip to content

Add some progress printing to the test262 tests #2559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

crazy2be
Copy link
Contributor

@crazy2be crazy2be commented Oct 9, 2018

Previously, these would run for several minutes without printing
any progress. Now, at least print the number of tests executed.

@LaszloLango
Copy link
Contributor

I like this patch, but time to time we ran into the log limit on Travis CI. Fortunately it looks like this change does not reach the limit, because the bots are green. However it would be great to add a quiet option to easily turn off unnecessary logs when it is needed.

@akosthekiss
Copy link
Member

The commit is not properly signed, which makes the Travis CI fail. As long as the PR is red (i.e., some checks fail), it may get less attention from reviewers because they know that it will still certainly change. So, it's better to fix CI issues as early as possible.

@crazy2be crazy2be force-pushed the print-test262-progress branch from 1838b5d to a8f6872 Compare October 11, 2018 22:50
@crazy2be
Copy link
Contributor Author

@akosthekiss: Oops, my bad! I didn't realize the CI builds were failing, thanks for the heads up :).

@LaszloLango: If the logs become too long, you can also adjust the space between logs. Right now it is 100, which should print about 115 lines. If that became too many, you can make it 200, which would only print 58 lines. Otherwise I am not sure the best way to add such a quiet option to the bash script (do you already have such a system in place for other scripts?).

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to me after the style fixes

function progress_monitor() {
NUM_LINES_GOTTEN=0
(>&2 echo)
while read line; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style issue: put the do on separate line

while read line
do

NUM_LINES_GOTTEN=0
(>&2 echo)
while read line; do
if [[ $((NUM_LINES_GOTTEN % 100)) == 0 ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor style issue: put the then on a separate line

if [[ $((NUM_LINES_GOTTEN % 100)) == 0 ]]
then

(>&2 echo -ne "\rExecuted approx ${NUM_LINES_GOTTEN} tests...")
fi
echo "$line"
NUM_LINES_GOTTEN=$((NUM_LINES_GOTTEN+1))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing spaces around +:
NUM_LINES_GOTTEN=$((NUM_LINES_GOTTEN + 1))

@crazy2be crazy2be force-pushed the print-test262-progress branch from a8f6872 to 0efbcfd Compare October 12, 2018 15:56
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]
@crazy2be crazy2be force-pushed the print-test262-progress branch from 0efbcfd to 6eee0ab Compare October 12, 2018 16:53
Copy link
Member

@akosthekiss akosthekiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LaszloLango LaszloLango merged commit 9ab33e8 into jerryscript-project:master Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants