[TC Fixed] Change the 'find' command
[platform/core/dotnet/launcher.git] / tests / TCs / 1_AOT / AOT.py
index 409c342..8be7e01 100755 (executable)
@@ -29,8 +29,7 @@ def TC_01():
     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")
@@ -60,8 +59,7 @@ def TC_02():
     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")
@@ -102,8 +100,7 @@ def TC_03():
     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")