summaryrefslogtreecommitdiff
path: root/rtemstoolkit
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-11-03 17:57:37 +1100
committerChris Johns <chrisj@rtems.org>2017-11-03 17:59:53 +1100
commitc68beb818173dee2134aac428b39ee2e558dd4f8 (patch)
tree0c838ea9992ad330876fbc0db4f07402920a83a4 /rtemstoolkit
parent7e8587817382cce44c506ff732b40914f8cd33d9 (diff)
tester: Add the rtems-run command.
Diffstat (limited to 'rtemstoolkit')
-rw-r--r--rtemstoolkit/host.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/rtemstoolkit/host.py b/rtemstoolkit/host.py
index bc75394..ea23b24 100644
--- a/rtemstoolkit/host.py
+++ b/rtemstoolkit/host.py
@@ -97,8 +97,23 @@ def overrides():
_load()
return platform.overrides()
+def label(mode = 'all'):
+ import platform
+ if mode == 'system':
+ return platform.system()
+ compact = platform.platform(aliased = True)
+ if mode == 'compact':
+ return compact
+ extended = ' '.join(platform.uname())
+ if mode == 'extended':
+ return extended
+ if mode == 'all':
+ return '%s (%s)' % (compact, extended)
+ raise error.general('invalid platform mode: %s' % (mode))
+
if __name__ == '__main__':
import pprint
+ pprint.pprint(platform())
_load()
print('Name : %s' % (name))
if is_windows: