summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-02-01 09:42:59 +1100
committerChris Johns <chrisj@rtems.org>2018-02-01 09:42:59 +1100
commit623a641297e9e81c1b59d676fa4e635e817a80dc (patch)
treedec83a656687bd43d293dc34e2e6586b433b6a5d
parenttester/covoar/covoar.cc: Add missing throw keyword (diff)
downloadrtems-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.
-rwxr-xr-xtester/rt/check.py7
-rw-r--r--tester/rtems/rtems-bsps-powerpc.ini2
2 files changed, 7 insertions, 2 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)
diff --git a/tester/rtems/rtems-bsps-powerpc.ini b/tester/rtems/rtems-bsps-powerpc.ini
index 7ba451b..22650ac 100644
--- a/tester/rtems/rtems-bsps-powerpc.ini
+++ b/tester/rtems/rtems-bsps-powerpc.ini
@@ -42,7 +42,7 @@ bsps = beatnik,
pm520_cr825, pm520_ze30,
psim,
qemuppc, qemuprep, qemuprep-altivec,
- qoriq_core_0, qoriq_core_1, qoriq_e500, qoriq_e6500_32, qoriq_e6500_64
+ qoriq_core_0, qoriq_core_1, qoriq_e500, qoriq_e6500_32, qoriq_e6500_64,
ss555,
t32mppc,
tqm8xx_stk8xx,