[PATCH rtems-tools] Add support to take version number from user

Vijay Kumar Banerjee vijay at rtems.org
Sat Apr 4 21:51:56 UTC 2020


Closes #3671
---
 tester/rt/test.py        | 6 +++++-
 tester/rtems/version.cfg | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tester/rt/test.py b/tester/rt/test.py
index 16ac352..e0a47b4 100644
--- a/tester/rt/test.py
+++ b/tester/rt/test.py
@@ -367,7 +367,8 @@ def run(args, command_path = None):
                     '--filter':         'Glob that executables must match to run (default: ' +
                               default_exefilter + ')',
                     '--stacktrace':     'Dump a stack trace on a user termination (^C)',
-                    '--coverage':       'Perform coverage analysis of test executables.'}
+                    '--coverage':       'Perform coverage analysis of test executables.',
+                    '--version':        'Set version number to use non-standard tools.'}
         mailer.append_options(optargs)
         opts = options.load(args,
                             optargs = optargs,
@@ -397,6 +398,9 @@ def run(args, command_path = None):
             check_report_formats(report_formats, report_location)
         else:
             report_formats = []
+        usr_version = opts.find_arg('--version')
+        if usr_version:
+            opts.defaults['__version'] = usr_version[1]
         log.notice('RTEMS Testing - Tester, %s' % (version.string()))
         if opts.find_arg('--list-bsps'):
             bsps.list(opts)
diff --git a/tester/rtems/version.cfg b/tester/rtems/version.cfg
index 2cd9073..caf9d9e 100644
--- a/tester/rtems/version.cfg
+++ b/tester/rtems/version.cfg
@@ -32,4 +32,8 @@
 # RTEMS Version
 #
 
-%define rtems_version 5
+%ifn %{defined __version}
+ %define rtems_version 5
+%else
+ %define rtems_version %{__version}
+%endif
-- 
2.21.1



More information about the devel mailing list