Closed Bug 1692178 Opened 3 years ago Closed 3 years ago

Testing on Android: Only push necessary test files.

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

Currently, each time we run the test suite on Android, we are pushing the 2 tests suite to the device, which include js/src/tests and js/src/jit-tests.

This step takes several minutes when testing on the x86 emulator on my laptop. We could easily reduce this step significantly by only pushing the directories where files are being tested.

Knowing that we divide the test suite in 10 chunks for all android tests, but only run 1/10 of the tests, this can have a significant impact on our CI.

Blocks: 1692096
Severity: -- → S4
Priority: -- → P2

in order to copy on the files needed would mean:

  1. all support files are copied (not sure if there are those in jittest)
  2. we determine prior to execution which of the files we are running.

Given that we do the chunking in python (which would be host machine), it seems feasible that we could copy just the tests we need solving #2:
https://searchfox.org/mozilla-central/source/js/src/jit-test/jit_test.py#463

and the copy:
https://searchfox.org/mozilla-central/source/js/src/tests/lib/jittests.py#892

in general I think this will be not too hard at least for a hacky solution, which is probably all that is needed.

(In reply to Joel Maher ( :jmaher ) (UTC -0800) from comment #1)

in order to copy on the files needed would mean:

  1. all support files are copied (not sure if there are those in jittest)

I would expect that we have a few, but I would also expect support files to be either in the same directory or in the lib directory which is already copied.

So making a copy of all files within directories where we have a test case might be a good approximation.

(In reply to Nicolas B. Pierron [:nbp] from comment #0)

Currently, each time we run the test suite on Android, we are pushing the 2 tests suite to the device, which include js/src/tests and js/src/jit-tests.

We only run the jit-tests on Android, but we push all of js/src/tests/? That has a lot of files and we need at most a few of them for jit-tests.

(In reply to Jan de Mooij [:jandem] from comment #3)

(In reply to Nicolas B. Pierron [:nbp] from comment #0)

Currently, each time we run the test suite on Android, we are pushing the 2 tests suite to the device, which include js/src/tests and js/src/jit-tests.

We only run the jit-tests on Android, but we push all of js/src/tests/? That has a lot of files and we need at most a few of them for jit-tests.

This is correct:
https://searchfox.org/mozilla-central/rev/0379f315c75a2875d716b4f5e1a18bf27188f1e6/js/src/tests/lib/jittests.py#892

Note, I am moving this code to a different file as part of Bug 1690570.

Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED

(In reply to Jan de Mooij [:jandem] from comment #3)

We only run the jit-tests on Android, but we push all of js/src/tests/? That has a lot of files and we need at most a few of them for jit-tests.

Testing locally, not pushing any tests from the tests directory reduce the setup time from 30s to 7s on the Android emulator.

Attachment #9205430 - Attachment description: Bug 1692178 - Android CI: Only push jit-tests. → Bug 1692178 - Android Jit tests: Only push jit-test tests files.
Severity: S4 → N/A
Priority: P2 → P1
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c3e1ef76ffcb
Android Jit tests: Only push jit-test tests files. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: