# Print command and option while creating native image for Tizen.dll.
def TC_20():
+ cmd(f"shell mount -o remount,rw /")
raw = cmd(f"shell dotnettool --print-cmd --ni-dll {FRAMEWORK_DIR}Tizen.dll")
if ("Tizen.ni.dll generated successfully." not in raw) or \
("==================== NI Commands =========================" not in raw) or \
("+ --jitpath" not in raw) or \
("+ /usr/share/dotnet.tizen/netcoreapp/libclrjit.so" not in raw) or \
("+ --targetarch" not in raw) or \
- ("+ armel" not in raw) or \
("+ --out-near-input" not in raw) or \
("+ --single-file-compilation" not in raw) or \
("+ --resilient" not in raw) or \
("+ -O" not in raw) or \
- ("+ -r:/usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/*.dll" not in raw) or \
- ("+ -r:/usr/share/dotnet.tizen/framework/*.dll" not in raw) or \
- ("+ -r:/usr/share/dotnet.tizen/framework/ref/*.dll" not in raw) or \
(f"+ {FRAMEWORK_DIR}Tizen.dll" not in raw) or \
("+ (null)" not in raw):
return "FAIL : Print command and option while creating native image for Tizen.dll"
# Create native image for netstandard.dll by adding options --inputbubble and --compilebubblegenerics.
def TC_21():
- raw = cmd(f"shell dotnettool --ni-dll --inputbubble {RUNTIME_DIR}netstandard.dll")
+ cmd(f"shell mount -o remount,rw /")
+ raw = cmd(f"shell dotnettool --ni-dll --inputbubble --print-cmd {RUNTIME_DIR}netstandard.dll")
if ("netstandard.ni.dll generated successfully." not in raw) or \
- (f"Moving R2R PE file: /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/netstandard.ni.dll.tmp to /usr/share/dotnet/shared/Microsoft.NETCore.App/6.0.0/netstandard.ni.dll" not in raw):
- return "FAIL : Create native image for netstandard.dll by adding options --inputbubble"
+ ("+ --inputbubble" not in raw) or \
+ ("+ --compilebubblegenerics" not in raw):
+ return "FAIL : Create native image for netstandard.dll by adding options --inputbubble and --compilebubblegenereics"
+
+ return "PASS"
+
+# Create native image for System.dll by adding options --inputbubble and --inputbubbleref.
+def TC_22():
+ cmd(f"shell mount -o remount,rw /")
+ raw = cmd(f"shell dotnettool --ni-dll --inputbubble --inputbubbleref {RUNTIME_DIR}crossgen2 --print-cmd {RUNTIME_DIR}System.dll")
+ if ("System.ni.dll generated successfully." not in raw) or \
+ ("+ --inputbubble" not in raw) or \
+ ("+ --inputbubbleref:/usr/share/dotnet.tizen/netcoreapp/crossgen2/*.dll" not in raw):
+ return "FAIL : Create native image for System.dll by adding options --inputbubble and --inputbubbleref"
+
+ return "PASS"
+
+# Create native image for System.Console.dll by adding option --ref.
+def TC_23():
+ cmd(f"shell mount -o remount,rw /")
+ raw = cmd(f"shell dotnettool --ni-dll --ref {RUNTIME_DIR}:{RUNTIME_DIR}crossgen2 --print-cmd {RUNTIME_DIR}System.Console.dll")
+ if ("System.Console.ni.dll generated successfully." not in raw) or \
+ (f"+ -r:{RUNTIME_DIR}/*.dll" not in raw) or \
+ (f"+ -r:{RUNTIME_DIR}crossgen2/*.dll" not in raw):
+ return "FAIL : Create native image for System.Console.dll by adding option --ref"
+
+ return "PASS"
+
+# Create native image for mscorlib.dll by adding option --no-pipeline
+def TC_24():
+ cmd(f"shell mount -o remount,rw /")
+ raw = cmd(f"shell dotnettool --ni-dll --no-pipeline --print-cmd {RUNTIME_DIR}mscorlib.dll")
+ if ("mscorlib.ni.dll generated successfully." not in raw) or \
+ ("+ -o" not in raw) or \
+ ("/mscorlib.ni.dll" not in raw):
+ return "FAIL : Create native image for mscorlib.dll by adding option --no-pipeline"
return "PASS"
-#def TC_22():
+#def TC_25():
#dotnettool --rm-app-profile
-#dotnettool --rm-alll-app-profile
-#dotnettool --no-pipeline --inputbubbleref --ref
+#dotnettool --rm-all-app-profile
# Run the test
def run():
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.ni.dll")
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.Log.ni.dll")
cmd(f"shell rm {RUNTIME_DIR}netstandard.ni.dll")
+ cmd(f"shell rm {RUNTIME_DIR}System.ni.dll")
+ cmd(f"shell rm {RUNTIME_DIR}System.Console.ni.dll")
+ cmd(f"shell rm {RUNTIME_DIR}mscorlib.ni.dll")
# cmd(f"shell rm -rf {IBCDATA_DIR}")
tc_array.append(funcMap[tc_num])
else:
# skip TC_07 (--r2r), TC_09 (--ibc-dir)
- tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_08, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15, TC_16, TC_17, TC_18, TC_19, TC_20, TC_21]
+ tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_08, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15, TC_16, TC_17, TC_18, TC_19, TC_20, TC_21, TC_22, TC_23, TC_24]
global serial
if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
'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, 'TC_10': TC_10, 'TC_11': TC_11, 'TC_12': TC_12,
'TC_13': TC_13, 'TC_14': TC_14, 'TC_15': TC_15, 'TC_16': TC_16, 'TC_17': TC_17, 'TC_18': TC_17_18,
-'TC_19': TC_19, 'TC_20': TC_20, 'TC_21': TC_21,
+'TC_19': TC_19, 'TC_20': TC_20, 'TC_21': TC_21, 'TC_22' : TC_22, 'TC_23' : TC_23, 'TC_24' : TC_24,
'TOOL_TC_01': TC_01, 'TOOL_TC_02': TC_02, 'TOOL_TC_03': TC_03, 'TOOL_TC_04': TC_04, 'TOOL_TC_05': TC_05, 'TOOL_TC_06': TC_06,
'TOOL_TC_07': TC_07, 'TOOL_TC_08': TC_08, 'TOOL_TC_09': TC_09, 'TOOL_TC_10': TC_10, 'TOOL_TC_11': TC_11, 'TOOL_TC_12': TC_12,
-'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15, 'TOOL_TC_16': TC_16, 'TOOL_TC_17': TC_17, 'TOOL_TC_18': TC_17_18, 'TOOL_TC_19': TC_19, 'TOOL_TC_20': TC_20, 'TOOL_TC_21': TC_21
+'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15, 'TOOL_TC_16': TC_16, 'TOOL_TC_17': TC_17, 'TOOL_TC_18': TC_17_18, 'TOOL_TC_19': TC_19, 'TOOL_TC_20': TC_20, 'TOOL_TC_21': TC_21, 'TOOL_TC_22' : TC_22, 'TOOL_TC_23' : TC_23, 'TOOL_TC_24' : TC_24
}