mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
b2ad12eb02
Add test/rule-syntax-check.py, a script for checking the syntax of all udev rules files passed as command line arguments. Add a wrapper test/rules-test.sh which calls rule-syntax-check.py on all udev rules that we ship, but does nothing if Python is not available. Integrate this into make check/distcheck.
18 lines
409 B
Bash
Executable File
18 lines
409 B
Bash
Executable File
#!/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>
|
|
|
|
set -e
|
|
|
|
[ -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 -type f`
|