Run spec test for classic/fast-interp in NuttX CI (#2817)
This commit is contained in:
@ -50,26 +50,23 @@ SPEC_TEST_DIR = "spec/test/core"
|
||||
WAST2WASM_CMD = exe_file_path("./wabt/out/gcc/Release/wat2wasm")
|
||||
SPEC_INTERPRETER_CMD = "spec/interpreter/wasm"
|
||||
WAMRC_CMD = "../../../wamr-compiler/build/wamrc"
|
||||
|
||||
|
||||
class TargetAction(argparse.Action):
|
||||
TARGET_MAP = {
|
||||
"ARMV7_VFP": "armv7",
|
||||
"RISCV32": "riscv32_ilp32",
|
||||
"RISCV32_ILP32": "riscv32_ilp32",
|
||||
"RISCV32_ILP32D": "riscv32_ilp32d",
|
||||
"RISCV64": "riscv64_lp64",
|
||||
"RISCV64_LP64": "riscv64_lp64",
|
||||
"RISCV64_LP64D": "riscv64_lp64",
|
||||
"THUMBV7_VFP": "thumbv7",
|
||||
"X86_32": "i386",
|
||||
"X86_64": "x86_64",
|
||||
"AARCH64": "arm64"
|
||||
}
|
||||
|
||||
def __call__(self, parser, namespace, values, option_string=None):
|
||||
setattr(namespace, self.dest, self.TARGET_MAP.get(values, "x86_64"))
|
||||
|
||||
AVAILABLE_TARGETS = [
|
||||
"I386",
|
||||
"X86_32",
|
||||
"X86_64",
|
||||
"AARCH64",
|
||||
"AARCH64_VFP",
|
||||
"ARMV7",
|
||||
"ARMV7_VFP",
|
||||
"RISCV32",
|
||||
"RISCV32_ILP32F",
|
||||
"RISCV32_ILP32D",
|
||||
"RISCV64",
|
||||
"RISCV64_LP64F",
|
||||
"RISCV64_LP64D",
|
||||
"THUMBV7",
|
||||
"THUMBV7_VFP",
|
||||
]
|
||||
|
||||
def ignore_the_case(
|
||||
case_name,
|
||||
@ -404,8 +401,7 @@ def main():
|
||||
)
|
||||
parser.add_argument(
|
||||
"-m",
|
||||
action=TargetAction,
|
||||
choices=list(TargetAction.TARGET_MAP.keys()),
|
||||
choices=AVAILABLE_TARGETS,
|
||||
type=str,
|
||||
dest="target",
|
||||
default="X86_64",
|
||||
@ -505,6 +501,13 @@ def main():
|
||||
|
||||
options = parser.parse_args()
|
||||
|
||||
# Convert target to lower case for internal use, e.g. X86_64 -> x86_64
|
||||
# target is always exist, so no need to check it
|
||||
options.target = options.target.lower()
|
||||
|
||||
if options.target == "x86_32":
|
||||
options.target = "i386"
|
||||
|
||||
if not preflight_check(options.aot_flag):
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user