diff options
author | Chris Johns <chrisj@rtems.org> | 2018-02-01 09:42:59 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-02-01 09:42:59 +1100 |
commit | 623a641297e9e81c1b59d676fa4e635e817a80dc (patch) | |
tree | dec83a656687bd43d293dc34e2e6586b433b6a5d /tester/rt/check.py | |
parent | tester/covoar/covoar.cc: Add missing throw keyword (diff) | |
download | rtems-tools-623a641297e9e81c1b59d676fa4e635e817a80dc.tar.bz2 |
rtems-bsp-builder: Add a check for invalid ARCH and BSP names.
If invalid characters are in a BSP or ARCH name generate an error.
Add the missing ',' to the line in the PowerPC BSP configuration.
Diffstat (limited to 'tester/rt/check.py')
-rwxr-xr-x | tester/rt/check.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tester/rt/check.py b/tester/rt/check.py index 8c77dbd..6869736 100755 --- a/tester/rt/check.py +++ b/tester/rt/check.py @@ -1,6 +1,6 @@ # # RTEMS Tools Project (http://www.rtems.org/) -# Copyright 2016-2017 Chris Johns (chrisj@rtems.org) +# Copyright 2016-2018 Chris Johns (chrisj@rtems.org) # All rights reserved. # # This file is part of the RTEMS Tools package in 'rtems-tools'. @@ -935,7 +935,10 @@ class configuration_: bsps = 'bsps_%s' % (arch) profile[bsps] = self.config.comma_list(profile['name'], bsps) self.profiles[profile['name']] = profile + invalid_chars = re.compile(r'[^a-zA-Z0-9_-]') for a in set(archs): + if len(invalid_chars.findall(a)) != 0: + raise error.general('invalid character(s) in arch name: %s' % (a)) arch = {} arch['excludes'] = {} for exclude in self.config.comma_list(a, 'exclude', err = False): @@ -949,6 +952,8 @@ class configuration_: sorted(set([b.strip() for b in i[1].split(',')])) arch['bsps'] = self.config.comma_list(a, 'bsps', err = False) for b in arch['bsps']: + if len(invalid_chars.findall(b)) != 0: + raise error.general('invalid character(s) in BSP name: %s' % (b)) arch[b] = {} arch[b]['bspopts'] = \ self.config.comma_list(a, 'bspopts_%s' % (b), err = False) |