[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Test harness errors are printed to tests.log

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 30 Oct 2017 18:25:12 +0000

I tried to run «make check TESTS=/path/to/build/tree/.../basic_tests.py»
in an out-of-tree build and got the following error:

    [1/1] basic_tests.pyMakefile:530: recipe for target 'check' failed

This error is rather opaque. It turns out that the actual error message
was written to tests.log because run_tests.py uses dup2(). We should
change it as follows:

[[[
Index: build/run_tests.py
===================================================================
--- build/run_tests.py (revision 1813813)
+++ build/run_tests.py (working copy)
@@ -829,6 +829,7 @@
       self.log.flush()
       old_stdout = os.dup(sys.stdout.fileno())
       old_stderr = os.dup(sys.stderr.fileno())
+ # These two lines...
       os.dup2(self.log.fileno(), sys.stdout.fileno())
       os.dup2(self.log.fileno(), sys.stderr.fileno())
 
Index: subversion/tests/cmdline/svntest/main.py
===================================================================
--- subversion/tests/cmdline/svntest/main.py (revision 1813803)
+++ subversion/tests/cmdline/svntest/main.py (working copy)
@@ -2023,6 +2023,8 @@
 
   global logger
 
+ # ... should create a logging configuration to be used by this:
+
   # Initialize the LOGGER global variable so the option parsing can set
   # its loglevel, as appropriate.
   logger = logging.getLogger()
]]]

Cheers,

Daniel
Received on 2017-10-30 19:25:20 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.