if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" in raw:
+ if exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" not in raw:
+ if not exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should exist"
raw = cmd(f"shell find {root_path}/bin/.native_image/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" in raw:
+ if exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
- if f"{root_path}/bin/libSkiaSharp.so" not in raw:
- return "FAIL : The libSkiaSharp.so library should exist"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
if "OK" not in check_library_arch(f"{root_path}", "libSkiaSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" in raw:
+ if exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" not in raw:
+ if not exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should exist"
raw = cmd(f"shell find {root_path}/bin/.native_image/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" in raw:
+ if exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should not exist"
return "PASS"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
return "PASS"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist only in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
- if f"{root_path}/bin/libSkiaSharp.so" not in raw:
- return "FAIL : The libSkiaSharp.so library should exist only"
if "->" in raw:
return "FAIL : The libSkiaSharp.so library should not be a symbolic link"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
pid = launch_and_get_pid(f"-e", f"{pkg_id}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
pid = launch_and_get_pid(f"-e", f"{pkg_id}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
- raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll")
- if "No such file or directory" not in raw:
+ if exist(f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll"):
return f"FAIL : The Xamarin.Forms/4.8.0.1364 nuget should not exist in {DOTNET_DIR}"
-
- raw = cmd(f"shell find {DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll")
- if "No such file or directory" not in raw:
+
+ if exist(f"{DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll"):
return f"FAIL : The Newtonsoft.Json/12.0.1 nuget should not exist in {DOTNET_DIR}"
pid = launch_and_get_pid(f"-e", f"{pkg_id}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" in raw:
+ if exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should not exist"
- raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll")
- if "No such file or directory" not in raw:
+ if exist(f"{DOTNET_DIR}Xamarin.Forms/4.8.0.1364/ -name *.dll"):
return f"FAIL : The Xamarin.Forms/4.8.0.1364 nuget should not exist in {DOTNET_DIR}"
-
- raw = cmd(f"shell find {DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll")
- if "No such file or directory" not in raw:
+
+ if exist(f"{DOTNET_DIR}Newtonsoft.Json/12.0.1/ -name *.dll"):
return f"FAIL : The Newtonsoft.Json/12.0.1 nuget should not exist in {DOTNET_DIR}"
- raw = cmd(f"shell find {DOTNET_DIR}sqlite-net-base/1.7.335/ -name *.dll")
- if "No such file or directory" not in raw:
+ if exist(f"{DOTNET_DIR}sqlite-net-base/1.7.335/ -name *.dll"):
return f"FAIL : The sqlite-net-base/1.7.335 nuget should not exist in {DOTNET_DIR}"
-
- raw = cmd(f"shell find {DOTNET_DIR}SQLitePCLRaw.core/2.0.3/ -name *.dll")
- if "No such file or directory" not in raw:
+
+ if exist(f"{DOTNET_DIR}SQLitePCLRaw.core/2.0.3/ -name *.dll"):
return f"FAIL : The SQLitePCLRaw.core/2.0.3 nuget should not exist in {DOTNET_DIR}"
pid = launch_and_get_pid(f"-e", f"{pkg_id}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id1}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
sln_name = "Launcher_TC_TAC_06.Tizen"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id2}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
raw = cmd(f"uninstall {pkg_id1}")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
pid = launch_and_get_pid(f"-e", f"{pkg_id2}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
raw = cmd(f"uninstall {pkg_id}")
if "key[end] val[ok]" not in raw:
return f"FAIL : Uninstall the application for {pkg_id}"
- raw = cmd(f"shell find {DOTNET_DIR}Xamarin.Forms/4.4.0.991864/ -name *.dll")
- if "No such file or directory" not in raw:
+ if exist(f"{DOTNET_DIR}Xamarin.Forms/4.4.0.991864/ -name *.dll"):
return f"FAIL : The Xamarin.Forms/4.4.0.991864 nuget should not exist in {DOTNET_DIR}"
return "PASS"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
sln_name = "Launcher_TC_TAC_09.Tizen"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
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
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if sha in raw:
return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
- raw = cmd(f"shell find {root_path}/bin/ -name libSkiaSharp.so")
- if f"{root_path}/bin/libSkiaSharp.so" in raw:
+ if exist(f"{root_path}/bin/libSkiaSharp.so"):
return "FAIL : The libSkiaSharp.so library should not exist in the application"
pid = launch_and_get_pid(f"-e", f"{pkg_id}")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if sha in raw:
return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
if sha in raw:
return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist only in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
- if f"{root_path}/bin/libSkiaSharp.so" not in raw:
- return "FAIL : The libSkiaSharp.so library should exist only"
if "->" in raw:
return "FAIL : The libSkiaSharp.so library should not be a symbolic link"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id1}"
+ if not exist(f"{root_path}/bin/libHarfBuzzSharp.so"):
+ return "FAIL : The libHarfBuzzSharp.so library should exist in the application"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libHarfBuzzSharp.so")
if (f"{root_path}/bin/libHarfBuzzSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libHarfBuzzSharp.so.." not in raw):
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id2}"
- raw = cmd(f"shell ls -alZ {root_path}/bin/libHarfBuzzSharp.so")
- if f"{root_path}/bin/libHarfBuzzSharp.so" not in raw:
+ if not exist(f"{root_path}/bin/libHarfBuzzSharp.so"):
return "FAIL : The libHarfBuzzSharp.so library should exist"
+ raw = cmd(f"shell ls -alZ {root_path}/bin/libHarfBuzzSharp.so")
+ if (f"{root_path}/bin/libHarfBuzzSharp.so" not in raw) or \
+ (f"{DOTNET_DIR}Libraries/libHarfBuzzSharp.so.." not in raw):
+ return "FAIL : The libHarfBuzzSharp.so library should exist or be a symbolic link"
+
if "OK" not in check_library_arch(f"{root_path}", "libHarfBuzzSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
+ if not exist(f"{root_path}/bin/libSkiaSharp.so"):
+ return "FAIL : The libSkiaSharp.so library should exist"
+
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
(f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." not in raw):
# The `dotnettool` works normally.
def TC_01():
- raw = cmd(f"shell find /usr/bin/ -name dotnettool")
- if "/usr/bin/dotnettool" not in raw:
+ if not exist("/usr/bin/dotnettool")
return "FAIL : The dotnettool works normally"
raw = cmd(f"shell dotnettool")
def TC_02():
cmd(f"shell dotnettool --ni-system")
- raw = cmd(f"shell find {RUNTIME_DIR} -name {SPC_DLL}.Backup")
- if f"{RUNTIME_DIR}{SPC_DLL}.Backup" not in raw:
+ if not exist(f"{RUNTIME_DIR}{SPC_DLL}.Backup"):
return "FAIL : Create the platform native image"
raw = cmd(f"shell find {RUNTIME_DIR} -name *.ni.dll")
def TC_03():
cmd(f"shell dotnettool --ni-reset-system")
- raw = cmd(f"shell find {RUNTIME_DIR} -name {SPC_DLL}.Backup")
- if f"{RUNTIME_DIR}{SPC_DLL}.Backup" in raw:
+ if exist(f"{RUNTIME_DIR}{SPC_DLL}.Backup"):
return "FAIL : Remove the platform native image"
return "PASS"
# Create native image for `System.Private.CoreLib.dll`.
def TC_04():
- raw = cmd(f"shell find {RUNTIME_DIR} -name {SPC_DLL}.Backup")
- if f"{RUNTIME_DIR}{SPC_DLL}.Backup" in raw:
+ if exist(f"{RUNTIME_DIR}{SPC_DLL}.Backup"):
cmd(f"shell rm {RUNTIME_DIR}{SPC_DLL}")
cmd(f"shell mv {RUNTIME_DIR}{SPC_DLL}.Backup {RUNTIME_DIR}{SPC_DLL}")
"System.Private.CoreLib.ni.dll generated successfully." not in raw:
return f"FAIL : Create native image for {SPC_DLL}"
- raw = cmd(f"shell find {RUNTIME_DIR} -name {SPC_DLL}.Backup")
- if f"{RUNTIME_DIR}{SPC_DLL}.Backup" not in raw:
+ if not exist(f"{RUNTIME_DIR}{SPC_DLL}.Backup"):
return f"FAIL : Create native image for {SPC_DLL}"
return "PASS"
cmd(f"shell unzip /tmp/{ibcdata_zip} -d {IBCDATA_DIR}")
cmd(f"shell chsmack -a _ {IBCDATA_DIR} -r")
- raw = cmd(f"shell find {IBCDATA_DIR}netstandard.ibc")
- if f"No such file or directory" in raw:
+ if not exist(f"{IBCDATA_DIR}netstandard.ibc"):
return "FAIL : The netstandard.ibc file should exist"
raw = cmd(f"shell dotnettool --ibc-dir /usr/share/dotnet.tizen/ibcdata/ --ni-dll {RUNTIME_DIR}netstandard.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" not in raw:
+ if not exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should exist"
cmd(f"shell dotnettool --ni-reset-pkg {pkg_id}")
- raw = cmd(f"shell ls {root_path}/bin/.native_image")
- if "No such file or directory" not in raw:
+ if exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell ls {root_path}/bin/.native_image")
- if "No such file or directory" not in raw:
+ if exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder not should exist"
cmd(f"shell dotnettool --ni-pkg {pkg_id}")
- raw = cmd(f"shell find {root_path}/bin/ -name .native_image")
- if ".native_image" not in raw:
+ if not exist(f"{root_path}/bin/.native_image"):
return "FAIL : The .native_image folder should exist"
raw = cmd(f"shell find {root_path}/bin/.native_image/ -name *.ni.dll")
if root_path == "None":
return f"FAIL : Get the root path for {pkg_id}"
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
cmd(f"shell dotnettool --tac-disable-pkg {pkg_id}")
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" in raw:
+ if exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -maxdepth 1 -name *.dll -not -name *.ni.dll")
cmd(f"shell dotnettool --tac-disable-pkg {pkg_id}")
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" in raw:
+ if exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should not exist"
raw = cmd(f"shell find {root_path}/bin/ -maxdepth 1 -name *.dll -not -name *.ni.dll")
cmd(f"shell dotnettool --tac-enable-pkg {pkg_id}")
- raw = cmd(f"shell find {root_path}/bin/ -name .tac_symlink")
- if ".tac_symlink" not in raw:
+ if not exist(f"{root_path}/bin/.tac_symlink"):
return "FAIL : The .tac_symlink folder should exist"
raw = cmd(f"shell find {root_path}/bin/.tac_symlink/ -name *.dll -not -name *.ni.dll")
lines = [l for l in raw.splitlines() if ".ni.dll" not in l]
for dll in lines:
origin_path = dll.split("->")[1].strip()
- raw = cmd(f"shell ls -alZ {origin_path}")
- if "No such file or directory" in raw:
+ if not exist(f"{origin_path}"):
return "FAIL : The original file of the symbolic link must exist"
return "PASS"
subprocess.run((f"rm ./{library}").split(), encoding="utf-8", stdout=subprocess.PIPE).stdout
return "OK"
+# Check if the file or directory exists
+def exist(path):
+ raw = cmd(f"shell find {path}")
+ if "No such file or directory" in raw:
+ return False
+ else:
+ return True
+
# Run the test array
def run_tc_array(module_name, tc_array):
p = 0