コード例 #1
0
ファイル: test.py プロジェクト: BruceDai/crosswalk-test-suite
            "xwalk_%s_library:%s" % (pkg_mode_tmp, comm.CROSSWALK_VERSION),
            "%s" % (comm.CROSSWALK_VERSION)]
    EXCEPTED_VERSIONS = [comm.CROSSWALK_VERSION, comm.CROSSWALK_VERSION, comm.CROSSWALK_VERSION]
    comm.installCrosswalk(BUILD_PARAMETERS.pkgmode, BUILD_PARAMETERS.pkgarch)
else:
    print "CROSSWALK_BRANCH in VERSION file is unavailable"
    sys.exit(1)

count = 1
index = 0
for version_tmp in VERSION_TYPES:
    os.system('cp ../index.html www/index.html')
    os.system('sed -i "s/{expectedVersion}/%s/g" www/index.html' % EXCEPTED_VERSIONS[index])
    comm.replaceUserString(
            project_path,
            'www/index.html',
            '{expectedVersion}',
            EXCEPTED_VERSIONS[index])
    print version_tmp
    print EXCEPTED_VERSIONS[index]
    comm.installWebviewPlugin(BUILD_PARAMETERS.pkgmode, version_tmp)
    comm.build(app_name, pack_arch_tmp)

    apk_source = os.path.join(project_path, "platforms", "android", 
            "build", "outputs", "apk", "android%sdebug.apk" % apk_name_arch)
    apk_dest = os.path.join(current_path_tmp, "CrosswalkVersion_%s_%d.apk" % (comm.CROSSWALK_BRANCH, count))
    if not comm.doCopy(apk_source, apk_dest):
        sys.exit(1)

    count = count + 1
    comm.removeWebviewPlugin()
コード例 #2
0
ファイル: test.py プロジェクト: BruceDai/crosswalk-test-suite
if not BUILD_PARAMETERS.url:
    print "Please add the -u parameter for the url of XWalkRuntimeLib.apk"
    sys.exit(1)


comm.installCrosswalk("shared")

app_name = "SharedModeLibraryDownload"
pkg_name = "com.example.sharedModeLibraryDownload"
current_path_tmp = os.getcwd()
comm.create(app_name, pkg_name, current_path_tmp)

menifest_path = os.path.join(current_path_tmp, app_name, "platforms", "android")
comm.replaceUserString(
        menifest_path,
        'AndroidManifest.xml',
        'android:supportsRtl="true">',
        'android:supportsRtl="true">\n        <meta-data android:name="xwalk_apk_url" android:value="' + BUILD_PARAMETERS.url + '" />')
comm.replaceUserString(
        menifest_path,
        'AndroidManifest.xml',
        '</manifest>',
        '    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />\n</manifest>')
if comm.CROSSWALK_BRANCH == "beta":
    comm.installWebviewPlugin("shared", "org.xwalk:xwalk_shared_library_beta:%s" % comm.CROSSWALK_VERSION)
else:
    comm.installWebviewPlugin("shared", "%s" % comm.CROSSWALK_VERSION)

comm.build(app_name)
comm.run(app_name)
comm.checkBuildResult()
コード例 #3
0
ファイル: test.py プロジェクト: max02100/crosswalk-test-suite
        "org.xwalk:xwalk_%s_library:%s" % (pkg_mode_tmp, comm.CROSSWALK_VERSION),
        "xwalk_%s_library:%s" % (pkg_mode_tmp, comm.CROSSWALK_VERSION),
        "%s" % (comm.CROSSWALK_VERSION),
    ]
    EXCEPTED_VERSIONS = [comm.CROSSWALK_VERSION, comm.CROSSWALK_VERSION, comm.CROSSWALK_VERSION]
    comm.installCrosswalk(BUILD_PARAMETERS.pkgmode)
else:
    print "CROSSWALK_BRANCH in VERSION file is unavailable"
    sys.exit(1)

count = 1
index = 0
for version_tmp in VERSION_TYPES:
    os.system("cp ../index.html www/index.html")
    os.system('sed -i "s/{expectedVersion}/%s/g" www/index.html' % EXCEPTED_VERSIONS[index])
    comm.replaceUserString(project_path, "www/index.html", "{expectedVersion}", EXCEPTED_VERSIONS[index])
    print version_tmp
    print EXCEPTED_VERSIONS[index]
    comm.installWebviewPlugin(BUILD_PARAMETERS.pkgmode, version_tmp)
    comm.build(app_name, pack_arch_tmp)

    apk_source = os.path.join(
        project_path, "platforms", "android", "build", "outputs", "apk", "android-%s-debug.apk" % apk_name_arch
    )
    apk_dest = os.path.join(current_path_tmp, "CrosswalkVersion_%s_%d.apk" % (comm.CROSSWALK_BRANCH, count))
    comm.doCopy(apk_source, apk_dest)

    count = count + 1
    comm.removeWebviewPlugin()

    comm.installWebviewPlugin(BUILD_PARAMETERS.pkgmode)
コード例 #4
0
    sys.exit(1)

if not BUILD_PARAMETERS.url:
    print "Please add the -u parameter for the url of XWalkRuntimeLib.apk"
    sys.exit(1)


comm.installCrosswalk("shared")

app_name = "SharedModeLibraryDownload"
pkg_name = "com.example.sharedModeLibraryDownload"
current_path_tmp = os.getcwd()
comm.create(app_name, pkg_name, current_path_tmp)
comm.replaceUserString(
        os.path.join(current_path_tmp, app_name),
        'config.xml',
        '</widget>',
        '    <preference name="LoadUrlTimeoutValue" value="600000" />\n</widget>')

menifest_path = os.path.join(current_path_tmp, app_name, "platforms", "android")
comm.replaceUserString(
        menifest_path,
        'AndroidManifest.xml',
        'android:supportsRtl="true">',
        'android:supportsRtl="true">\n        <meta-data android:name="xwalk_apk_url" android:value="' + BUILD_PARAMETERS.url + '" />')
comm.replaceUserString(
        menifest_path,
        'AndroidManifest.xml',
        '</manifest>',
        '    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />\n</manifest>')
if comm.CROSSWALK_BRANCH == "beta":
コード例 #5
0
ファイル: test.py プロジェクト: hgl888/crosswalk-test-suite
if not BUILD_PARAMETERS.url:
    print "Please add the -u parameter for the url of XWalkRuntimeLib.apk"
    sys.exit(1)


comm.installCrosswalk("shared")

app_name = "SharedModeLibraryDownload"
pkg_name = "com.example.sharedModeLibraryDownload"
current_path_tmp = os.getcwd()
comm.create(app_name, pkg_name, current_path_tmp)

menifest_path = os.path.join(current_path_tmp, app_name, "platforms", "android")
comm.replaceUserString(
        menifest_path,
        'AndroidManifest.xml',
        'android:supportsRtl="true">',
        'android:supportsRtl="true">\n        <meta-data android:name="xwalk_apk_url" android:value="' + BUILD_PARAMETERS.url + '" />')
if comm.CROSSWALK_BRANCH == "beta":
    comm.installWebviewPlugin("shared", "org.xwalk:xwalk_shared_library_beta:%s" % comm.CROSSWALK_VERSION)
else:
    comm.installWebviewPlugin("shared", "%s" % comm.CROSSWALK_VERSION)

comm.build(app_name)
comm.run(app_name)
comm.checkBuildResult()
comm.checkRunResult(pkg_name)