示例#1
0
# initialization
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:  # noqa
    key, val = entry.split("=")
    args[key] = val
relay_type = args["relay_type"]
relay_port = args["relay_port"]
power_port = args["power_port"]

# test start
try:
    os.system("mkdir -p ./temp/files/flash ./temp/files/resources")
    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts" \
               "/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    test_apk_path = config.get("files", "test_apk")
    test_apk_name = test_apk_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + test_apk_path,
                                 local_filename="./temp/files/resources/" +
                                 test_apk_name)

    fastboot_utils.push_uiautomator_jar(serial=serial)  # noqa
    fastboot_steps.config_first_boot_wizard(serial=serial)()  # noqa

    adb_steps.connect_device(serial=serial)()  # noqa
    adb_steps.root_connect_device(serial=serial)()  # noqa
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n/img")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    vbmeta_corrupted_system_metadata_path = config.get(
        image_platform, "vbmeta_corrupted_system_metadata")
    vbmeta_corrupted_system_metadata_name = vbmeta_corrupted_system_metadata_path.split(
        "/")[-1]
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n/img")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    vendor_corrupted_block_path = config.get(image_platform,
                                             "vendor_corrupted_block")
    vendor_corrupted_block_name = vendor_corrupted_block_path.split("/")[-1]
    fastboot_utils.download_file(
示例#4
0
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n/img")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    system_corrupted_verity_path = config.get(image_platform,
                                              "system_corrupted_verity")
    system_corrupted_verity_name = system_corrupted_verity_path.split("/")[-1]
    fastboot_utils.download_file(
示例#5
0
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system(
        "mkdir -p ./temp/files/flash ./temp/image/n ./temp/image/eb/user ./temp/image/eb/userdebug"
    )
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl":
        image_platform = "image_m_bxt"
        eb_user_patch = "eb_579061_user_flashfiles_zip"
        eb_userdebug_patch = "eb_579061_userdebug_flashfiles_zip"
    if platform_name == "gordon_peak":
        zip_name = fastboot_utils.get_zip_name(zip_path=flash_files)
        if zip_name == "r0_bxtp_abl":
            image_platform = "image_m_bxt"
            eb_user_patch = "eb_579061_user_flashfiles_zip"
            eb_userdebug_patch = "eb_579061_userdebug_flashfiles_zip"
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
	key, val = entry.split("=")
	args[key] = val
flash_files = args["flash_files"]
partition_name = args["partition_name"]
file_name = args["file_name"]

##### test start #####
try:
	os.system("mkdir -p ./temp/files/flash ./temp/image/n ./temp/image/n-1")
	fastboot_utils.download_flash_scripts()

	conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
	fastboot_utils.download_file(url=conf_url, local_filename="./temp/fastboot.conf")
	config = ConfigParser.ConfigParser()
	config.read("./temp/fastboot.conf")
	fastboot_path = config.get("fastboot", "path")

	platform_name = fastboot_utils.get_platform_name(serial=serial)
	if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
	if platform_name == "gordon_peak":
		ram_value = fastboot_utils.get_bxt_ram(serial=serial)
		if ram_value == "2g": image_platform = "image_o_bxt_2g"
		if ram_value == "4g": image_platform = "image_o_bxt_4g"
		if ram_value == "8g": image_platform = "image_o_bxt_4g"
	n_1_flashfiles_zip_path = config.get(image_platform, "n_1_flashfiles_zip")
	n_1_flashfiles_zip_name = n_1_flashfiles_zip_path.split("/")[-1]
	fastboot_utils.download_file(url = fastboot_path + n_1_flashfiles_zip_path, local_filename = "./temp/image/n-1/" + n_1_flashfiles_zip_name)
示例#7
0
flash_files = args["flash_files"]

##### test start #####
test_case_list = {"tipc_test_connect_10": "tipc-test -t connect -r 10", "tipc_test_connect_foo_10": "tipc-test -t connect_foo -r 10", \
   "tipc_test_echo_10": "tipc-test -t echo -r 10", "tipc_test_select_10": "tipc-test -t select -r 10", \
   "tipc_test_blocked_read": "tipc-test -t blocked_read", "tipc_test_closer1_10": "tipc-test -t closer1 -r 10", \
   "tipc_test_closer2_10": "tipc-test -t closer2 -r 10", "tipc_test_dev_uuid": "tipc-test -t dev-uuid", \
   "tipc_test_ta_access": "tipc-test -t ta-access", "tipc_test_closer3_10": "tipc-test -t closer3 -r 10", \
   "tipc_test_connect_64_64": "tipc-test -t connect -m 64 -b 64"}
test_result_list = {}
fail_case_list = {}

try:
    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/Security/M/security.conf"
    os.system("mkdir -p ./temp/files ./temp/tipc ./temp/new_image")
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/security.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/security.conf")
    security_path = config.get("security", "path")

    boot_device_script_path = config.get("files", "boot_device_script")
    boot_device_script_name = boot_device_script_path.split("/")[-1]
    fastboot_utils.download_file(url=security_path + boot_device_script_path,
                                 local_filename="./temp/files/" +
                                 boot_device_script_name)
    flash_image_script_path = config.get("files", "flash_image_script")
    flash_image_script_name = flash_image_script_path.split("/")[-1]
    fastboot_utils.download_file(url=security_path + flash_image_script_path,
                                 local_filename="./temp/files/" +
                                 flash_image_script_name)
    tipc_file_path = config.get("tipc", "file_path")
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    n_img_zip_path = config.get(image_platform, "n_img_zip")
    n_img_zip_name = n_img_zip_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + n_img_zip_path,
                                 local_filename="./temp/image/n/" +
示例#9
0
from testlib.scripts.android.fastboot import fastboot_utils

##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/files/resources")

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    simg2img_zip_path = config.get("files", "simg2img_zip")
    simg2img_zip_name = simg2img_zip_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + simg2img_zip_path,
                                 local_filename="./temp/files/resources/" +
                                 simg2img_zip_name)

    fastboot_utils.unpack_the_zip(file_name=flash_files,
                                  temp_path=r"./temp/image/n/flashfiles")
    fastboot_utils.unpack_the_zip(file_name="./temp/files/resources/" +
                                  simg2img_zip_name,
                                  temp_path=r"./temp/files/resources")
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n/img")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    user_signed_corrupted_boot_path = config.get(image_platform,
                                                 "user_signed_corrupted_boot")
    user_signed_corrupted_boot_name = user_signed_corrupted_boot_path.split(
        "/")[-1]
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/eb/testos")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    ifwi_gr_mrb_b1_bin_path = config.get(image_platform,
                                         "eb_testos_ifwi_gr_mrb_b1_bin")
    ifwi_gr_mrb_b1_bin_name = ifwi_gr_mrb_b1_bin_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + ifwi_gr_mrb_b1_bin_path,
                                 local_filename="./temp/image/eb/testos/" +
                                 ifwi_gr_mrb_b1_bin_name)
    testos_img_path = config.get(image_platform, "eb_testos_testos_img")
    testos_img_name = testos_img_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + testos_img_path,
示例#12
0
##### initialization #####
globals().update(vars(get_args(sys.argv)))
args = {}
for entry in script_args:
    key, val = entry.split("=")
    args[key] = val
flash_files = args["flash_files"]

##### test start #####
try:
    os.system("mkdir -p ./temp/files/flash ./temp/image/n/img")
    fastboot_utils.download_flash_scripts()

    conf_url = "https://shstor001.sh.intel.com/artifactory/acs_test_artifacts/OTC_Android_Auto_Test_Suite/resources/EBImage/System_FastBoot/fastboot.conf"
    fastboot_utils.download_file(url=conf_url,
                                 local_filename="./temp/fastboot.conf")
    config = ConfigParser.ConfigParser()
    config.read("./temp/fastboot.conf")
    fastboot_path = config.get("fastboot", "path")

    platform_name = fastboot_utils.get_platform_name(serial=serial)
    if platform_name == "bxtp_abl": image_platform = "image_m_bxt"
    if platform_name == "gordon_peak":
        ram_value = fastboot_utils.get_bxt_ram(serial=serial)
        if ram_value == "2g": image_platform = "image_o_bxt_2g"
        if ram_value == "4g": image_platform = "image_o_bxt_4g"
        if ram_value == "8g": image_platform = "image_o_bxt_4g"
    vbmeta_v1_path = config.get(image_platform, "vbmeta_v1")
    vbmeta_v1_name = vbmeta_v1_path.split("/")[-1]
    fastboot_utils.download_file(url=fastboot_path + vbmeta_v1_path,
                                 local_filename="./temp/image/n/img/" +