[Xfce4-commits] <midori:master> Run unit test cases in install prefix
Christian Dywan
noreply at xfce.org
Tue Nov 20 01:36:02 CET 2012
Updating branch refs/heads/master
to 9fca63ba56bd6007ba6dd4ebac5685603b48ed08 (commit)
from 7d210ad931d998d4cdb47ea168cdc04a9ef52d49 (commit)
commit 9fca63ba56bd6007ba6dd4ebac5685603b48ed08
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Nov 20 01:20:09 2012 +0100
Run unit test cases in install prefix
For Win32, dll's will be located therer.
wscript | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/wscript b/wscript
index 4d0a4f7..0d3da7d 100644
--- a/wscript
+++ b/wscript
@@ -579,13 +579,15 @@ def shutdown ():
Utils.pprint ('GREEN', 'Running the unit tests')
for label in test.unit_tests.allkeys:
- file_and_src = test.unit_tests[label]
+ filename = test.unit_tests[label][0]
test.unit_test_results[label] = 0
try:
- args = [file_and_src[0]]
+ if is_mingw (Build.bld.env):
+ filename += '.exe'
+ args = [filename]
if is_mingw (Build.bld.env):
args.insert (0, 'wine')
- pp = Utils.pproc.Popen (args)
+ pp = Utils.pproc.Popen (args, cwd=Build.bld.env['PREFIX'] + os.sep + 'bin')
(out, err) = pp.communicate ()
test.unit_test_results[label] = int (pp.returncode == 0)
except OSError:
@@ -601,12 +603,14 @@ def shutdown ():
for label in test.unit_tests.allkeys:
if not test.unit_test_results[label]:
Utils.pprint ('YELLOW', label + '...FAILED')
- file_and_src = test.unit_tests[label]
+ filename = test.unit_tests[label][0]
try:
- args = ['gdb', '--batch', '-ex', 'run', '-ex', 'bt', file_and_src[0]]
+ if is_mingw (Build.bld.env):
+ filename += '.exe'
+ args = ['gdb', '--batch', '-ex', 'run', '-ex', 'bt', filename]
if is_mingw (Build.bld.env):
args.insert (0, 'wine')
- pp = Utils.pproc.Popen (args)
+ pp = Utils.pproc.Popen (args, cwd=Build.bld.env['PREFIX'] + os.sep + 'bin')
(out, err) = pp.communicate ()
except OSError:
Utils.pprint ('RED', 'Install gdb to see backtraces')
More information about the Xfce4-commits
mailing list