From 94e97f6a75cf87c7e547d4d9ff1a9acbc9275cea Mon Sep 17 00:00:00 2001 From: John Porto Date: Thu, 18 Feb 2016 08:02:10 -0800 Subject: [PATCH] Subzero. ARM32. Enable hwdiv-arm crosstests. BUG= https://bugs.chromium.org/p/nativeclient/issues/detail?id=4076 R=eholk@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1708753002 . --- Makefile.standalone | 7 ++++++- pydir/crosstest_generator.py | 14 ++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Makefile.standalone b/Makefile.standalone index aa89ef4e4..12e047f0d 100644 --- a/Makefile.standalone +++ b/Makefile.standalone @@ -435,6 +435,9 @@ else check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. # For (slow) sandboxed tests, limit to Om1/sse4.1. + # run.py (used to run the sandboxed xtests) does not support + # specifying -cpu cortex-a15 to qemu, hence we disable the + # hwdiv-arm tests. ./pydir/crosstest_generator.py -v --lit \ --toolchain-root $(TOOLCHAIN_ROOT) \ $(FORCEASM_FLAG) \ @@ -446,7 +449,9 @@ check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime -i x8664,native,sse2 \ -i x8664,native,sse4.1,test_vector_ops \ -i x8664,sandbox,sse4.1,Om1 \ - -i arm32,neon + -i arm32 \ + -e arm32,sandbox,hwdiv-arm \ + -e arm32,neon,test_vector_ops PNACL_BIN_PATH=$(PNACL_BIN_PATH) \ $(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS) endif diff --git a/pydir/crosstest_generator.py b/pydir/crosstest_generator.py index 8bc8f8d25..236c2d008 100755 --- a/pydir/crosstest_generator.py +++ b/pydir/crosstest_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python2 import argparse +import collections import ConfigParser import os import shutil @@ -28,7 +29,7 @@ def Match(desc, includes, excludes, default_match): return default_match -def RunNativePrefix(toolchain_root, target, run_cmd): +def RunNativePrefix(toolchain_root, target, attr, run_cmd): """Returns a prefix for running an executable for the target. For example, we may be running an ARM or MIPS target executable on an @@ -39,7 +40,10 @@ def RunNativePrefix(toolchain_root, target, run_cmd): 'arm32' : os.path.join(toolchain_root, 'arm_trusted', 'run_under_qemu_arm'), } - prefix = arch_map[target] + attr_map = collections.defaultdict(str, { + 'arm32-neon': ' -cpu cortex-a9', + 'arm32-hwdiv-arm': ' -cpu cortex-a15' }) + prefix = arch_map[target] + attr_map[target + '-' + attr] return (prefix + ' ' + run_cmd) if prefix else run_cmd def NonsfiLoaderArch(target): @@ -187,9 +191,11 @@ def main(): '{root}/scons-out/opt-linux-{arch}/obj/src/nonsfi/' + 'loader/nonsfi_loader ').format( root=root, arch=NonsfiLoaderArch(target)) + run_cmd - run_cmd = RunNativePrefix(args.toolchain_root, target, run_cmd) + run_cmd = RunNativePrefix(args.toolchain_root, target, attr, + run_cmd) else: - run_cmd = RunNativePrefix(args.toolchain_root, target, run_cmd) + run_cmd = RunNativePrefix(args.toolchain_root, target, attr, + run_cmd) if args.lit: # Create a file to drive the lit test. with open(run_cmd_base + '.xtest', 'w') as f: -- 2.11.0