[dragonegg] r188003 - [tests] Import lit modules properly (via its package).
Daniel Dunbar
daniel at zuster.org
Thu Aug 8 13:13:12 PDT 2013
Author: ddunbar
Date: Thu Aug 8 15:13:12 2013
New Revision: 188003
URL: http://llvm.org/viewvc/llvm-project?rev=188003&view=rev
Log:
[tests] Import lit modules properly (via its package).
- Lit itself ensures that its modules can be found, so this completely
eliminates the need to modify PYTHONPATH.
- This also makes it more obvious which parts of lit are being used in the
custom format definition.
Modified:
dragonegg/trunk/Makefile
dragonegg/trunk/test/DEFormats.py
dragonegg/trunk/test/DETestRunner.py
Modified: dragonegg/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Makefile?rev=188003&r1=188002&r2=188003&view=diff
==============================================================================
--- dragonegg/trunk/Makefile (original)
+++ dragonegg/trunk/Makefile Thu Aug 8 15:13:12 2013
@@ -115,7 +115,6 @@ endif
LIT_SITE_CONFIG=test/dragonegg-lit.site.cfg
TEST_SRC_DIR=$(TOP_DIR)/test
-PYPATH=$(LIT_DIR)/lit:$(PYTHONPATH)
default: gcc-sane llvm-config-sane $(PLUGIN)
@@ -168,13 +167,13 @@ $(LIT_SITE_CONFIG): $(TEST_SRC_DIR)/drag
.PHONY: check-compilator
check-compilator: $(PLUGIN) $(LIT_SITE_CONFIG)
@echo "Running test suite 'compilator'"
- $(QUIET)PYTHONPATH=$(PYPATH) $(LIT_DIR)/lit.py $(LIT_ARGS) --param site="$(LIT_SITE_CONFIG)" \
+ $(QUIET)$(LIT_DIR)/lit.py $(LIT_ARGS) --param site="$(LIT_SITE_CONFIG)" \
--config-prefix=compilator-lit $(TEST_SRC_DIR)/compilator
.PHONY: check-validator
check-validator: $(PLUGIN) $(LIT_SITE_CONFIG)
@echo "Running test suite 'validator'"
- $(QUIET)PYTHONPATH=$(PYPATH) $(LIT_DIR)/lit.py $(LIT_ARGS) --param site="$(LIT_SITE_CONFIG)" \
+ $(QUIET)$(LIT_DIR)/lit.py $(LIT_ARGS) --param site="$(LIT_SITE_CONFIG)" \
--config-prefix=validator-lit $(TEST_SRC_DIR)/validator
.PHONY: check
Modified: dragonegg/trunk/test/DEFormats.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DEFormats.py?rev=188003&r1=188002&r2=188003&view=diff
==============================================================================
--- dragonegg/trunk/test/DEFormats.py (original)
+++ dragonegg/trunk/test/DEFormats.py Thu Aug 8 15:13:12 2013
@@ -1,5 +1,5 @@
import DETestRunner
-from TestFormats import FileBasedTest
+from lit.TestFormats import FileBasedTest
class CompilatorTest(FileBasedTest):
def __init__(self, compilers, compiler_flags, language_flags, skip, xfails):
Modified: dragonegg/trunk/test/DETestRunner.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DETestRunner.py?rev=188003&r1=188002&r2=188003&view=diff
==============================================================================
--- dragonegg/trunk/test/DETestRunner.py (original)
+++ dragonegg/trunk/test/DETestRunner.py Thu Aug 8 15:13:12 2013
@@ -1,9 +1,9 @@
import os
import StringIO
-import Test
-import Util
import DEUtils
+from lit import Test, Util
+
def describeFailure(output, cmd, out, err, exitCode):
print >>output, "Command:",
print >>output, ' '.join(cmd)
More information about the llvm-commits
mailing list