Browse Source

merged patches in trac #355

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3096 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 14 years ago
parent
commit
c2eb613dec
2 changed files with 8 additions and 7 deletions
  1. 3 2
      src/bin/tests/Makefile.am
  2. 5 5
      src/bin/tests/process_rename_test.py.in

+ 3 - 2
src/bin/tests/Makefile.am

@@ -1,5 +1,6 @@
 PYTESTS = process_rename_test.py
 PYTESTS = process_rename_test.py
-EXTRA_DIST = $(PYTESTS)
+# .py will be generated by configure, so we don't have to include it
+# in EXTRA_DIST.
 
 
 # later will have configure option to choose this, like: coverage run --branch
 # later will have configure option to choose this, like: coverage run --branch
 PYCOVERAGE = $(PYTHON)
 PYCOVERAGE = $(PYTHON)
@@ -8,5 +9,5 @@ check-local:
 	for pytest in $(PYTESTS) ; do \
 	for pytest in $(PYTESTS) ; do \
 	echo Running test: $$pytest ; \
 	echo Running test: $$pytest ; \
 	env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
 	env PYTHONPATH=$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs \
-	$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
+	$(PYCOVERAGE) $(abs_builddir)/$$pytest || exit ; \
 	done
 	done

+ 5 - 5
src/bin/tests/process_rename_test.py.in

@@ -34,7 +34,7 @@ class TestRename(unittest.TestCase):
         """
         """
         Test if every script renames itself.
         Test if every script renames itself.
 
 
-        Scan all Makefile.in and look for scripts.
+        Scan all Makefile and look for scripts.
         Then scan them by looking at the source text
         Then scan them by looking at the source text
         (without actually running them)
         (without actually running them)
         """
         """
@@ -48,11 +48,11 @@ class TestRename(unittest.TestCase):
         fun = re.compile(r'^\s*isc\.utils\.process\.rename\s*\(.*\)\s*(|#.*)$',
         fun = re.compile(r'^\s*isc\.utils\.process\.rename\s*\(.*\)\s*(|#.*)$',
             re.MULTILINE)
             re.MULTILINE)
 
 
-        # Find all Makefile.in and extract names of scripts
+        # Find all Makefile and extract names of scripts
-        for (d, _, fs) in os.walk('@top_srcdir@'):
+        for (d, _, fs) in os.walk('@top_builddir@'):
-            if 'Makefile.in' in fs:
+            if 'Makefile' in fs:
                 makefile = ''.join(open(os.path.join(d,
                 makefile = ''.join(open(os.path.join(d,
-                    "Makefile.in")).readlines())
+                    "Makefile")).readlines())
                 for (var, _) in lines.findall(makefile):
                 for (var, _) in lines.findall(makefile):
                     for (script, _) in scripts.findall(var):
                     for (script, _) in scripts.findall(var):
                         self.__scan(d, script, fun)
                         self.__scan(d, script, fun)