diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-10-30 15:26:04 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-11-16 13:55:13 +1100 |
commit | 646d77d8156ad72da1c24f734a029a525ba4bed9 (patch) | |
tree | 8eaa5db080f5c2b733b506fd82eec773ac2afdb3 /test/parser/Makefile.am | |
parent | 638f16c7683db165154bbe53772c4b864f9dc90d (diff) | |
download | talos-petitboot-646d77d8156ad72da1c24f734a029a525ba4bed9.tar.gz talos-petitboot-646d77d8156ad72da1c24f734a029a525ba4bed9.zip |
discover: Reimplement native-parser as a Bison parser
Occasionally you look at some code and realise that a) this never gets
built, and b) even if it did it would never compile. Today's example is
native-parser.c which we must have just assumed worked for quite a
while.
The native parser has bitrotted entirely and needs to be brought up to
date. While we're here, lets take the chance to implement a proper
grammar for it. This helps us reason more effectively about the parser,
lets us extend it easily in the future, and.. I wanted to write a Bison
parser too.
This implements most of the old functionality, but drops off some
smaller details like settings icons which needs some separate attention
to bring up to date.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'test/parser/Makefile.am')
-rw-r--r-- | test/parser/Makefile.am | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/parser/Makefile.am b/test/parser/Makefile.am index 363933e..483add9 100644 --- a/test/parser/Makefile.am +++ b/test/parser/Makefile.am @@ -87,7 +87,11 @@ parser_TESTS = \ test/parser/test-syslinux-single-yocto \ test/parser/test-syslinux-global-append \ test/parser/test-syslinux-explicit \ - test/parser/test-syslinux-nested-config + test/parser/test-syslinux-nested-config \ + test/parser/test-native-globals \ + test/parser/test-native-short \ + test/parser/test-native-simple \ + test/parser/test-native-strings TESTS += $(parser_TESTS) @@ -100,7 +104,8 @@ check_DATA += \ test/parser/data/yaboot-rh8-ppc64.conf \ test/parser/data/syslinux-include-root.cfg \ test/parser/data/syslinux-include-nest-1.cfg \ - test/parser/data/syslinux-include-nest-2.cfg + test/parser/data/syslinux-include-nest-2.cfg \ + test/parser/data/native-short.conf $(parser_TESTS): AM_CPPFLAGS += \ -I$(top_srcdir)/discover \ @@ -133,13 +138,16 @@ test_parser_libtest_ro_SOURCES = \ discover/parser-conf.c \ discover/user-event.c \ discover/event.c \ - $(discover_grub2_grub2_parser_ro_SOURCES) + $(discover_grub2_grub2_parser_ro_SOURCES) \ + $(discover_native_native_parser_ro_SOURCES) test_parser_libtest_ro_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(top_srcdir)/discover \ -I$(top_srcdir)/discover/grub2 \ -I$(top_builddir)/discover/grub2 \ + -I$(top_srcdir)/discover/native \ + -I$(top_builddir)/discover/native \ -DPETITBOOT_TEST \ -DLOCAL_STATE_DIR='"$(localstatedir)"' \ -DTEST_CONF_BASE='"$(top_srcdir)/test/parser/data"' |