summaryrefslogtreecommitdiff
path: root/test/rules-test.sh
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-14 19:31:18 +0200
committerKay Sievers <kay@vrfy.org>2012-04-14 19:36:47 +0200
commit0b87a07761dcad31583142a3a454c42833e65a09 (patch)
tree226ad7bee735255b26de3a7c9edba0f6cc2e6b94 /test/rules-test.sh
parent7c09aafd269bc04dcfc07d94c4ee583b7b0751e6 (diff)
udev: test - move test/ and src/test/
Diffstat (limited to 'test/rules-test.sh')
-rwxr-xr-xtest/rules-test.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rules-test.sh b/test/rules-test.sh
new file mode 100755
index 0000000000..1e224ff8b5
--- /dev/null
+++ b/test/rules-test.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Call the udev rule syntax checker on all rules that we ship
+#
+# (C) 2010 Canonical Ltd.
+# Author: Martin Pitt <martin.pitt@ubuntu.com>
+
+[ -n "$srcdir" ] || srcdir=`dirname $0`/..
+
+# skip if we don't have python
+type python >/dev/null 2>&1 || {
+ echo "$0: No python installed, skipping udev rule syntax check"
+ exit 0
+}
+
+$srcdir/test/rule-syntax-check.py `find $srcdir/rules -name '*.rules'`