dart-lang / native

Dart packages related to FFI and native assets bundling.
BSD 3-Clause "New" or "Revised" License
107 stars 36 forks source link

Test suite overhaul #679

Closed mahesh-hegde closed 2 months ago

mahesh-hegde commented 1 year ago

The current test suite does not scale. It takes ~1 minute to run tests on a powerful machine, and more on a less powerful machine, which includes the CI machines which might have 2-4 vCPUs at best.

Performance

~- [ ] Large amount of time is spent in invoking maven commands, although most of the time the dependencies are in the local folder. dart-lang/native#742 should fix this.~ ~- [ ] javac is invoked in a few test cases, this can be cached transparently too.~

Update: These seem to take some time during binding generation, but do not occupy large part of our testsuite.

~Overall, not running any Java based tool in the fast path should be the goal.~

Testing summary

Examples

Unfortunately some examples are rather android-specific and cannot be frequently run in usual dev workflow.

But pdfbox standalone test can be probably run.

CI

I believe CI shouldn't take 10+ minutes and there should not be 17 CI jobs. (Except those which eg: upload the results).

The worst offender seems to be the android build jobs.

~- [ ] Some long running Android builds install multiple versions of the NDK. Remove as many NDK constraints as possible. (Shouldn't everything build with same NDK?).~

~- [ ] test_jni can run in 20s, it's better to merge this and analyze_jni.~

~- [ ] Is there a technical reason why collect coverage is run separately once all tests pass? I think coverage can be collected during first time itself?~ (Error reporting)


HosseinYousefi commented 2 months ago

Once doclet is removed (#1079), a lot of the tests will be simplified. Closing this.