Page MenuHomePhabricator

[Dev] Fix periodic tests
Closed, ResolvedPublic


The recent Support Library JDK requirement broke the periodic test runner. Fix it.

Started by an SCM change
Building remotely on integration-slave-trusty-1023 (contintLabsSlave AndroidEmulator) in workspace /mnt/jenkins-workspace/workspace/apps-android-wikipedia-periodic-test
Using checkout strategy: Default
Last Built Revision: Revision 9529b8f71b917b33ca797c78e58a0af3462e4ac3 (refs/remotes/origin/master)
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository
 > git init /mnt/jenkins-workspace/workspace/apps-android-wikipedia-periodic-test # timeout=10


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileAlphaReleaseJavaWithJavac'.
> compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

Event Timeline

Change 299674 had a related patch set uploaded (by Mholloway):
Use OpenJdk 8 for Android periodic tests

Hello, @hashar! It seems I neglected the periodic Android tests when I said everything was looking good with the JDK 8 switch a few weeks ago. These are the heavy tests that are running on a separate Trusty instance (integration-slave-trusty-1023, I think). I know you mentioned on T138506 that a JDK 8 package was available on Trusty, so I thought I'd be bold and put in the above patch but I really have no idea whether it'll work.

There is a Java 8 available on Trusty. That was a one time import for a Wikidata related Graph database. Afaik it is not kept up to date and is severely outdated.

We will want to migrate the job to a Jessie instance. I have created integration-slave-jessie-android for that.

Change 300738 had a related patch set uploaded (by Luke081515):
contint: role for Android testing

Change 299674 abandoned by Mholloway:
Use OpenJdk 8 for Android periodic tests

Moving to Jessie instance instead

Looping in @thcipriani

I have created a new puppet role via and applied it to the instance integration-slave-jessie-android.

I have added the instance as a slave in Jenkins without any labels to prevent other jobs from running on it.

I have copied the existing job to a new one with the suffix -new. Then changed it to be restricted to run on that instance and disabled IRC notifications.

It failed acquiring the emulator with a spam of

error: device 'localhost:8649' not found

netstat show adb listening solely on aka IPv4 but /etc/hosts points localhost to both and ::1 (the equivalent in IPv6). I have live hacked the hosts file:

/etc/hosts       localhost
- ::1             localhost ip6-localhost ip6-loopback
+ ::1             ip6-localhost ip6-loopback
  ff02::1         ip6-allnodes
  ff02::2         ip6-allrouters managed to acquire the emulator but fails with:

Execution failed for task ':app:compileAlphaReleaseJavaWithJavac'.
> compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.

I then edited the -new job to point the JDK to Debian - OpenJDK 8 and it something is running on

2016-07-23 21:22:21 [SR.runTests] Executing instrumentation suite on 1 device(s).

What is left to do is to polish up the saturday night hack I have just did. I would like to pair that with @thcipriani so he can assist when I am on vacations in August. What is left to do is:

  • Assign labels to the slave configuration in Jenkins
  • Get the puppet patch reviewed/merged
  • Figure out a solution for localhost
  • Write the JJB config for the new job. Eg change the label assignment and JDK.

On a side note, I have created the instance with 4 CPU / 8GB RAM and that seems to be enough.

The hacky job I have created does poll the git repository and it is now passing just fine!

Seems some translation test has been fixed by @Niedzielski with :]

@hashar, that's great!

Should we have the new periodic test job start sending results to #wikimedia-android-ci, or is it temporary?

Change 301720 had a related patch set uploaded (by Thcipriani):
Add job apps-android-wikipedia-periodic-test-new

I have forgot to update this task. @thcipriani had a talk about this task and he is going to take care of polishing up the hack I have made / porting to JJB which is :]

Change 301720 merged by jenkins-bot:
Add job apps-android-wikipedia-periodic-test-new

Change 300738 merged by Alexandros Kosiaris:
contint: role for Android testing

I think this is now complete ? Or is there anything else to do?

I'm guessing this is done. @Mholloway? (I've actually broken the job again working on T133183 but I'll get it sorted in that ticket.) Thanks!

@Mholloway definitely aced this :] Well done!