Closed Bug 900664 Opened 11 years ago Closed 10 years ago

Robocop testImportFromAndroid fails on x86 emulator / RAZR

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gbrown, Assigned: gbrown)

Details

(Whiteboard: [reit-x86] [leave open])

Attachments

(2 files)

Robocop's testImportFromAndroid fails when run on the x86 emulator setup (see bug 891959). It also fails locally when run on a Motorola Razr i (XT890) -- but in a slightly different way. This may be a fails-on-Jellybean rather than a fails-on-x86 problem -- that seems to be the typical cause of these bugs. INFO - 0 INFO SimpleTest START INFO - 1 INFO TEST-START | testImportFromAndroid INFO - EventExpecter: no longer listening for Gecko:Ready INFO - 2 INFO TEST-PASS | testImportFromAndroid | Inserted at: - content://org.mozilla.fennec.db.browser/bookma rks/10?profile=default INFO - 3 INFO TEST-PASS | testImportFromAndroid | Inserted at: - content://org.mozilla.fennec.db.browser/bookma rks/11?profile=default INFO - 4 INFO TEST-PASS | testImportFromAndroid | Inserted at: - content://org.mozilla.fennec.db.browser/bookma rks/12?profile=default INFO - 5 INFO TEST-PASS | testImportFromAndroid | Inserted at: - content://org.mozilla.fennec.db.browser/bookma rks/13?profile=default INFO - 6 INFO TEST-PASS | testImportFromAndroid | Inserted at: - content://org.mozilla.fennec.db.browser/bookma rks/14?profile=default INFO - 7 INFO TEST-PASS | testImportFromAndroid | Waiting for search bar - Search bar found INFO - waitForTest timeout after 3000 ms INFO - 8 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Checking if Android History item is present - null was imported INFO - Exception caught during test! INFO - junit.framework.AssertionFailedError: 8 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Checking if A ndroid History item is present - null was imported INFO - at junit.framework.Assert.fail(Assert.java:50) INFO - at org.mozilla.fennec.FennecMochitestAssert._logMochitestResult(FennecMochitestAssert.java:107) INFO - at org.mozilla.fennec.FennecMochitestAssert.ok(FennecMochitestAssert.java:136) INFO - at org.mozilla.fennec.tests.testImportFromAndroid.testImportFromAndroid(testImportFromAndroid.java:74) INFO - at java.lang.reflect.Method.invokeNative(Native Method) INFO - at java.lang.reflect.Method.invoke(Method.java:511) INFO - at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) INFO - at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) INFO - at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) INFO - at org.mozilla.fennec.tests.BaseTest.runTest(BaseTest.java:133) INFO - at junit.framework.TestCase.runBare(TestCase.java:134) INFO - at junit.framework.TestResult$1.protect(TestResult.java:115) INFO - at junit.framework.TestResult.runProtected(TestResult.java:133) INFO - at junit.framework.TestResult.run(TestResult.java:118) INFO - at junit.framework.TestCase.run(TestCase.java:124) INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190) INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175) INFO - at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555) INFO - at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661) INFO - 9 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Exception caught - junit.framework.AssertionFailedE rror: 8 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Checking if Android History item is present - null was imported INFO - 10 INFO TEST-END | testImportFromAndroid | finished in 31086ms
On my RAZR, I suspect the problem is that the execsu's in runtestsremote.py fail because the phone is not rooted -- I can live with that. On the emulator, I suppose there is a similar problem. Consider: root@android:/ # ls -l /data/data/com.android.browser/databases -rw-rw---- u0_a17 u0_a17 16384 2013-07-30 00:30 autofill.db -rw------- u0_a17 u0_a17 8720 2013-07-30 00:30 autofill.db-journal -rw-rw---- u0_a17 u0_a17 40960 2013-07-30 00:30 webview.db -rw------- u0_a17 u0_a17 8720 2013-07-30 00:30 webview.db-journal -rw-rw---- u0_a17 u0_a17 0 2013-07-30 00:35 webviewCookiesChromium.db -rw-rw---- u0_a17 u0_a17 0 2013-07-30 00:35 webviewCookiesChromiumPrivate.db There is no browser.db or browser2.db!
If we do identify a database to be modified by runtestsremote.py, we will likely base that on the os info again (we currently differentiate panda/non-panda). On the emulator, sut's "info os" returns: sdk_x86-eng 4.2 JOP40C eng.android-build.20121231.103448 test-keys
Adrian - Any thoughts here? Have you ever looked at making this work on Jellybean?
Flags: needinfo?(adrian.tamas)
I haven't looked into it yet since there were no issues on pandas or tegras on this. The difference can be the change in browser for JB to Chrome. I can also look into this next week as today we still have Aurora and beta build 3 sign-off testing. I won't clear the need-info flag just to make sure I have a reminder to work on this.
This test should also work on JB x86 emulators since it has the same standard browser and not chrome. The only issue with the emulator is that the databases are not created until the Browser is opened for the first time. After I open the browser the content for the databases folder is: root@android:/data/data/com.android.browser/databases # ls autofill.db autofill.db-journal browser2.db browser2.db-shm browser2.db-wal webview.db webview.db-journal webviewCookiesChromium.db webviewCookiesChromiumPrivate.db I will test this out as soon as my x86 build completes but if this is the cause the only way I see this working is if I call an intent to open the browser before the test.
Flags: needinfo?(adrian.tamas)
Following our discussion on IRC I just realized that we need to either change the test of the os-info to tegra and switch the cmds between them or add a "panda or x86 " test to insert in browser2.db
Attached patch wip patchSplinter Review
I verified that this patch creates browser2.db successfully, but the test still fails: 18:26:28 INFO - 0 INFO SimpleTest START 18:26:28 INFO - 1 INFO TEST-START | testImportFromAndroid 18:26:28 INFO - EventExpecter: no longer listening for Gecko:Ready 18:26:28 INFO - 2 INFO TEST-PASS | testImportFromAndroid | Inserted at : - content://org.mozilla.fennec.db.browser/bookmarks/10?profile=default 18:26:28 INFO - 3 INFO TEST-PASS | testImportFromAndroid | Inserted at : - content://org.mozilla.fennec.db.browser/bookmarks/11?profile=default 18:26:28 INFO - 4 INFO TEST-PASS | testImportFromAndroid | Inserted at : - content://org.mozilla.fennec.db.browser/bookmarks/12?profile=default 18:26:28 INFO - 5 INFO TEST-PASS | testImportFromAndroid | Inserted at : - content://org.mozilla.fennec.db.browser/bookmarks/13?profile=default 18:26:28 INFO - 6 INFO TEST-PASS | testImportFromAndroid | Inserted at : - content://org.mozilla.fennec.db.browser/bookmarks/14?profile=default 18:26:28 INFO - 7 INFO TEST-PASS | testImportFromAndroid | Waiting for search bar - Search bar found 18:26:28 INFO - waitForTest timeout after 3000 ms 18:26:28 INFO - 8 INFO TEST-UNEXPECTED-FAIL | testImportFromAndroid | Checking if Android History item is present - null was imported 18:26:28 INFO - Exception caught during test! 18:26:28 INFO - junit.framework.AssertionFailedError: 8 INFO TEST-UNEX PECTED-FAIL | testImportFromAndroid | Checking if Android History item is p resent - null was imported 18:26:28 INFO - at junit.framework.Assert.fail(Assert.java:50) 18:26:28 INFO - at org.mozilla.fennec.FennecMochitestAssert._logMoc hitestResult(FennecMochitestAssert.java:107) 18:26:28 INFO - at org.mozilla.fennec.FennecMochitestAssert.ok(Fenn ecMochitestAssert.java:136) 18:26:28 INFO - at org.mozilla.fennec.tests.testImportFromAndroid.t estImportFromAndroid(testImportFromAndroid.java:74) 18:26:28 INFO - at java.lang.reflect.Method.invokeNative(Native Met hod)
Whiteboard: [reit-x86]
I want to get this passing on x86 as soon as possible, but don't understand the cause of the database problem. This patch skips testImportFromAndroid on the x86 emulator, as a temporary measure. I'll [leave open] for follow-up.
Attachment #797387 - Flags: review?(jmaher)
Attachment #797387 - Flags: review?(jmaher) → review+
No longer blocks: 892688
Whiteboard: [reit-x86] → [reit-x86] [leave open]
Assignee: gbrown → nobody
Robocop tests are no longer scheduled on the Android x86 emulator -- bug 1132209.
Assignee: nobody → gbrown
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: