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 .
diff --git a/Makefile.standalone b/Makefile.standalone
index aa89ef4..12e047f 100644
--- a/Makefile.standalone
+++ b/Makefile.standalone
@@ -435,6 +435,9 @@
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 @@
-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 8bc8f8d..236c2d0 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 @@
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 @@
'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 @@
'{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: