[dragonegg] r188002 - [tests] Find local test utilities relative to config files.
Daniel Dunbar
daniel at zuster.org
Thu Aug 8 13:08:19 PDT 2013
Author: ddunbar
Date: Thu Aug 8 15:08:19 2013
New Revision: 188002
URL: http://llvm.org/viewvc/llvm-project?rev=188002&view=rev
Log:
[tests] Find local test utilities relative to config files.
- This eliminates the requirement that PYTHONPATH have been modified to point
into the test source dir.
Modified:
dragonegg/trunk/Makefile
dragonegg/trunk/test/compilator/compilator-lit.cfg
dragonegg/trunk/test/validator/validator-lit.cfg
Modified: dragonegg/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Makefile?rev=188002&r1=188001&r2=188002&view=diff
==============================================================================
--- dragonegg/trunk/Makefile (original)
+++ dragonegg/trunk/Makefile Thu Aug 8 15:08:19 2013
@@ -115,7 +115,7 @@ endif
LIT_SITE_CONFIG=test/dragonegg-lit.site.cfg
TEST_SRC_DIR=$(TOP_DIR)/test
-PYPATH=$(TEST_SRC_DIR):$(LIT_DIR)/lit:$(PYTHONPATH)
+PYPATH=$(LIT_DIR)/lit:$(PYTHONPATH)
default: gcc-sane llvm-config-sane $(PLUGIN)
Modified: dragonegg/trunk/test/compilator/compilator-lit.cfg
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/compilator/compilator-lit.cfg?rev=188002&r1=188001&r2=188002&view=diff
==============================================================================
--- dragonegg/trunk/test/compilator/compilator-lit.cfg (original)
+++ dragonegg/trunk/test/compilator/compilator-lit.cfg Thu Aug 8 15:08:19 2013
@@ -1,4 +1,7 @@
# -*- Python -*-
+
+# Allow import of our local utilities.
+sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import DEFormats
import DEUtils
Modified: dragonegg/trunk/test/validator/validator-lit.cfg
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/validator/validator-lit.cfg?rev=188002&r1=188001&r2=188002&view=diff
==============================================================================
--- dragonegg/trunk/test/validator/validator-lit.cfg (original)
+++ dragonegg/trunk/test/validator/validator-lit.cfg Thu Aug 8 15:08:19 2013
@@ -3,6 +3,9 @@ import os
import platform
import re
import subprocess
+
+# Allow import of our local utilities.
+sys.path.append(os.path.dirname(os.path.dirname(__file__)))
import DEUtils
# It will validate you. That's what it does. That's all it does.
More information about the llvm-commits
mailing list