Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 554f1fe

Browse files
committed
[cca]Add the [email protected] for cca
Add cordova-android 6.0.0 explicitly for cca build. Impacted tests(approved): new 0, update 2, delete 0 Unit test platform: Crosswalk Project for Android 23.53.589.0 Unit test result summary: pass 2, fail 0, block 0 BUG=https://crosswalk-project.org/jira/browse/CTS-1916
1 parent b609081 commit 554f1fe

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

cordova/cordova-sampleapp-android-tests/sampleapp/CIRC_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_build(self):
4141
comm.setUp()
4242
app_name = "CIRC"
4343
sample_src_pref = "/tmp/crosswalk-demos/circ"
44-
comm.buildGoogleApp(app_name, sample_src_pref, self)
44+
comm.buildGoogleApp(app_name, sample_src_pref, self, "6.0.0")
4545

4646
if __name__ == '__main__':
4747
unittest.main()

cordova/cordova-sampleapp-android-tests/sampleapp/Eh_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_build(self):
4141
comm.setUp()
4242
app_name = "Eh"
4343
sample_src_pref = "/tmp/crosswalk-demos/workshop-cca-eh"
44-
comm.buildGoogleApp(app_name, sample_src_pref, self)
44+
comm.buildGoogleApp(app_name, sample_src_pref, self, "6.0.0")
4545

4646
if __name__ == '__main__':
4747
unittest.main()

cordova/cordova-sampleapp-android-tests/sampleapp/comm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def create(appname, pkgname, mode, sourcecodepath, replace_index_list, self, ext
181181
do_remove(glob.glob(os.path.join(project_root, "www")))
182182
do_copy(sourcecodepath, os.path.join(tool_path, appname, "www"))
183183

184-
def buildGoogleApp(appname, sourcecodepath, self):
184+
def buildGoogleApp(appname, sourcecodepath, self, cordova_android_ver = "6.0.0"):
185185
os.chdir(tool_path)
186186
if os.path.exists(os.path.join(tool_path, appname)):
187187
print "Existing %s project, try to clean up..." % appname
@@ -209,7 +209,7 @@ def buildGoogleApp(appname, sourcecodepath, self):
209209
os.chdir(os.path.join(tool_path, appname))
210210

211211
print "Add android platforms to this project --------------> START"
212-
add_android_cmd = "cca platform add android"
212+
add_android_cmd = "cca platform add android@%s" % cordova_android_ver
213213
addstatus = commands.getstatusoutput(add_android_cmd)
214214
self.assertEquals(0, addstatus[0])
215215

tools/build/pack_cordova_sample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def copyCordovaCliApk(app_name, orig_dir, apk_name_arch="armv7", apk_name_mode="
448448

449449
return True
450450

451-
def packGoogleApp(app_name=None):
451+
def packGoogleApp(app_name=None, cordova_android_ver):
452452
project_root = os.path.join(BUILD_ROOT, app_name)
453453
orig_dir = os.getcwd()
454454
buildstatus = commands.getstatusoutput("cca -v")
@@ -530,7 +530,7 @@ def packGoogleApp(app_name=None):
530530
'</widget>',
531531
' <allow-navigation href="*" />\n</widget>')
532532

533-
add_cmd = "cca platform add android"
533+
add_cmd = "cca platform add android@%s" % cordova_android_ver
534534
if not doCMD(add_cmd, DEFAULT_CMD_TIMEOUT * 2):
535535
os.chdir(orig_dir)
536536
return False
@@ -858,7 +858,7 @@ def packAPP(app_name=None):
858858
if not packMobileSpec(app_name):
859859
return False
860860
elif checkContains(app_name, "CIRC") or checkContains(app_name, "EH"):
861-
if not packGoogleApp(app_name):
861+
if not packGoogleApp(app_name, "6.0.0"):
862862
return False
863863
else:
864864
if not packSampleApp_cli(app_name):

0 commit comments

Comments
 (0)