summaryrefslogtreecommitdiff
path: root/test/rule-syntax-check.py
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-20 14:44:47 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-20 14:44:47 -0500
commitbcc69ef934c9d14732e16551032242fa599b44e7 (patch)
treeacc183e5e4ba09ab8893a432514b9fc5a1d78736 /test/rule-syntax-check.py
parent802d021d2e403862f4692ee67956e7e0160c1879 (diff)
Reintroduce keymaps build and test
This commit reintroduces code to 1) build src/keymap 2) test keymap/Makefile.am that it has all the key maps listed 3) test that all the key names in keymap/* are in <linux/input.h> 4) do a syntax check on rules/*.rules which now includes 95-keymap.rules and 95-keyboard-force-release.rules For #4, the regex expressions in rule-syntax-check.py had to be updated. They do not allow trailing comments via # comment, and I did not include that. A rule in 95-keymap.rules had to have its comment moved from the end to another line. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'test/rule-syntax-check.py')
-rwxr-xr-xtest/rule-syntax-check.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py
index 4b602a925a..9a0db2501f 100755
--- a/test/rule-syntax-check.py
+++ b/test/rule-syntax-check.py
@@ -28,7 +28,7 @@ if len(sys.argv) < 2:
no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
-args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([a-zA-Z0-9/_.*%-]+)}\s*(=|\+=)\s*"([^"]*)"$')
+args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$')
result = 0
buffer = ''