[TC Fixed] Modify the log when the tc fails
authorj-h.choi <j-h.choi@samsung.com>
Wed, 13 Jan 2021 08:31:49 +0000 (17:31 +0900)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Thu, 21 Jan 2021 04:40:35 +0000 (13:40 +0900)
Change-Id: I0a3a663e7d3865a92468509f842af400e4dbb941

tests/TCs/5_TLC/TLC.py
tests/TCs/6_TOOL/TOOL.py

index 974ede7..1cf3367 100755 (executable)
@@ -41,7 +41,7 @@ def TC_01():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     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"
@@ -90,7 +90,7 @@ def TC_02():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     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"
@@ -143,7 +143,7 @@ def TC_03():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha in raw:
-        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
 
     if exist(f"{root_path}/bin/libSkiaSharp.so"):
         return "FAIL : The libSkiaSharp.so library should not exist in the application"
@@ -204,7 +204,7 @@ def TC_04():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     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"
@@ -257,7 +257,7 @@ def TC_05():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha in raw:
-        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
 
     if not exist(f"{root_path}/bin/libSkiaSharp.so"):
         return "FAIL : The libSkiaSharp.so library should exist in the application"
@@ -271,7 +271,7 @@ def TC_05():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     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"
@@ -336,7 +336,7 @@ def TC_06():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha in raw:
-        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
 
     if not exist(f"{root_path}/bin/libSkiaSharp.so"):
         return "FAIL : The libSkiaSharp.so library should exist only in the application"
@@ -409,7 +409,7 @@ def TC_07():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libHarfBuzzSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     sln_name = "Launcher_TC_TLC_08.Tizen"
 
@@ -445,7 +445,7 @@ def TC_07():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libHarfBuzzSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     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"
@@ -497,7 +497,7 @@ def TC_08():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha not in raw:
-        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
 
     raw = cmd(f"uninstall {pkg_id}")
     if "key[end] val[ok]" not in raw:
@@ -505,7 +505,7 @@ def TC_08():
 
     raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
     if sha in raw:
-       return f"FAIL : The libSkiaSharp.so library should not exist in {DONTET_DIR}"
+        return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
 
     return "PASS"
 
@@ -552,7 +552,7 @@ def TC_09():
 
         raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name {name}..{sha}")
         if f"{DOTNET_DIR}Libraries/{name}..{sha}" not in raw:
-            return f"FAIL : The {name} library should exist in {DOTNET_DIR}"
+            return f"FAIL : The {name} library should exist in {DOTNET_DIR}Libraries"
 
         is_exist = False
         for rcd in lines2:
index ce1b034..6e0c398 100755 (executable)
@@ -29,17 +29,21 @@ def TC_02():
 
     raw = cmd(f"shell find {RUNTIME_DIR} -name *.ni.dll")
     lines1 = [l for l in raw.splitlines()]
+    len1 = len(lines1) + 2 # System.Private.CoreLib.dll, System.Runtime.WindowsRuntime.dll
     raw = cmd(f"shell find {RUNTIME_DIR} -name *.dll -not -name *.ni.dll")
     lines2 = [l for l in raw.splitlines()]
-    if (len(lines1) + 2) != len(lines2):
-        return "FAIL : The number of .dll and .ni.dll must match"
+    len2 = len(lines2)
+    if len1 != len2:
+        return f"FAIL : The number of .dll({len2}) and .ni.dll({len1}) must match in the {RUNTIME_DIR}"
 
     raw = cmd(f"shell find {FRAMEWORK_DIR} -name *.ni.dll")
     lines1 = [l for l in raw.splitlines()]
+    len1 = len(lines1)
     raw = cmd(f"shell find {FRAMEWORK_DIR} -name *.dll -not -name *.ni.dll")
     lines2 = [l for l in raw.splitlines() if "/ref/" not in l]
-    if len(lines1) != len(lines2):
-        return "FAIL : The number of .dll and .ni.dll must match"
+    len2 = lne(lines2)
+    if len1 != len2:
+        return f"FAIL : The number of .dll({len2}) and .ni.dll({len1}) must match in the {FRAMEWORK_DIR}"
 
     for ni in lines1:
         is_same = False
@@ -129,7 +133,6 @@ def TC_08():
 
 # Create a native image for netstandard.dll by specifying the directory containing the IBC files.
 def TC_09():
-    current_path = os.path.abspath(__file__)
     packaging_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../packaging"))
     ibcdata_zip = ""