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

Refactor Squeak Test Execution #14

Merged
merged 8 commits into from
Dec 22, 2018
Merged

Refactor Squeak Test Execution #14

merged 8 commits into from
Dec 22, 2018

Conversation

f4lco
Copy link
Collaborator

@f4lco f4lco commented Dec 21, 2018

Major selling points:

  • first and foremost, colored and folded Travis logs
  • Mark individual Squeak test selectors as (un)stable
  • Inside IDEs, be able to execute a single Squeak test class, and make use of rerun all / rerun failed / rerun single test selector:

image

The Squeak test class is chosen via system property:

# Sample VM argument
-DsqueakTestClass=ObjectTest

# Example MX invocation with individual test case names and timing
$ mx unittest -DsqueakTestClass=UTF8EdgeCaseTest SqueakSUnitTest --very-verbose --enable-timing

I've come to the conclusion that the Travis build log visualization is unreliable. I cannot explain artifacts like these:

image

Given that the raw build logs look OK to me.

I cannot meet the goals for coverage - I added test code for handling test case failures, which are naturally not part of a successful build.

Because of test parameterization, all subordinate
test cases are now known to MX, which can now
take care of test name logging and measuring
runtime (given --enable-timing).
Using a future should make runTestCase much
easier to follow, and the test result
construction is now obvious. It should be
a little less resource consuming since the
threads from the default pool are reused
rather than creating a new one for
every test case ran.
@f4lco f4lco requested a review from fniephaus December 21, 2018 14:25
@codecov
Copy link

codecov bot commented Dec 21, 2018

Codecov Report

Merging #14 into dev will increase coverage by 0.76%.
The diff coverage is 81.76%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev      #14      +/-   ##
============================================
+ Coverage     51.95%   52.72%   +0.76%     
- Complexity     2432     2513      +81     
============================================
  Files           182      188       +6     
  Lines         16189    16645     +456     
  Branches       2265     2315      +50     
============================================
+ Hits           8411     8776     +365     
- Misses         6918     6992      +74     
- Partials        860      877      +17
Impacted Files Coverage Δ Complexity Δ
...t/src/de/hpi/swa/graal/squeak/test/Statistics.java 100% <100%> (ø) 3 <3> (?)
.../swa/graal/squeak/test/AbstractSqueakTestCase.java 94.44% <100%> (+0.1%) 20 <1> (+1) ⬆️
.../de/hpi/swa/graal/squeak/test/SqueakSUnitTest.java 66.66% <62.5%> (-15.11%) 10 <10> (-39)
...test/src/de/hpi/swa/graal/squeak/test/TestLog.java 72.91% <72.91%> (ø) 0 <0> (?)
...l/squeak/test/AbstractSqueakTestCaseWithImage.java 80.73% <80.73%> (ø) 30 <30> (?)
....test/src/de/hpi/swa/graal/squeak/test/Travis.java 83.78% <83.78%> (ø) 9 <9> (?)
.../src/de/hpi/swa/graal/squeak/test/SqueakTests.java 84.44% <84.44%> (ø) 11 <11> (?)
...pi/swa/graal/squeak/test/SqueakBasicImageTest.java 84.78% <84.78%> (ø) 12 <12> (?)
...i/swa/graal/squeak/test/SqueakConsistencyTest.java 91.89% <91.89%> (ø) 8 <8> (?)
...raal/squeak/nodes/plugins/MiscPrimitivePlugin.java 86.36% <0%> (-2.03%) 2% <0%> (ø)
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0744c4...eabef6a. Read the comment docs.

@fniephaus
Copy link
Member

Thanks, will have a look soon. Happy holidays!

@fniephaus fniephaus merged commit 23827e6 into dev Dec 22, 2018
@fniephaus fniephaus deleted the squeak-sunit-parameterized branch December 22, 2018 13:39
@fniephaus
Copy link
Member

Thanks a lot, this looks good! I've merged it in as is :)

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