diff options
author | Chris Johns <chrisj@rtems.org> | 2018-11-29 10:14:14 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-11-29 10:16:44 +1100 |
commit | 6db01e577fed1dc88018106b81dd531f2ecc1fd0 (patch) | |
tree | 2de00eb607ffe1c4a5e6e1e666a40f3adf785029 | |
parent | 93821feb1652a124da92692850740cc6f22263f0 (diff) |
rtemstoolkit/host: Fix the darwin support.
- Add python as a unit test variant.
-rw-r--r-- | rtemstoolkit/darwin.py | 3 | ||||
-rw-r--r-- | rtemstoolkit/host.py | 4 | ||||
-rw-r--r-- | wscript | 13 |
3 files changed, 10 insertions, 10 deletions
diff --git a/rtemstoolkit/darwin.py b/rtemstoolkit/darwin.py index f7ce0da..e780d1d 100644 --- a/rtemstoolkit/darwin.py +++ b/rtemstoolkit/darwin.py @@ -49,7 +49,7 @@ def cpus(): def overrides(): uname = os.uname() - ncpus = '%d' % (cores()) + ncpus = '%d' % (cpus()) defines = { '_ncpus': ('none', 'none', ncpus), '_os': ('none', 'none', 'darwin'), @@ -63,7 +63,6 @@ def overrides(): '_usr': ('dir', 'optional', '/usr/local'), '_var': ('dir', 'optional', '/usr/local/var'), '__ldconfig': ('exe', 'none', ''), - '__cvs': ('exe', 'required', 'cvs'), '__xz': ('exe', 'required', '%{_usr}/bin/xz'), 'with_zlib': ('none', 'none', '--with-zlib=no'), '_forced_static': ('none', 'none', '') diff --git a/rtemstoolkit/host.py b/rtemstoolkit/host.py index ba24c9d..5319c92 100644 --- a/rtemstoolkit/host.py +++ b/rtemstoolkit/host.py @@ -56,11 +56,11 @@ def _load(): if uname[0].startswith('MINGW64_NT') or uname[0].startswith('CYGWIN_NT'): name = 'windows' elif uname[0] == 'Darwin': - name = darwin + name = 'darwin' elif uname[0] == 'FreeBSD': name = 'freebsd' elif uname[0] == 'NetBSD': - name = netbsd + name = 'netbsd' elif uname[0] == 'Linux': name = 'linux' elif uname[0] == 'SunOS': @@ -100,6 +100,7 @@ def configure(ctx): # # Find which versions of python are installed for testing. # + ctx.find_program('python', mandatory = False) ctx.find_program('python2', mandatory = False) ctx.find_program('python3', mandatory = False) # @@ -158,12 +159,12 @@ def rtemstoolkit_tests(ctx): log = ctx.path.find_or_declare('tests.log') ctx.logger = waflib.Logs.make_logger(log.abspath(), 'build') failures = False - for py in ['2', '3']: - PY = 'PYTHON%s' % (py) - if PY in ctx.env: - from rtemstoolkit import all as toolkit_tests - from rtemstoolkit import args as toolkit_test_args - for tt in toolkit_tests: + from rtemstoolkit import all as toolkit_tests + from rtemstoolkit import args as toolkit_test_args + for tt in toolkit_tests: + for py in ['', '2', '3']: + PY = 'PYTHON%s' % (py) + if PY in ctx.env: test = 'rtemstoolkit.%s' % (tt) ctx.start_msg('Test python%s %s' % (py, test)) cmd = '%s -m %s' % (ctx.env[PY][0], test) |