mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 10:13:34 +08:00
meson: re-attach rule-syntax-check.py test
39/248 rule-syntax-check OK 0.07 s
--- command ---
/home/zbyszek/src/systemd-work/test/rule-syntax-check.py \
/home/zbyszek/src/systemd-work/build/../rules/60-block.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-cdrom_id.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-drm.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-evdev.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-input-id.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-alsa.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-input.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage-tape.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-v4l.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-sensor.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-serial.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-joystick.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-mouse.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-touchpad.rules \
/home/zbyszek/src/systemd-work/build/../rules/75-net-description.rules \
/home/zbyszek/src/systemd-work/build/../rules/75-probe_mtd.rules \
/home/zbyszek/src/systemd-work/build/../rules/78-sound-card.rules \
/home/zbyszek/src/systemd-work/build/../rules/80-drivers.rules \
/home/zbyszek/src/systemd-work/build/../rules/80-net-setup-link.rules \
/home/zbyszek/src/systemd-work/build/rules/50-udev-default.rules \
/home/zbyszek/src/systemd-work/build/rules/64-btrfs.rules \
/home/zbyszek/src/systemd-work/build/rules/99-systemd.rules
--- stdout ---
...
-------
It got dropped by mistake in 72cdb3e783
.
This commit is contained in:
parent
2956395c83
commit
6b97bf2287
@ -1218,6 +1218,7 @@ subdir('src/sulogin-shell')
|
||||
subdir('src/boot/efi')
|
||||
|
||||
subdir('src/test')
|
||||
subdir('rules')
|
||||
subdir('test')
|
||||
|
||||
############################################################
|
||||
@ -2345,7 +2346,6 @@ subdir('units')
|
||||
subdir('sysctl.d')
|
||||
subdir('sysusers.d')
|
||||
subdir('tmpfiles.d')
|
||||
subdir('rules')
|
||||
subdir('hwdb')
|
||||
subdir('network')
|
||||
subdir('man')
|
||||
|
@ -41,6 +41,8 @@ rules = files('''
|
||||
install_data(rules,
|
||||
install_dir : udevrulesdir)
|
||||
|
||||
all_rules = rules
|
||||
|
||||
rules_in = '''
|
||||
50-udev-default.rules
|
||||
64-btrfs.rules
|
||||
@ -54,4 +56,5 @@ foreach file : rules_in
|
||||
configuration : substs)
|
||||
install_data(gen,
|
||||
install_dir : udevrulesdir)
|
||||
all_rules += gen
|
||||
endforeach
|
||||
|
@ -188,6 +188,13 @@ endif
|
||||
|
||||
############################################################
|
||||
|
||||
rule_syntax_check_py = find_program('rule-syntax-check.py')
|
||||
test('rule-syntax-check',
|
||||
rule_syntax_check_py,
|
||||
args : all_rules)
|
||||
|
||||
############################################################
|
||||
|
||||
if conf.get('HAVE_SYSV_COMPAT') == 1
|
||||
sysv_generator_test_py = find_program('sysv-generator-test.py')
|
||||
test('sysv-generator-test',
|
||||
|
@ -24,17 +24,9 @@ import sys
|
||||
import os
|
||||
from glob import glob
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
# explicit rule file list
|
||||
rules_files = sys.argv[1:]
|
||||
else:
|
||||
# take them from the build dir
|
||||
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
rules_dir = os.path.join(os.environ.get('top_srcdir', root_dir), 'rules')
|
||||
if not os.path.isdir(rules_dir):
|
||||
print('No rules files given, and {} does not exist, aborting'.format(rules_dir), file=sys.stderr)
|
||||
sys.exit(2)
|
||||
rules_files = glob(os.path.join(rules_dir, '*.rules'))
|
||||
rules_files = sys.argv[1:]
|
||||
if not rules_files:
|
||||
sys.exit('Specify files to test as arguments')
|
||||
|
||||
no_args_tests = re.compile(r'(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
|
||||
args_tests = re.compile(r'(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
|
||||
|
Loading…
Reference in New Issue
Block a user