2 import os, subprocess, sys, argparse
3 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
11 # The `Launcher_TC_TAC_01` application must have TAC applied.
13 sln_name = "Launcher_TC_TAC_01.Tizen"
15 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
17 return f"FAIL : Get the tpk path for {sln_name}"
19 if "OK" not in app_install(f"{tpk_path}"):
20 return f"FAIL : Install the application for {tpk_path}"
22 pkg_id = f"org.tizen.example.Launcher_TC_TAC_01.Tizen"
24 root_path = get_root_path(f"{pkg_id}")
25 if root_path == "None":
26 return f"FAIL : Get the root path for {pkg_id}"
28 if not exist(f"{root_path}/bin/.tac_symlink"):
29 return "FAIL : The .tac_symlink folder should exist"
31 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
32 lines1 = [l for l in raw.splitlines()]
33 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.6.0.967/ -name *.dll -not -name *.ni.dll")
34 lines2 = [l for l in raw.splitlines()]
35 if len(lines1) != len(lines2):
36 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
38 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
39 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
41 origin_path = dll.split("->")[1].strip()
42 if not exist(f"{origin_path}"):
43 return "FAIL : The original file of the symbolic link must exist"
45 pid = launch_and_get_pid(f"-e", f"{pkg_id}")
47 return f"FAIL : Get the pid for {pkg_id}"
49 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Xamarin.Forms.*.dll")
50 if (f"{DOTNET_DIR}Xamarin.Forms/4.6.0.967/Xamarin.Forms.Platform.Tizen.dll" not in raw) or \
51 (f"{DOTNET_DIR}Xamarin.Forms/4.6.0.967/Xamarin.Forms.Core.dll" not in raw) or \
52 (f"{DOTNET_DIR}Xamarin.Forms/4.6.0.967/Xamarin.Forms.Platform.dll" not in raw):
53 return "FAIL : The Xamarin.Forms in the TAC should be loaded when running the application"
55 cmd(f"shell app_launcher -t {pkg_id}")
59 # The `Launcher_TC_TAC_02` application must have TAC applied.
61 sln_name = "Launcher_TC_TAC_02.Tizen"
63 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
65 return f"FAIL : Get the tpk path for {sln_name}"
67 if "OK" not in app_install(f"{tpk_path}"):
68 return f"FAIL : Install the application for {tpk_path}"
70 pkg_id = f"org.tizen.example.Launcher_TC_TAC_00.Tizen"
72 root_path = get_root_path(f"{pkg_id}")
73 if root_path == "None":
74 return f"FAIL : Get the root path for {pkg_id}"
76 if not exist(f"{root_path}/bin/.tac_symlink"):
77 return "FAIL : The .tac_symlink folder should exist"
79 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
80 lines1 = [l for l in raw.splitlines()]
81 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll -not -name *.ni.dll")
82 lines2 = [l for l in raw.splitlines()]
83 raw = cmd(f"shell find {DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll -not -name *.ni.dll")
84 lines3 = [l for l in raw.splitlines()]
85 if len(lines1) != len(lines2)+len(lines3):
86 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
88 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
89 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
91 origin_path = dll.split("->")[1].strip()
92 if not exist(f"{origin_path}"):
93 return "FAIL : The original file of the symbolic link must exist"
95 pid = launch_and_get_pid(f"-e", f"{pkg_id}")
97 return f"FAIL : Get the pid for {pkg_id}"
99 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Xamarin.Forms.*.dll")
100 if (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/Xamarin.Forms.Platform.Tizen.dll" not in raw) or \
101 (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/Xamarin.Forms.Core.dll" not in raw) or \
102 (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/Xamarin.Forms.Platform.dll" not in raw):
103 return "FAIL : The Xamarin.Forms in the TAC should be loaded when running the application"
105 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Newtonsoft.Json.dll")
106 if f"{DOTNET_DIR}Newtonsoft.Json/12.0.1/Newtonsoft.Json.dll" not in raw:
107 return "FAIL : The Newtonsoft.Json in the TAC should be loaded when running the application"
109 cmd(f"shell app_launcher -t {pkg_id}")
113 # The `Launcher_TC_TAC_03` application is normally TAC applied when updating.
115 sln_name = "Launcher_TC_TAC_03.Tizen"
117 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
119 return f"FAIL : Get the tpk path for {sln_name}"
121 if "OK" not in app_install(f"{tpk_path}"):
122 return f"FAIL : Install the application for {tpk_path}"
124 pkg_id = f"org.tizen.example.Launcher_TC_TAC_00.Tizen"
126 root_path = get_root_path(f"{pkg_id}")
127 if root_path == "None":
128 return f"FAIL : Get the root path for {pkg_id}"
130 if not exist(f"{root_path}/bin/.tac_symlink"):
131 return "FAIL : The .tac_symlink folder should exist"
133 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
134 lines1 = [l for l in raw.splitlines()]
135 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.8.0.1687/ -name *.dll -not -name *.ni.dll")
136 lines2 = [l for l in raw.splitlines()]
137 raw = cmd(f"shell find {DOTNET_DIR}sqlite-net-base/1.7.335/ -name *.dll -not -name *.ni.dll")
138 lines3 = [l for l in raw.splitlines()]
139 raw = cmd(f"shell find {DOTNET_DIR}SQLitePCLRaw.core/2.0.3/ -name *.dll -not -name *.ni.dll")
140 lines4 = [l for l in raw.splitlines()]
141 if len(lines1) != len(lines2)+len(lines3)+len(lines4):
142 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
144 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
145 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
147 origin_path = dll.split("->")[1].strip()
148 if not exist(f"{origin_path}"):
149 return "FAIL : The original file of the symbolic link must exist"
151 if exist(f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll"):
152 return f"FAIL : The Xamarin.Forms/4.8.0.1364 nuget should not exist in {DOTNET_DIR}"
154 if exist(f"{DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll"):
155 return f"FAIL : The Newtonsoft.Json/12.0.1 nuget should not exist in {DOTNET_DIR}"
157 pid = launch_and_get_pid(f"-e", f"{pkg_id}")
159 return f"FAIL : Get the pid for {pkg_id}"
161 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Xamarin.Forms.*.dll")
162 if (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1687/Xamarin.Forms.Platform.Tizen.dll" not in raw) or \
163 (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1687/Xamarin.Forms.Core.dll" not in raw) or \
164 (f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1687/Xamarin.Forms.Platform.dll" not in raw):
165 return "FAIL : The Xamarin.Forms in the TAC should be loaded when running the application"
167 raw = cmd(f"shell cat /proc/{pid}/smaps | grep SQLite-net.dll")
168 if f"{DOTNET_DIR}sqlite-net-base/1.7.335/SQLite-net.dll" not in raw:
169 return "FAIL : The sqlite-net-base in the TAC should be loaded when running the application"
171 raw = cmd(f"shell cat /proc/{pid}/smaps | grep SQLitePCLRaw.core.dll")
172 if f"{DOTNET_DIR}SQLitePCLRaw.core/2.0.3/SQLitePCLRaw.core.dll" not in raw:
173 return "FAIL : The SQLitePCLRaw.core in the TAC should be loaded when running the application"
175 cmd(f"shell app_launcher -t {pkg_id}")
179 # The `Launcher_TC_TAC_04` application should not apply TAC when updating.
181 sln_name = "Launcher_TC_TAC_04.Tizen"
183 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
185 return f"FAIL : Get the tpk path for {sln_name}"
187 if "OK" not in app_install(f"{tpk_path}"):
188 return f"FAIL : Install the application for {tpk_path}"
190 pkg_id = f"org.tizen.example.Launcher_TC_TAC_00.Tizen"
192 root_path = get_root_path(f"{pkg_id}")
193 if root_path == "None":
194 return f"FAIL : Get the root path for {pkg_id}"
196 if exist(f"{root_path}/bin/.tac_symlink"):
197 return "FAIL : The .tac_symlink folder should not exist"
199 if exist(f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll"):
200 return f"FAIL : The Xamarin.Forms/4.8.0.1364 nuget should not exist in {DOTNET_DIR}"
202 if exist(f"{DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll"):
203 return f"FAIL : The Newtonsoft.Json/12.0.1 nuget should not exist in {DOTNET_DIR}"
205 if exist(f"{DOTNET_DIR}sqlite-net-base/1.7.335/ -name *.dll"):
206 return f"FAIL : The sqlite-net-base/1.7.335 nuget should not exist in {DOTNET_DIR}"
208 if exist(f"{DOTNET_DIR}SQLitePCLRaw.core/2.0.3/ -name *.dll"):
209 return f"FAIL : The SQLitePCLRaw.core/2.0.3 nuget should not exist in {DOTNET_DIR}"
211 pid = launch_and_get_pid(f"-e", f"{pkg_id}")
213 return f"FAIL : Get the pid for {pkg_id}"
215 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Xamarin.Forms.*.dll")
216 if (f"{root_path}/bin/Xamarin.Forms.Platform.Tizen.dll" not in raw) or \
217 (f"{root_path}/bin/Xamarin.Forms.Core.dll" not in raw) or \
218 (f"{root_path}/bin/Xamarin.Forms.Platform.dll" not in raw):
219 return "FAIL : The Xamarin.Forms in the application should be loaded when running the application"
221 cmd(f"shell app_launcher -t {pkg_id}")
225 # The `Launcher_TC_TAC_05`, `Launcher_TC_TAC_06` applications using the same nuget are normally TAC applied.
227 sln_name = "Launcher_TC_TAC_05.Tizen"
229 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
231 return f"FAIL : Get the tpk path for {sln_name}"
233 if "OK" not in app_install(f"{tpk_path}"):
234 return f"FAIL : Install the application for {tpk_path}"
236 pkg_id1 = f"org.tizen.example.Launcher_TC_TAC_05.Tizen"
238 root_path = get_root_path(f"{pkg_id1}")
239 if root_path == "None":
240 return f"FAIL : Get the root path for {pkg_id1}"
242 if not exist(f"{root_path}/bin/.tac_symlink"):
243 return "FAIL : The .tac_symlink folder should exist"
245 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
246 lines1 = [l for l in raw.splitlines()]
247 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/ -name *.dll -not -name *.ni.dll")
248 lines2 = [l for l in raw.splitlines()]
249 if len(lines1) != len(lines2):
250 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
252 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
253 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
255 origin_path = dll.split("->")[1].strip()
256 if not exist(f"{origin_path}"):
257 return "FAIL : The original file of the symbolic link must exist"
259 sln_name = "Launcher_TC_TAC_06.Tizen"
261 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
263 return f"FAIL : Get the tpk path for {sln_name}"
265 if "OK" not in app_install(f"{tpk_path}"):
266 return f"FAIL : Install the application for {tpk_path}"
268 pkg_id2 = f"org.tizen.example.Launcher_TC_TAC_06.Tizen"
270 root_path = get_root_path(f"{pkg_id2}")
271 if root_path == "None":
272 return f"FAIL : Get the root path for {pkg_id2}"
274 if not exist(f"{root_path}/bin/.tac_symlink"):
275 return "FAIL : The .tac_symlink folder should exist"
277 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
278 lines1 = [l for l in raw.splitlines()]
279 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/ -name *.dll -not -name *.ni.dll")
280 lines2 = [l for l in raw.splitlines()]
281 if len(lines1) != len(lines2):
282 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
284 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
285 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
287 origin_path = dll.split("->")[1].strip()
288 if not exist(f"{origin_path}"):
289 return "FAIL : The original file of the symbolic link must exist"
291 raw = cmd(f"uninstall {pkg_id1}")
292 if "key[end] val[ok]" not in raw:
293 return f"FAIL : Uninstall the application for {pkg_id1}"
295 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
296 lines1 = [l for l in raw.splitlines()]
297 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/ -name *.dll -not -name *.ni.dll")
298 lines2 = [l for l in raw.splitlines()]
299 if len(lines1) != len(lines2):
300 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
302 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
303 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
305 origin_path = dll.split("->")[1].strip()
306 if not exist(f"{origin_path}"):
307 return "FAIL : The original file of the symbolic link must exist"
309 pid = launch_and_get_pid(f"-e", f"{pkg_id2}")
311 return f"FAIL : Get the pid for {pkg_id2}"
313 raw = cmd(f"shell cat /proc/{pid}/smaps | grep Xamarin.Forms.*.dll")
314 if (f"{DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/Xamarin.Forms.Platform.Tizen.dll" not in raw) or \
315 (f"{DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/Xamarin.Forms.Core.dll" not in raw) or \
316 (f"{DOTNET_DIR}Xamarin.Forms/5.0.0.1558-pre3/Xamarin.Forms.Platform.dll" not in raw):
317 return "FAIL : The Xamarin.Forms in the TAC should be loaded when running the application"
319 cmd(f"shell app_launcher -t {pkg_id2}")
323 # The `Launcher_TC_TAC_07` application is normally TAC applied when uninstall.
325 sln_name = "Launcher_TC_TAC_07.Tizen"
327 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
329 return f"FAIL : Get the tpk path for {sln_name}"
331 if "OK" not in app_install(f"{tpk_path}"):
332 return f"FAIL : Install the application for {tpk_path}"
334 pkg_id = f"org.tizen.example.Launcher_TC_TAC_07.Tizen"
336 root_path = get_root_path(f"{pkg_id}")
337 if root_path == "None":
338 return f"FAIL : Get the root path for {pkg_id}"
340 if not exist(f"{root_path}/bin/.tac_symlink"):
341 return "FAIL : The .tac_symlink folder should exist"
343 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
344 lines1 = [l for l in raw.splitlines()]
345 raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.4.0.991864/ -name *.dll -not -name *.ni.dll")
346 lines2 = [l for l in raw.splitlines()]
347 if len(lines1) != len(lines2):
348 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
350 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
351 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
353 origin_path = dll.split("->")[1].strip()
354 if not exist(f"{origin_path}"):
355 return "FAIL : The original file of the symbolic link must exist"
357 raw = cmd(f"uninstall {pkg_id}")
358 if "key[end] val[ok]" not in raw:
359 return f"FAIL : Uninstall the application for {pkg_id}"
361 if exist(f"{DOTNET_DIR}Xamarin.Forms/4.4.0.991864/ -name *.dll"):
362 return f"FAIL : The Xamarin.Forms/4.4.0.991864 nuget should not exist in {DOTNET_DIR}"
366 # The `Launcher_TC_TAC_08` application should be applied to TAC, but The `Launcher_TC_TAC_09` application should not be applied to TAC.
368 raw = cmd(f"shell find {FRAMEWORK_DIR}/XSF.*")
370 cmd(f"shell mv {FRAMEWORK_DIR}/XSF.dll {FRAMEWORK_DIR}/XSF.dll2")
371 elif "XSF.ni.dll" in raw:
372 cmd(f"shell mv {FRAMEWORK_DIR}/XSF.ni.dll {FRAMEWORK_DIR}/XSF.ni.dll2")
374 sln_name = "Launcher_TC_TAC_08.Tizen"
376 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
378 return f"FAIL : Get the tpk path for {sln_name}"
380 if "OK" not in app_install(f"{tpk_path}"):
381 return f"FAIL : Install the application for {tpk_path}"
383 pkg_id = f"org.tizen.example.Launcher_TC_TAC_08.Tizen"
385 root_path = get_root_path(f"{pkg_id}")
386 if root_path == "None":
387 return f"FAIL : Get the root path for {pkg_id}"
389 if not exist(f"{root_path}/bin/.tac_symlink"):
390 return "FAIL : The .tac_symlink folder should exist"
392 raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
393 lines1 = [l for l in raw.splitlines()]
394 raw = cmd(f"shell find {DOTNET_DIR}XSF/1.0.0.0/ -name *.dll -not -name *.ni.dll")
395 lines2 = [l for l in raw.splitlines()]
396 if len(lines1) != len(lines2):
397 return "FAIL : The number of .dll in the .tac_symlink and .dll in the TAC must match"
399 raw = cmd(f"shell ls -alZ {root_path}/bin/.tac_symlink/*.dll")
400 lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
402 origin_path = dll.split("->")[1].strip()
403 if not exist(f"{origin_path}"):
404 return "FAIL : The original file of the symbolic link must exist"
406 sln_name = "Launcher_TC_TAC_09.Tizen"
408 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
410 return f"FAIL : Get the tpk path for {sln_name}"
412 if "OK" not in app_install(f"{tpk_path}"):
413 return f"FAIL : Install the application for {tpk_path}"
415 pkg_id = f"org.tizen.example.Launcher_TC_TAC_09.Tizen"
417 root_path = get_root_path(f"{pkg_id}")
418 if root_path == "None":
419 return f"FAIL : Get the root path for {pkg_id}"
421 raw = cmd(f"shell find {root_path}/bin/.tac_symlink -name XSF.dll -not -name XSF.ni.dll")
422 lines = [l for l in raw.splitlines()]
424 return "FAIL : The version is the same Nuget, but the SHA value is different"
426 pid = launch_and_get_pid(f"-e", f"{pkg_id}")
428 return f"FAIL : Get the pid for {pkg_id}"
430 raw = cmd(f"shell cat /proc/{pid}/smaps | grep XSF.dll")
431 if f"{root_path}/bin/XSF.dll" not in raw:
432 return "FAIL : The XSF in the application should be loaded when running the application"
434 cmd(f"shell app_launcher -t {pkg_id}")
438 # The Launcher_TC_TAC_10 application should match the information of nuget with the value of TAC DB.
440 sln_name = "Launcher_TC_TAC_10.Tizen"
442 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
444 return f"FAIL : Get the tpk path for {sln_name}"
446 if "OK" not in app_install(f"{tpk_path}"):
447 return f"FAIL : Install the application for {tpk_path}"
449 pkg_id = f"org.tizen.example.Launcher_TC_TAC_10.Tizen"
451 root_path = get_root_path(f"{pkg_id}")
452 if root_path == "None":
453 return f"FAIL : Get the root path for {pkg_id}"
455 if not exist(f"{root_path}/bin/.tac_symlink"):
456 return "FAIL : The .tac_symlink folder should exist"
458 raw = subprocess.run((f"sdb -s {serial} shell sqlite3 {DOTNET_DIR}.TAC.App.list.db").split(), stdout=subprocess.PIPE, input=f"select * from TAC;\n.q\n", encoding="utf-8").stdout
459 lines = [l for l in raw.splitlines() if f"{pkg_id}" in l]
462 if ("Xamarin.Forms/4.8.0.1560" in rcd) or \
463 ("Google.Apis.Core/1.49.0" in rcd) or \
464 ("Google.Apis/1.49.0" in rcd) or \
465 ("Newtonsoft.Json/12.0.3" in rcd):
469 return "FAIL : TAC database must have a valid value"
473 # The Launcher_TC_TAC_11 application must match the version of the nuget in .deps.json and the version of the nuget in TAC DB.
475 sln_name = "Launcher_TC_TAC_11.Tizen"
477 tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
479 return f"FAIL : Get the tpk path for {sln_name}"
481 if "OK" not in app_install(f"{tpk_path}"):
482 return f"FAIL : Install the application for {tpk_path}"
484 pkg_id = f"org.tizen.example.Launcher_TC_TAC_11.Tizen"
486 root_path = get_root_path(f"{pkg_id}")
487 if root_path == "None":
488 return f"FAIL : Get the root path for {pkg_id}"
490 raw = subprocess.run((f"sdb -s {serial} shell sqlite3 {DOTNET_DIR}.TAC.App.list.db").split(), stdout=subprocess.PIPE, input=f"select * from TAC;\n.q\n", encoding="utf-8").stdout
491 lines = [l for l in raw.splitlines() if f"{pkg_id}" in l]
493 name = nuget.split("|")[3]
494 version = nuget.split("|")[4]
495 raw = cmd(f"shell cat {root_path}/{sln_name}.deps.json | grep {name}/")
496 if f"{version}" not in f"{raw}":
504 cmd(f"shell mount -o remount,rw /")
507 tpk_list = search_tpk(f"{module_name}")
509 pn = run_tc_array(module_name, tc_array)
510 n = int(pn.split(":")[0])
511 f = int(pn.split(":")[1])
512 p = int(pn.split(":")[2])
514 if (len(tc_array) - n) != 0:
515 r = round(((p / (len(tc_array) - n)) * 100), 2)
516 print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n")
518 # Uninstall the application and restore to original state
520 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_01.Tizen")
521 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_00.Tizen")
522 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_06.Tizen")
523 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_07.Tizen")
524 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_08.Tizen")
525 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_09.Tizen")
526 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_10.Tizen")
527 cmd(f"uninstall org.tizen.example.Launcher_TC_TAC_11.Tizen")
529 cmd(f"shell mv {FRAMEWORK_DIR}/XSF.dll2 {FRAMEWORK_DIR}/XSF.dll")
530 cmd(f"shell mv {FRAMEWORK_DIR}/XSF.ni.dll2 {FRAMEWORK_DIR}/XSF.ni.dll")
534 parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)
535 parser.add_argument("TC_NUMBER", type=str, nargs="*", help="Individual excution")
536 args = parser.parse_args()
539 if args.TC_NUMBER and "TC_" in args.TC_NUMBER[0]:
541 for tc_num in args.TC_NUMBER:
542 if tc_num not in funcMap:
543 print(f"There is no {tc_num} test.")
546 tc_array.append(funcMap[tc_num])
548 tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09]
551 if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
552 serial = read_serial(sys.argv[1])
554 serial = read_serial(None)
557 print("No connected device(s).")
560 device = get_device_type()
561 print(f"=== Dotnet-Launcher [{device}] Test Case - ({module_name}) ===")
568 'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05, 'TC_06': TC_06, 'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09,
569 'TAC_TC_01': TC_01, 'TAC_TC_02': TC_02, 'TAC_TC_03': TC_03, 'TAC_TC_04': TC_04, 'TAC_TC_05': TC_05,
570 'TAC_TC_06': TC_06, 'TAC_TC_07': TC_07, 'TAC_TC_08': TC_08, 'TAC_TC_09': TC_09
574 if __name__ == "__main__":
577 except KeyboardInterrupt:
578 print("\nExit (Pressed Ctrl+C)")