@@ -41,14 +41,6 @@ def setUpClass(cls):
41
41
Adb .uninstall (cls .app_id , device_id , assert_success = False )
42
42
Tns .platform_add_android (APP_NAME , framework_path = Android .FRAMEWORK_PATH )
43
43
44
- @staticmethod
45
- def check_file_in_zip (zip_file , file_name_to_check ):
46
- files_list = File .get_files_names_in_zip (zip_file )
47
- for current_file in files_list :
48
- if file_name_to_check in str (current_file .filename ):
49
- return True
50
- return False
51
-
52
44
def test_100_build_app_with_abi_split_and_snapshot (self ):
53
45
"""
54
46
Test build with abi split and snapshot. Also check if the apk for emulator is working
@@ -83,31 +75,31 @@ def test_100_build_app_with_abi_split_and_snapshot(self):
83
75
84
76
app_x86_64_release_path = os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH ,
85
77
"app-x86_64-release.apk" )
86
- assert self . check_file_in_zip (app_x86_64_release_path , os .path .join ("x86_64" , "libNativeScript.so" ))
78
+ assert File . is_file_in_zip (app_x86_64_release_path , os .path .join ("x86_64" , "libNativeScript.so" ))
87
79
assert File .exists (app_x86_64_release_path )
88
80
89
81
app_arm64_v8a_release_path = os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH ,
90
82
"app-arm64-v8a-release.apk" )
91
83
assert File .exists (app_arm64_v8a_release_path )
92
- assert self . check_file_in_zip (app_arm64_v8a_release_path , os .path .join ("arm64-v8a" , "libNativeScript.so" ))
84
+ assert File . is_file_in_zip (app_arm64_v8a_release_path , os .path .join ("arm64-v8a" , "libNativeScript.so" ))
93
85
94
86
app_armeabi_v7a_release_path = os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH ,
95
87
"app-armeabi-v7a-release.apk" )
96
88
assert File .exists (app_armeabi_v7a_release_path )
97
- assert self . check_file_in_zip (app_armeabi_v7a_release_path , os .path .join ("armeabi-v7a" , "libNativeScript.so" ))
89
+ assert File . is_file_in_zip (app_armeabi_v7a_release_path , os .path .join ("armeabi-v7a" , "libNativeScript.so" ))
98
90
99
91
app_x86_release_path = os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH ,
100
92
"app-x86-release.apk" )
101
93
assert File .exists (app_x86_release_path )
102
- assert self . check_file_in_zip (app_x86_release_path , os .path .join ("x86" , "libNativeScript.so" ))
94
+ assert File . is_file_in_zip (app_x86_release_path , os .path .join ("x86" , "libNativeScript.so" ))
103
95
104
96
app_universal_release_path = os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH ,
105
97
"app-universal-release.apk" )
106
98
assert File .exists (app_universal_release_path )
107
- assert self . check_file_in_zip (app_universal_release_path , os .path .join ("arm64-v8a" , "libNativeScript.so" ))
108
- assert self . check_file_in_zip (app_universal_release_path , os .path .join ("armeabi-v7a" , "libNativeScript.so" ))
109
- assert self . check_file_in_zip (app_universal_release_path , os .path .join ("x86" , "libNativeScript.so" ))
110
- assert self . check_file_in_zip (app_universal_release_path , os .path .join ("x86_64" , "libNativeScript.so" ))
99
+ assert File . is_file_in_zip (app_universal_release_path , os .path .join ("arm64-v8a" , "libNativeScript.so" ))
100
+ assert File . is_file_in_zip (app_universal_release_path , os .path .join ("armeabi-v7a" , "libNativeScript.so" ))
101
+ assert File . is_file_in_zip (app_universal_release_path , os .path .join ("x86" , "libNativeScript.so" ))
102
+ assert File . is_file_in_zip (app_universal_release_path , os .path .join ("x86_64" , "libNativeScript.so" ))
111
103
112
104
AbiSplitHelper .assert_apk (
113
105
os .path .join (TEST_RUN_HOME , APP_NAME , PLATFORM_ANDROID_APK_RELEASE_PATH , "app-x86-release.apk" ),
0 commit comments