Closed krzema12 closed 3 years ago
@SerVB
Just wondering. You mentioned a week ago on Slack that it will be a new generated file. Have you declined that idea or will it be implemented in the future too?
In the future. See "Testing" in PR description :)
...it now provides some helpful data in python/box.tests/build/test-results/pythonTest that can be further analyzed by some tool (not in scope of this PR).
So in this PR I focus on producing needed data from the tests, and I'll work on the the new generated file next time.
By the way, I see before this PR, I have the following processes running (except the first and the last one, which are run by me) and consuming about 6-8 cores fully after running the box tests:
I've looked into them and see that there are endless loops. So I guess that proves your theory: on machines with the low number of cores, these loops reduce the performance of other tests severely 🚀
Before this PR, I have to kill those processes manually. With this PR, no processes are left. Cool!
This change modifies the exceptions thrown in case of failed tests, so that they contain valuable data like Kotlin compilation time, Python running time, ability to infer if compilation or execution failed and why. Unfortunately it seems impossible with JUnit to include a standard error per test case, it's only included on test class level. That's why I need to attach this information to the exception which in turn is attached to individual test case.
It also tries to handle misbehaving Python processes gracefully (kills the one that run >10 s). It was needed to provide their running time.
Testing
Ran it on a small subset of tests - it now provides some helpful data in
python/box.tests/build/test-results/pythonTest
that can be further analyzed by some tool (not in scope of this PR). However after this PR and even without any sophisticated tooling, it will be possible to grep through the XML test reports and e.g. count the number ofPython running time: still running
cases.By the way, it makes running the whole test suite faster again (~1-2 h instead of 4-5) :tada: Probably thanks to killing Python processes that experience an infinite loop/stack overflow.
Examples
Kotlin compilation issue:
Python execution issue:
Python running timeout: