-
Notifications
You must be signed in to change notification settings - Fork 122
Port Facebook from WA2 #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from all commits
e4aad58
ff51736
4505b41
56f38c3
9e9a1c4
9b74b26
db89f2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copyright 2013-2015 ARM Limited | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The commit message references the wrong issue, it should be #704 |
||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
|
|
||
| import os | ||
| import sys | ||
|
|
||
| from wa import ApkUiautoWorkload | ||
|
|
||
|
|
||
| class Facebook(ApkUiautoWorkload): | ||
|
|
||
| name = 'facebook' | ||
| description = """ | ||
| Uses com.facebook.patana apk for facebook workload. | ||
| This workload does the following activities in facebook | ||
| Login to facebook account. | ||
| Send a message. | ||
| Check latest notification. | ||
| Search particular user account and visit his/her facebook account. | ||
| Find friends. | ||
| Update the facebook status | ||
| .. note:: This workload starts disableUpdate workload as a part of setup to | ||
| disable online updates, which helps to tackle problem of uncertain | ||
| behavier during facebook workload run.] | ||
| """ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workload require an internet connection so the workload attribute |
||
| package_names = ['com.facebook.katana'] | ||
| activity_name = '.LoginActivity' | ||
| max_apk_version = '3.4' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| apply plugin: 'com.android.application' | ||
|
|
||
| def packageName = "com.arm.wa.uiauto.facebook" | ||
|
|
||
| android { | ||
| compileSdkVersion 25 | ||
| buildToolsVersion "25.0.3" | ||
| defaultConfig { | ||
| applicationId "${packageName}" | ||
| minSdkVersion 18 | ||
| targetSdkVersion 25 | ||
| testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
| } | ||
| buildTypes { | ||
| applicationVariants.all { variant -> | ||
| variant.outputs.each { output -> | ||
| output.outputFile = file("$project.buildDir/apk/${packageName}.apk") | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| compile fileTree(dir: 'libs', include: ['*.jar']) | ||
| compile 'com.android.support.test:runner:0.5' | ||
| compile 'com.android.support.test:rules:0.5' | ||
| compile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' | ||
| compile(name: 'uiauto', ext:'aar') | ||
| } | ||
|
|
||
| repositories { | ||
| flatDir { | ||
| dirs 'libs' | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| package="com.arm.wa.uiauto.facebook" | ||
| android:versionCode="1" | ||
| android:versionName="1.0"> | ||
|
|
||
|
|
||
| <instrumentation | ||
| android:name="android.support.test.runner.AndroidJUnitRunner" | ||
| android:targetPackage="${applicationId}"/> | ||
|
|
||
| </manifest> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the correct place to be doing this check as this would cause the workload to fail unnecessarily late in the execution and will not deal with multiple versions of the apk being available correctly. Both in the case of there being multiple apks available on the host system, which could result in an incorrect apk being selected during
initializationonly to fail here insetupand in the event of a pre-installed version on the target whenprefer_host_packageisFalse.I would suggest instead that the maximum version is passed as an extra parameter during the initialization of the
ApkFileobject and used when matching for an apk on the host system inresolve_package_from_hostand the installed version on the target will also need to be checked inresolve_package_from_targetwith the appropriate error message added to theresolve_packagemethod ofworkload.