Skip to content
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

Linux/macOS CI remove excess logging, improve remaining output + other tidyup #6559

Merged
merged 1 commit into from
Dec 30, 2020

Conversation

rhuanjl
Copy link
Collaborator

@rhuanjl rhuanjl commented Dec 28, 2020

Improve runtests.py

  • remove unnecessary logfile
  • print a welcome message saying that the tests are being run and how many threads are being used
  • don't print individual test passes by default (add show-passes flag for printing these if wanted)
  • don't print "Running interpreted variant" twice
  • print results for a set of tests including time taken before beginning the next set
  • other formatting improvements
  • remove defunct logic and switches related to ChakraFull

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 29, 2020

The macOS debug build wasn't any faster so maybe this change isn't worth it - though will be good to see how long the other ones take.

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 29, 2020

Whilst the macOS debug build was unchanged. the other builds did seem to be a little faster - 50/50 if this should be merged.

@rhuanjl rhuanjl mentioned this pull request Dec 29, 2020
@ppenzin
Copy link
Member

ppenzin commented Dec 30, 2020

I am hugely in favor of reducing amount of output - even if it does not look that bad in terminal (because we are rewriting lines), we are actually printing a line for every execution of a test.

Looks like --logfile replicates all output into a file, we might need a log, but not that detailed by default :)

The part of the change reducing the output looks good, but I am not sure about process count, default looks reasonable for user machine (number of processors). We can probably add a CMake variable to override the default and set it for CI only.

@rhuanjl rhuanjl force-pushed the runtests branch 4 times, most recently from b4c2fd1 to 8b34565 Compare December 30, 2020 16:42
@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 30, 2020

Significant update:

  1. I reverted the process change (briefly considered doing cpu_count()-1 but left as just cpu_count() for now)
  2. Removed the logfile completely (omitting the parameter before merely resulted in using a default path) -if we want to log the output in a file when running offline can do this by capturing the terminal output
  3. Improved the terminal output, a welcome message is printed stating the build type being tested and the number of threads being used (matching the windows output) and the description of the test type (interpreted, dynopogo or disable_jit) being run is displayed before testing commences, and the results of that type are shown as soon it completes before beginning the next type, also a time taken is shown for the type.
  4. I've edited the verbose flag so it also enables the show-passes flag, so verbose on its own will give the most detailed level of output.
  5. Whilst doing 3 I noticed that the reason it used to say "Running Interpreted Variant" twice was actually a logical error in when the print() commands were called - it wasn't running any extra tests - I've fixed the error so it no longer says this twice.
  6. Drive by cleanup: removed various traces of testing for ChakraFull/chakra.dll which used to run against the same test suite, this included removing 'exclude_jshost' a flag that was used to mark tests meant for ChakraCore only to avoid running them when testing ChakraFull and 'exclude_ch' a defunct flag that used to be used to mark tests meant for ChakraFull only (all such tests had already been updated to support ChakraCore or deleted).

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 30, 2020

One note on performance - having added the welcome message that prints the process_count can see that the macOS machines have 3 cores and the Ubuntu machines only 2. I think the windows machines have 4.

@rhuanjl rhuanjl changed the title Linux/macOS CI remove logging and restrict process count Linux/macOS CI remove excess logging, improve remaining output + other tidyup Dec 30, 2020
remove logging and other tidy up
@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 30, 2020

As general tidy-up and improvement of the console output I think this is good to merge, any thoughts? @ppenzin

I've noticed another couple of defunct flags exclude_chk and exclude_fre to remove (chk is an old alias for Debug and fre is an old alias for Test - nothing uses these flags though) but I'll put that in a future PR when I have something else to submit.

@ppenzin
Copy link
Member

ppenzin commented Dec 30, 2020

I think this is good, we can wait for the final job and then merge. It would be good to add some form of progress indicator to see if a test is hanging, but it is not urgent.

@rhuanjl
Copy link
Collaborator Author

rhuanjl commented Dec 30, 2020

Thanks for the review.

I think this is good, we can wait for the final job and then merge. It would be good to add some form of progress indicator to see if a test is hanging, but it is not urgent.

There's already a timeout (with an automatic fail) if an individual test takes more than a minute, I thought that was sufficient - whilst it would be nice to know the progress aside from specific hangs it's roughly the same each time so didn't think it was needed, offline can use the --show-passes flag to see it if you need it.

@rhuanjl rhuanjl merged commit 1ad2969 into chakra-core:master Dec 30, 2020
@rhuanjl rhuanjl deleted the runtests branch December 30, 2020 19:54
@ppenzin ppenzin mentioned this pull request Dec 30, 2020
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.

2 participants