[rtems-tools commit] Fixes to the run the waf built tests when installed.
Chris Johns
chrisj at rtems.org
Sun Feb 8 07:14:44 UTC 2015
Module: rtems-tools
Branch: master
Commit: 9600c396380fc6da781aa73a9944bdb56340670b
Changeset: http://git.rtems.org/rtems-tools/commit/?id=9600c396380fc6da781aa73a9944bdb56340670b
Author: Chris Johns <chrisj at rtems.org>
Date: Sun Feb 8 18:14:16 2015 +1100
Fixes to the run the waf built tests when installed.
---
rtemstoolkit/darwin.py | 2 +-
tester/rt/gdb.py | 2 +-
tester/rt/options.py | 3 +--
tester/rt/test.py | 10 +++++++---
tester/rtems/testing/defaults.mc | 4 ++--
tester/wscript | 9 ++++++---
6 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/rtemstoolkit/darwin.py b/rtemstoolkit/darwin.py
index e858ace..1d092cb 100644
--- a/rtemstoolkit/darwin.py
+++ b/rtemstoolkit/darwin.py
@@ -55,9 +55,9 @@ def load():
'_host_cpu': ('none', 'none', uname[4]),
'_host_alias': ('none', 'none', '%{nil}'),
'_host_arch': ('none', 'none', uname[4]),
+ '_host_prefix': ('dir', 'optional', '%{_usr}'),
'_usr': ('dir', 'optional', '/usr/local'),
'_var': ('dir', 'optional', '/usr/local/var'),
- '_prefix': ('dir', 'optional', '%{_usr}'),
'__ldconfig': ('exe', 'none', ''),
'__cvs': ('exe', 'required', 'cvs'),
'__xz': ('exe', 'required', '%{_usr}/bin/xz'),
diff --git a/tester/rt/gdb.py b/tester/rt/gdb.py
index 4449222..956b395 100644
--- a/tester/rt/gdb.py
+++ b/tester/rt/gdb.py
@@ -209,7 +209,7 @@ class gdb(object):
if self.trace:
print 'gdb done', ec
if ec > 0:
- raise error.general('gdb exec: %s' % (os.strerror(ec)))
+ raise error.general('gdb exec: %s: %s' % (cmds[0], os.strerror(ec)))
except:
raise
self._lock('_open')
diff --git a/tester/rt/options.py b/tester/rt/options.py
index 2190818..a916cbb 100644
--- a/tester/rt/options.py
+++ b/tester/rt/options.py
@@ -1,6 +1,6 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2013-2014 Chris Johns (chrisj at rtems.org)
+# Copyright 2013-2015 Chris Johns (chrisj at rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -89,7 +89,6 @@ def load(args, optargs = None,
# the tester being run from within the git repo. If not found assume the tools
# have been installed and the defaults is in the install prefix.
#
- print path.join(command_path, defaults_mc)
if path.exists(path.join(command_path, defaults_mc)):
rtdir = command_path
else:
diff --git a/tester/rt/test.py b/tester/rt/test.py
index d9a04da..551c8b5 100644
--- a/tester/rt/test.py
+++ b/tester/rt/test.py
@@ -65,7 +65,7 @@ class test(object):
raise error.general('cannot find executable: %s' % (executable))
self.opts.defaults['test_executable'] = executable
if rtems_tools:
- rtems_tools_bin = path.join(rtems_tools, 'bin')
+ rtems_tools_bin = path.join(self.opts.defaults.expand(rtems_tools), 'bin')
if not path.isdir(rtems_tools_bin):
raise error.general('cannot find RTEMS tools path: %s' % (rtems_tools_bin))
self.opts.defaults['rtems_tools'] = rtems_tools_bin
@@ -219,10 +219,14 @@ def run(command_path = None):
job_trace = 'jobs' in debug_trace.split(',')
rtems_tools = opts.find_arg('--rtems-tools')
if rtems_tools:
+ if len(rtems_tools) != 2:
+ raise error.general('invalid RTEMS tools option')
rtems_tools = rtems_tools[1]
+ else:
+ rtems_tools = '%{_prefix}'
bsp = opts.find_arg('--rtems-bsp')
- if bsp is None:
- raise error.general('no RTEMS BSP provided')
+ if bsp is None or len(bsp) != 2:
+ raise error.general('RTEMS BSP not provided or invalid option')
opts.defaults.load('%%{_configdir}/bsps/%s.mc' % (bsp[1]))
bsp = opts.defaults.get('%{bsp}')
if not bsp:
diff --git a/tester/rtems/testing/defaults.mc b/tester/rtems/testing/defaults.mc
index bf3186c..54212e0 100644
--- a/tester/rtems/testing/defaults.mc
+++ b/tester/rtems/testing/defaults.mc
@@ -1,6 +1,6 @@
#
# RTEMS Tools Project (http://www.rtems.org/)
-# Copyright 2010-2014 Chris Johns (chrisj at rtems.org)
+# Copyright 2010-2015 Chris Johns (chrisj at rtems.org)
# All rights reserved.
#
# This file is part of the RTEMS Tools package in 'rtems-tools'.
@@ -50,7 +50,7 @@
nil: none, none, ''
# Paths
-_topdir: dir, required, '%{_cwd}'
+_topdir: dir, required, '%{_prefix}'
_docdir: dir, none, '%{_defaultdocdir}'
_tmppath: dir, none, '%{_topdir}/build/tmp'
_tmproot: dir, none, '%{_tmppath}/rt/%{_bset}'
diff --git a/tester/wscript b/tester/wscript
index 16030df..ac643f4 100644
--- a/tester/wscript
+++ b/tester/wscript
@@ -72,10 +72,13 @@ def build(bld):
#
# Install the tester configuration files.
#
- config = bld.path.find_dir('rtems')
+ config = bld.path.find_dir('config')
+ bld.install_files('${PREFIX}/share/rtems/tester/config',
+ config.ant_glob('**/*'), cwd = config,
+ relative_trick = True)
+ rtems = bld.path.find_dir('rtems')
bld.install_files('${PREFIX}/share/rtems/tester/rtems',
- config.ant_glob('**', excl=['*~']),
- cwd = config,
+ rtems.ant_glob('**/*'), cwd = rtems,
relative_trick = True)
def install(ctx):
More information about the vc
mailing list