[rtems-tools commit] rtems-bsp-builder: Add a check for invalid ARCH and BSP names.
Chris Johns
chrisj at rtems.org
Wed Jan 31 22:44:28 UTC 2018
Module: rtems-tools
Branch: master
Commit: 623a641297e9e81c1b59d676fa4e635e817a80dc
Changeset: http://git.rtems.org/rtems-tools/commit/?id=623a641297e9e81c1b59d676fa4e635e817a80dc
Author: Chris Johns <chrisj at rtems.org>
Date: Thu Feb 1 09:42:59 2018 +1100
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.
---
tester/rt/check.py | 7 ++++++-
tester/rtems/rtems-bsps-powerpc.ini | 2 +-
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 at rtems.org)
+# Copyright 2016-2018 Chris Johns (chrisj at 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,
More information about the vc
mailing list