How to skip robotests testing when building aosp modules? - android

I'm building aosp-12 ROM for my pixel phone.
But I found most time was consumed on runing Robolectric tests.
For example:
host Robolectric: RunSettingsRoboTests3
1:46 host Robolectric: RunSettingsRoboTests0
1:46 host Robolectric: RunSettingsRoboTests1
1:46 host Robolectric: RunSettingsRoboTests2
1:46 host Robolectric: RunSettingsRoboTests3
Can I configure to skip them?
Thank you very much.

Related

Bitrise Unable to find instrumentation info for: ComponentInfo

I have created a class with the Espresso Test, named InsertFirst.class, I have correctly tried it on my android studio project, and it works.
Now I am trying to do the same on Bitrise. I have this worflow:
Activate SSH key (RSA private key)
Git Clone Repository
Bitrise.io Cache:Pull
Do anything with Script step
Install missing Android SDK components
Android Lint
Android Unit Test
Android Build for UI Testing
[BETA] Virtual Device Testing for Android
Android Build
Deploy to Bitrise.io - Apps, Logs, Artifacts
Bitrise.io Cache:Push
All the steps works, a part of the step 9. That I have configured in this way:
But when I run a build I get this ouptup on this step:
Configs:
- AppPath: /bitrise/deploy/app-debug.apk
- TestTimeout: 900.000000
- FlakyTestAttempts: 0
- DownloadTestResults: false
- DirectoriesToPull:
- AutoGoogleLogin: false
- EnvironmentVariables:
- ObbFilesList:
- TestDevices:
---
Model API Level Locale Orientation
Nexus6 24 en portrait
---
- TestType: instrumentation
- TestApkPath: /bitrise/deploy/app-debug-androidTest.apk
- InstTestPackageID:
- InstTestRunnerClass: com.app.name.nameeapp.ui.login.InsertFirst
- InstTestTargets:
- UseOrchestrator: false
Uploading app and test files
- (1/1) running
- (0/1) running
=> Test finished
Test results:
Model API Level Locale Orientation Outcome
Nexus6 24 en portrait failure
And If I go to the Test Report, on the Firebase TestLab -> Test Artifacts -> instrumentation.results
I got this error:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{com.app.name.nameeapp.test/com.app.name.nameeapp.ui.login.InsertFirst}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: com.app.cerere.cerereapp.test/com.app.name.nameeapp.ui.login.InsertFirst
at com.android.commands.am.Am.runInstrument(Am.java:890)
at com.android.commands.am.Am.onRun(Am.java:400)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:51)
at com.android.commands.am.Am.main(Am.java:121)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:262)
Why? I miss something in the step? Or there is something that I forgot? Thanks

Appium Espresso backdoor

I use Espresso to call the method
AndroidDriver androidDriver = this.powerWebDriver().getAndroidWebDriver();
"androidDriver.executeScript("mobile: backdoor", scriptArgss);"
and I got this error:
org.openqa.selenium.UnsupportedCommandException: Unknown mobile command "backdoor". Only shell,scrollBackTo,viewportScreenshot,deepLink,startLogsBroadcast,stopLogsBroadcast,acceptAlert,dismissAlert,batteryInfo,deviceInfo,changePermissions,getPermissions,performEditorAction commands are supported.
Any idea what I am doing wrong?

Jenkins aws device farm pugin unable to find artifact / apk

I am using jenkins to do the build for a Android project which works fine but uploading the apk to device farm results in a IOException as the plugin can't find the file.
Build Log
[AWSDeviceFarm] Using Project 'Android SDK2'
[AWSDeviceFarm] Using DevicePool 'Test Devices'
[AWSDeviceFarm] Using App '/AndroidSDK/PlayerSDK/build/outputs/apk/androidTest/debug/PlayerSDK-debug-androidTest.apk'
[AWSDeviceFarm] Unable to find artifact java.io.IOException: Expecting Ant GLOB pattern, but saw '/AndroidSDK/PlayerSDK/build/outputs/apk/androidTest/debug/PlayerSDK-debug-androidTest.apk'. See http://ant.apache.org/manual/Types/fileset.html for syntax
Build step 'Run Tests on AWS Device Farm' marked build as failure
Finished: FAILURE
I have tried changing application path to
**/build/outputs/apk/androidTest/debug/PlayerSDK-debug-androidTest.apk
and
**/PlayerSDK-debug-androidTest.apk
but this leads to "No artificats found at this location" error. Any ideas?

Unable to ‎WebKit Layout Tests‎ on android

Compile the chromium for Android
Build every test:
$ ninja -C out/Release
Running the layout Tests
$ webkit/tools/layout_tests/run_webkit_tests.sh
I get following errors:
Using port 'chromium-linux-x86_64' Test configuration: Placing test results in
/host/chromium/src/webkit/Release/layout-test-results Baseline search
path: chromium-linux -> chromium-win -> generic Using Release build
Pixel tests enabled Regular timeout: 6000, slow test timeout: 30000
Command line:
/host/chromium/src/third_party/WebKit/out/Release/DumpRenderTree -
Found 29487 tests; running 28395, skipping 1092. Unable to find test
driver
at /host/chromium/src/third_party/WebKit/out/Release/DumpRenderTree
For complete Linux build requirements, please see:
http://code.google.com/p/chromium/wiki/LinuxBuildInstructions
Build check failed
Support for layout tests on Android is being worked on at the moment. See https://code.google.com/p/chromium/issues/detail?id=232044

Android: Instantiating JNDI factory from reflection on Android forcing javax

I'm trying to port: Apache Qpid Client, JMS and JNDI -- to Android. I'm able to get a successful compile/build of my QpidDroid project when running the ant debug install targets after passing Dalvik the --core-library parameter to allow javax packages for JMS/JNDI. I'm hoping to do this before considering repackaging/refactoring javax classes into a different package namespace using jarjar.
I think this is legally legit because I'm using the old/first seperate JNDI jar currently provided by Oracle's website. I'm using the JMS jar that comes with Apache Geronimo in Qpid,.. but I think it's also available from Oracle as a seperate download. My dev environment uses Android platform 2.1 and jdk 1.6.
The problem is, it seems it currently cannot instantiate my custom jndi connection factory: PropertiesFileInitialContextFactory. This is a .java source file in my QpidDroid project(not a .class in a libs jar) (I extracted the class out of the qpidClient jar).
Would someone have any idea as to why it cannot be instantiated here? I was wondering if proguard might be breaking reflection,... but I'm building it with the debug ant task,.. so I'm thinking proguard shouldn't be running at all. The exception occurs when I run the installed app on the emulator. I have the Apache Qpid service running on the same machine with the default port that it uses.
01-18 18:05:16.966: W/System.err(296): [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.jndi.PropertiesFileInitialContextFactory]javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.jndi.PropertiesFileInitialContextFactory
01-18 18:05:17.006: W/System.err(296): at javax.naming.spi.NamingManager.getDefaultInitialContextFactory(NamingManager.java:720)
01-18 18:05:17.006: W/System.err(296): at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:768)
01-18 18:05:17.016: W/System.err(296): at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:169)
01-18 18:05:17.016: W/System.err(296): at javax.naming.InitialContext.<init>(InitialContext.java:146)
01-18 18:05:17.016: W/System.err(296): at org.rif.QpidDroid.Hello.runTest(Hello.java:56)
Thanks for any tips!
I think I found the problem -- Android has bugs in it with Reflection prior to version 2.3
http://code.google.com/p/android/issues/detail?id=6636
I ported my QpidDroid project to Android 2.3 and it looks like JNDI is successfully creating the InitialContext now with the QPID connection params

Categories

Resources