Commit cc8bc16f by Jim Stichnoth

Subzero: Add the MIPS=1 makefile option for alternate testing mode.

There are two problems to address: 1. Google developers lack some tooling to test MIPS changes. 2. MIPS developers lack some tooling/packages to allow full "make presubmit" testing. Until all this gets sorted out, we add the "make -f Makefile.standalone MIPS=1" option to control some of the testing targets: check-lit: No changes, as all these lit tests should be runnable in both environments. check-xtest: MIPS=1 runs just the mips32 tests, plus the x8664 native tests as a sanity-check. Non-MIPS runs everything except the mips32 tests. check-spec: MIPS=1 completely disables spec2k testing. presubmit: MIPS=1 greatly reduces the number of tests (especially since so many are spec variants). With this change, mips32 CLs should pass "make -f Makefile.standalone MIPS=1 presubmit" before upload, and other CLs should pass "make -f Makefile.standalone presubmit". BUG= none R=kschimpf@google.com, obucinac@gmail.com Review URL: https://codereview.chromium.org/2271053006 .
parent 53dae72a
...@@ -542,6 +542,20 @@ ifdef MINIMAL ...@@ -542,6 +542,20 @@ ifdef MINIMAL
check-xtest check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime check-xtest check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime
@echo "Crosstests disabled, minimal build" @echo "Crosstests disabled, minimal build"
else else
ifdef MIPS
check-xtest check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime \
crosstest/test_arith_ll.ll
# Do all x8664/native/sse2 tests as a smoke test.
# Add in mips32 tests as they come online.
./pydir/crosstest_generator.py -v --lit \
--toolchain-root $(TOOLCHAIN_ROOT) \
$(FORCEASM_FLAG) \
$(FORCEASM_XTEST_EXCLUDES) \
-i x8664,native,sse2 \
-i mips32,xxx
PNACL_BIN_PATH=$(PNACL_BIN_PATH) \
$(LLVM_SRC_PATH)/utils/lit/lit.py -sv $(CHECK_XTEST_TESTS)
else
check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime \ check-xtest: $(OBJDIR)/pnacl-sz make_symlink runtime \
exists-nonsfi-x8632 exists-nonsfi-arm32 crosstest/test_arith_ll.ll exists-nonsfi-x8632 exists-nonsfi-arm32 crosstest/test_arith_ll.ll
# Do all native/sse2 tests, but only test_vector_ops for native/sse4.1. # Do all native/sse2 tests, but only test_vector_ops for native/sse4.1.
...@@ -589,6 +603,7 @@ check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime \ ...@@ -589,6 +603,7 @@ check-xtest-lite: $(OBJDIR)/pnacl-sz make_symlink runtime \
crosstest/test_arith_ll.ll: pydir/gen_test_arith_ll.py crosstest/test_arith_ll.ll: pydir/gen_test_arith_ll.py
python $< > $@ python $< > $@
endif endif
endif
check-unit: $(OBJDIR)/run_unittests check-unit: $(OBJDIR)/run_unittests
$(OBJDIR)/run_unittests $(OBJDIR)/run_unittests
...@@ -622,7 +637,12 @@ SPECRUN := --run ...@@ -622,7 +637,12 @@ SPECRUN := --run
./pydir/szbuild_spec2k.py -v \ ./pydir/szbuild_spec2k.py -v \
$(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< $(SPECRUN) $(SPECFLAGS) --target=$(TARGETFLAG) $(SPEC) $< $(SPECRUN)
ifdef MIPS
# Don't test spec2k on mips32, at least not yet.
check-spec:
else
check-spec: exists-spec $(ALLSPEC:=.spec2k) check-spec: exists-spec $(ALLSPEC:=.spec2k)
endif
check: check-lit check-unit check-xtest check: check-lit check-unit check-xtest
...@@ -665,6 +685,25 @@ exists-spec: ...@@ -665,6 +685,25 @@ exists-spec:
exit 1 ; \ exit 1 ; \
fi fi
ifdef MIPS
check-presubmit presubmit: exists-sbtc
# Make sure clang-format gets run.
+make -f Makefile.standalone format
# Verify MINIMAL build, plus proper usage of REQUIRES in lit tests.
+make -f Makefile.standalone \
MINIMAL=1 check
# Check that there are no g++ build errors or warnings.
+make -f Makefile.standalone \
GPLUSPLUS=1 compile_only
# Run lit tests, cross tests, and unit tests.
+make -f Makefile.standalone \
check
# Check a sandboxed translator build.
+make -f Makefile.standalone \
DEBUG=1 sb
# Provide validation of user awesomeness!
echo Success
else
check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \ check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \
exists-sbtc exists-spec exists-sbtc exists-spec
# Make sure clang-format gets run. # Make sure clang-format gets run.
...@@ -714,6 +753,7 @@ check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \ ...@@ -714,6 +753,7 @@ check-presubmit presubmit: exists-nonsfi-x8632 exists-nonsfi-arm32 \
TARGET=arm32 ALLSPEC='252.eon 254.gap 176.gcc 181.mcf' check-spec TARGET=arm32 ALLSPEC='252.eon 254.gap 176.gcc 181.mcf' check-spec
# Provide validation of user awesomeness! # Provide validation of user awesomeness!
echo Success echo Success
endif
presubmit-lite: exists-nonsfi-x8632 exists-nonsfi-arm32 \ presubmit-lite: exists-nonsfi-x8632 exists-nonsfi-arm32 \
exists-sbtc exists-spec exists-sbtc exists-spec
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment