Patchwork [4/9] petitboot: Move parser tests to tests directory

login
register
mail settings
Submitter Geoff Levand
Date Nov. 7, 2008, 12:21 a.m.
Message ID <491389ED.7060108@am.sony.com>
Download mbox | patch
Permalink /patch/7637/
State Accepted
Delegated to: Jeremy Kerr
Headers show

Comments

Geoff Levand - Nov. 7, 2008, 12:21 a.m.
From: Yuji Mano <yuji.mano@am.sony.com>

Move the parser test sources from the 'devices' directory into a separate
top level directory called 'test'.  This change simply renames
the directory and makes minor fixups to the makefiles and parser-test.sh

Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
This change is a step to convert petitboot into a collection of applications
linking to a core petitboot library.

 Makefile.am                                     |   52 --------------
 configure.ac                                    |    3 
 devices/parser-test.c                           |   85 ------------------------
 devices/parser-test.sh.in                       |   26 -------
 devices/parser-tests/001/expected-output        |   24 ------
 devices/parser-tests/001/ps3da1/etc/kboot.conf  |    9 --
 devices/parser-tests/002/expected-output        |    9 --
 devices/parser-tests/002/ps3da1/etc/yaboot.conf |    8 --
 devices/parser-tests/003/expected-output        |    9 --
 devices/parser-tests/003/ps3da1/etc/kboot.conf  |    4 -
 devices/parser-tests/004/expected-output        |    9 --
 devices/parser-tests/004/rootdev                |    1 
 devices/parser-tests/004/sda1/etc/kboot.conf    |    4 -
 test/Makefile.am                                |   81 ++++++++++++++++++++++
 test/parser-test.c                              |   85 ++++++++++++++++++++++++
 test/parser-test.sh.in                          |   26 +++++++
 test/parser-tests/001/expected-output           |   24 ++++++
 test/parser-tests/001/ps3da1/etc/kboot.conf     |    9 ++
 test/parser-tests/002/expected-output           |    9 ++
 test/parser-tests/002/ps3da1/etc/yaboot.conf    |    8 ++
 test/parser-tests/003/expected-output           |    9 ++
 test/parser-tests/003/ps3da1/etc/kboot.conf     |    4 +
 test/parser-tests/004/expected-output           |    9 ++
 test/parser-tests/004/rootdev                   |    1 
 test/parser-tests/004/sda1/etc/kboot.conf       |    4 +
 25 files changed, 273 insertions(+), 239 deletions(-)

Patch

--- a/Makefile.am
+++ b/Makefile.am
@@ -14,7 +14,7 @@ 
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
-SUBDIRS = artwork devices utils
+SUBDIRS = artwork devices utils test
 
 AM_CPPFLAGS = -I$(includedir) \
  -DPKG_SHARE_DIR="\"$(datadir)/petitboot\""
@@ -60,55 +60,7 @@  petitboot_SOURCES = \
 	devices.c
 petitboot_LDADD = -ltwin -lpng -ljpeg -lz -lm
 
-parser_test_SOURCES = \
-	$(petitboot_headers) \
-	devices/parser-test.c \
-	devices/params.c \
-	devices/parser.c \
-	devices/paths.c \
-	devices/yaboot-cfg.c \
-	devices/native-parser.c \
-	devices/yaboot-parser.c \
-	devices/kboot-parser.c
-
-check_PROGRAMS = parser-test
-
-composed_scripts = devices/parser-test.sh
-
-edit = sed \
-	-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
-	-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
-	-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-	-e 's,@libexecdir\@,$(libexecdir),g' \
-	-e 's,@datadir\@,$(pkgdatadir),g'    \
-	-e 's,@prefix\@,$(prefix),g' \
-	-e 's,@sbindir\@,$(sbindir),g' \
-	-e 's,@top_srcdir\@,$(top_srcdir),g'
-
-devices/parser-test.sh: Makefile $(srcdir)/devices/parser-test.sh.in
-	rm -f $@ $@.tmp
-	$(edit) $(srcdir)/$@.in >$@.tmp
-	chmod +x $@.tmp
-	mv $@.tmp $@
-
-check_SCRIPTS = devices/parser-test.sh
-
-check:
-	devices/parser-test.sh
-
-EXTRA_DIST = bootstrap \
-	$(addsuffix .in, $(composed_scripts)) \
-	devices/parser-tests/001/ps3da1/etc/kboot.conf \
-	devices/parser-tests/001/expected-output \
-	devices/parser-tests/002/ps3da1/etc/yaboot.conf \
-	devices/parser-tests/002/expected-output \
-	devices/parser-tests/003/ps3da1/etc/kboot.conf \
-	devices/parser-tests/003/expected-output \
-	devices/parser-tests/004/rootdev \
-	devices/parser-tests/004/expected-output \
-	devices/parser-tests/004/sda1/etc/kboot.conf
+EXTRA_DIST = bootstrap
 
 MAINTAINERCLEANFILES = aclocal.m4 config.* configure depcomp \
 	install-sh ltmain.sh Makefile.in missing $(PACKAGE)-*.gz
-
-CLEANFILES = $(composed_scripts) $(addsuffix .tmp, $(composed_scripts))
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,7 @@  AC_PROG_LIBTOOL
 AM_INIT_AUTOMAKE
 AC_SUBST([DESTDIR])
 AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile artwork/Makefile devices/Makefile utils/Makefile])
+AC_CONFIG_FILES([Makefile artwork/Makefile devices/Makefile test/Makefile \
+	utils/Makefile])
 
 AC_OUTPUT
--- a/devices/parser-test.c
+++ /dev/null
@@ -1,85 +0,0 @@ 
-#define _GNU_SOURCE
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "parser.h"
-#include "paths.h"
-
-void pb_log(const char *fmt, ...)
-{
-	va_list ap;
-
-	va_start(ap, fmt);
-	vfprintf(stderr, fmt, ap);
-	va_end(ap);
-}
-
-int mount_device(const char *dev_path)
-{
-	printf("[mount] %s\n", dev_path);
-	return 0;
-}
-
-static int device_idx;
-static int option_idx;
-
-int add_device(const struct device *dev)
-{
-	printf("[dev %2d] id: %s\n", device_idx, dev->id);
-	printf("[dev %2d] name: %s\n", device_idx, dev->name);
-	printf("[dev %2d] description: %s\n", device_idx, dev->description);
-	printf("[dev %2d] boot_image: %s\n", device_idx, dev->icon_file);
-
-	device_idx++;
-	option_idx = 0;
-	return 0;
-}
-
-
-int add_boot_option(const struct boot_option *opt)
-{
-	if (!device_idx) {
-		fprintf(stderr, "Option (%s) added before device\n",
-				opt->name);
-		exit(EXIT_FAILURE);
-	}
-
-	printf("[opt %2d] name: %s\n", option_idx, opt->name);
-	printf("[opt %2d] description: %s\n", option_idx, opt->description);
-	printf("[opt %2d] boot_image: %s\n", option_idx, opt->boot_image_file);
-	printf("[opt %2d] initrd: %s\n", option_idx, opt->initrd_file);
-	printf("[opt %2d] boot_args: %s\n", option_idx, opt->boot_args);
-
-	option_idx++;
-
-	return 0;
-}
-
-enum generic_icon_type guess_device_type(void)
-{
-	return ICON_TYPE_UNKNOWN;
-}
-
-int main(int argc, char **argv)
-{
-	char *mountpoint, *dev;
-
-	if (argc != 3) {
-		fprintf(stderr, "usage: %s <basedir> <devname>\n", argv[0]);
-		return EXIT_FAILURE;
-	}
-
-	mountpoint = argv[1];
-	dev = argv[2];
-
-	set_mount_base(mountpoint);
-
-	iterate_parsers(dev, mountpoint);
-
-
-	return EXIT_SUCCESS;
-}
--- a/devices/parser-test.sh.in
+++ /dev/null
@@ -1,26 +0,0 @@ 
-#!/bin/bash
-
-testdir=@top_srcdir@/devices/parser-tests
-default_rootdev=ps3da1
-
-function test_dir()
-{
-	dir="$1"
-	rootdev=$default_rootdev
-	if [ -e "$dir/rootdev" ]
-	then
-		rootdev=$(cat "$dir/rootdev")
-	fi
-	./parser-test "$dir" /dev/$rootdev 2>/dev/null |
-		diff -u "$dir/expected-output" -
-}
-
-set -ex
-
-for test in $testdir/*
-do
-	echo $test
-	test_dir "$test"
-done
-
-echo "All tests passed"
--- a/devices/parser-tests/001/expected-output
+++ /dev/null
@@ -1,24 +0,0 @@ 
-[dev  0] id: /dev/ps3da1
-[dev  0] name: (null)
-[dev  0] description: (null)
-[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
-[opt  0] name: live
-[opt  0] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
-[opt  0] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
-[opt  0] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
-[opt  0] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
-[opt  1] name: live_nosplash
-[opt  1] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet --
-[opt  1] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
-[opt  1] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
-[opt  1] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet --
-[opt  2] name: driverupdates
-[opt  2] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --
-[opt  2] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
-[opt  2] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
-[opt  2] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --
-[opt  3] name: check
-[opt  3] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   boot=casper integrity-check quiet splash --
-[opt  3] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
-[opt  3] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
-[opt  3] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   boot=casper integrity-check quiet splash --
--- a/devices/parser-tests/001/ps3da1/etc/kboot.conf
+++ /dev/null
@@ -1,9 +0,0 @@ 
-# Ubuntu feisty kboot.conf
-message=/etc/kboot.msg
-timeout=300
-default=live
-live='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --'
-live_nosplash='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet --'
-driverupdates='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --'
-check='/casper/vmlinux initrd=/casper/initrd.gz  boot=casper integrity-check quiet splash --'
-
--- a/devices/parser-tests/002/expected-output
+++ /dev/null
@@ -1,9 +0,0 @@ 
-[dev  0] id: /dev/ps3da1
-[dev  0] name: (null)
-[dev  0] description: 
-[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
-[opt  0] name: linux
-[opt  0] description: (null)
-[opt  0] boot_image: devices/parser-tests/002/ps3da1/ppc/ppc64/vmlinux
-[opt  0] initrd: devices/parser-tests/002/ps3da1/ppc/ppc64/ramdisk.image.gz
-[opt  0] boot_args: ro 
--- a/devices/parser-tests/002/ps3da1/etc/yaboot.conf
+++ /dev/null
@@ -1,8 +0,0 @@ 
-init-message = "\nWelcome to the 64-bit Yellow Dog Linux 5.0 installer!\nHit <TAB> for boot options.\n\n"
-timeout=6000
-default=linux
-
-image=/ppc/ppc64/vmlinux
-	label=linux
-	initrd=/ppc/ppc64/ramdisk.image.gz
-	read-only
--- a/devices/parser-tests/003/expected-output
+++ /dev/null
@@ -1,9 +0,0 @@ 
-[dev  0] id: /dev/ps3da1
-[dev  0] name: (null)
-[dev  0] description: (null)
-[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
-[opt  0] name: test
-[opt  0] description: /dev/sda1:/vmlinux
-[opt  0] boot_image: devices/parser-tests/003/ps3da1/vmlinux
-[opt  0] initrd: (null)
-[opt  0] boot_args: (null)
--- a/devices/parser-tests/003/ps3da1/etc/kboot.conf
+++ /dev/null
@@ -1,4 +0,0 @@ 
-# test remapping sda to ps3da, when mounted from a ps3da device
-
-test='/dev/sda1:/vmlinux'
-
--- a/devices/parser-tests/004/expected-output
+++ /dev/null
@@ -1,9 +0,0 @@ 
-[dev  0] id: /dev/sda1
-[dev  0] name: (null)
-[dev  0] description: (null)
-[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
-[opt  0] name: test
-[opt  0] description: /dev/sda1:/vmlinux
-[opt  0] boot_image: devices/parser-tests/004/sda1/vmlinux
-[opt  0] initrd: (null)
-[opt  0] boot_args: (null)
--- a/devices/parser-tests/004/rootdev
+++ /dev/null
@@ -1 +0,0 @@ 
-sda1
--- a/devices/parser-tests/004/sda1/etc/kboot.conf
+++ /dev/null
@@ -1,4 +0,0 @@ 
-# test remapping sda to ps3da, when mounted from a plain sd device
-
-test='/dev/sda1:/vmlinux'
-
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,81 @@ 
+## Makefile.am -- Process this file with automake to produce Makefile.in
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; version 2 of the License.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+
+AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../devices -I$(includedir)
+
+AM_CFLAGS = \
+	-g \
+	-Wall \
+	-W \
+	-Wunused \
+	-Wstrict-prototypes \
+	-Wmissing-prototypes \
+	-Wmissing-declarations \
+	-Wredundant-decls \
+	-Winline
+
+AM_LDFLAGS = -L$(libdir)
+
+check_PROGRAMS = parser-test
+
+check_SCRIPTS = parser-test.sh
+
+parser_test_SOURCES = \
+	parser-test.c \
+	../devices/params.c \
+	../devices/parser.c \
+	../devices/paths.c \
+	../devices/yaboot-cfg.c \
+	../devices/native-parser.c \
+	../devices/yaboot-parser.c \
+	../devices/kboot-parser.c
+
+composed_scripts = parser-test.sh
+
+edit = sed \
+	-e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
+	-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
+	-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
+	-e 's,@libexecdir\@,$(libexecdir),g' \
+	-e 's,@datadir\@,$(pkgdatadir),g'    \
+	-e 's,@prefix\@,$(prefix),g' \
+	-e 's,@sbindir\@,$(sbindir),g' \
+	-e 's,@top_srcdir\@,$(top_srcdir),g'
+
+parser-test.sh: Makefile parser-test.sh.in
+	rm -f $@ $@.tmp
+	$(edit) $(srcdir)/$@.in >$@.tmp
+	chmod +x $@.tmp
+	mv $@.tmp $@
+
+check:
+	./parser-test.sh
+
+EXTRA_DIST = \
+	$(addsuffix .in, $(composed_scripts)) \
+	parser-tests/001/ps3da1/etc/kboot.conf \
+	parser-tests/001/expected-output \
+	parser-tests/002/ps3da1/etc/yaboot.conf \
+	parser-tests/002/expected-output \
+	parser-tests/003/ps3da1/etc/kboot.conf \
+	parser-tests/003/expected-output \
+	parser-tests/004/rootdev \
+	parser-tests/004/expected-output \
+	parser-tests/004/sda1/etc/kboot.conf
+
+MAINTAINERCLEANFILES = Makefile.in
+
+CLEANFILES = $(composed_scripts) $(addsuffix .tmp, $(composed_scripts))
--- /dev/null
+++ b/test/parser-test.c
@@ -0,0 +1,85 @@ 
+#define _GNU_SOURCE
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "parser.h"
+#include "paths.h"
+
+void pb_log(const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	vfprintf(stderr, fmt, ap);
+	va_end(ap);
+}
+
+int mount_device(const char *dev_path)
+{
+	printf("[mount] %s\n", dev_path);
+	return 0;
+}
+
+static int device_idx;
+static int option_idx;
+
+int add_device(const struct device *dev)
+{
+	printf("[dev %2d] id: %s\n", device_idx, dev->id);
+	printf("[dev %2d] name: %s\n", device_idx, dev->name);
+	printf("[dev %2d] description: %s\n", device_idx, dev->description);
+	printf("[dev %2d] boot_image: %s\n", device_idx, dev->icon_file);
+
+	device_idx++;
+	option_idx = 0;
+	return 0;
+}
+
+
+int add_boot_option(const struct boot_option *opt)
+{
+	if (!device_idx) {
+		fprintf(stderr, "Option (%s) added before device\n",
+				opt->name);
+		exit(EXIT_FAILURE);
+	}
+
+	printf("[opt %2d] name: %s\n", option_idx, opt->name);
+	printf("[opt %2d] description: %s\n", option_idx, opt->description);
+	printf("[opt %2d] boot_image: %s\n", option_idx, opt->boot_image_file);
+	printf("[opt %2d] initrd: %s\n", option_idx, opt->initrd_file);
+	printf("[opt %2d] boot_args: %s\n", option_idx, opt->boot_args);
+
+	option_idx++;
+
+	return 0;
+}
+
+enum generic_icon_type guess_device_type(void)
+{
+	return ICON_TYPE_UNKNOWN;
+}
+
+int main(int argc, char **argv)
+{
+	char *mountpoint, *dev;
+
+	if (argc != 3) {
+		fprintf(stderr, "usage: %s <basedir> <devname>\n", argv[0]);
+		return EXIT_FAILURE;
+	}
+
+	mountpoint = argv[1];
+	dev = argv[2];
+
+	set_mount_base(mountpoint);
+
+	iterate_parsers(dev, mountpoint);
+
+
+	return EXIT_SUCCESS;
+}
--- /dev/null
+++ b/test/parser-test.sh.in
@@ -0,0 +1,26 @@ 
+#!/bin/bash
+
+testdir=@top_srcdir@/test/parser-tests
+default_rootdev=ps3da1
+
+function test_dir()
+{
+	dir="$1"
+	rootdev=$default_rootdev
+	if [ -e "$dir/rootdev" ]
+	then
+		rootdev=$(cat "$dir/rootdev")
+	fi
+	./parser-test "$dir" /dev/$rootdev 2>/dev/null |
+		diff -u "$dir/expected-output" -
+}
+
+set -ex
+
+for test in $testdir/*
+do
+	echo $test
+	test_dir "$test"
+done
+
+echo "All tests passed"
--- /dev/null
+++ b/test/parser-tests/001/expected-output
@@ -0,0 +1,24 @@ 
+[dev  0] id: /dev/ps3da1
+[dev  0] name: (null)
+[dev  0] description: (null)
+[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
+[opt  0] name: live
+[opt  0] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
+[opt  0] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
+[opt  0] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
+[opt  0] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
+[opt  1] name: live_nosplash
+[opt  1] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet --
+[opt  1] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
+[opt  1] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
+[opt  1] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper quiet --
+[opt  2] name: driverupdates
+[opt  2] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --
+[opt  2] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
+[opt  2] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
+[opt  2] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --
+[opt  3] name: check
+[opt  3] description: /casper/vmlinux root=/dev/ram0 initrd=/casper/initrd.gz   boot=casper integrity-check quiet splash --
+[opt  3] boot_image: devices/parser-tests/001/ps3da1/casper/vmlinux
+[opt  3] initrd: devices/parser-tests/001/ps3da1/casper/initrd.gz
+[opt  3] boot_args: root=/dev/ram0 initrd=/casper/initrd.gz   boot=casper integrity-check quiet splash --
--- /dev/null
+++ b/test/parser-tests/001/ps3da1/etc/kboot.conf
@@ -0,0 +1,9 @@ 
+# Ubuntu feisty kboot.conf
+message=/etc/kboot.msg
+timeout=300
+default=live
+live='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --'
+live_nosplash='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper quiet --'
+driverupdates='/casper/vmlinux initrd=/casper/initrd.gz  file=/cdrom/preseed/ubuntu.seed boot=casper debian-installer/driver-update=true quiet splash --'
+check='/casper/vmlinux initrd=/casper/initrd.gz  boot=casper integrity-check quiet splash --'
+
--- /dev/null
+++ b/test/parser-tests/002/expected-output
@@ -0,0 +1,9 @@ 
+[dev  0] id: /dev/ps3da1
+[dev  0] name: (null)
+[dev  0] description: 
+[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
+[opt  0] name: linux
+[opt  0] description: (null)
+[opt  0] boot_image: devices/parser-tests/002/ps3da1/ppc/ppc64/vmlinux
+[opt  0] initrd: devices/parser-tests/002/ps3da1/ppc/ppc64/ramdisk.image.gz
+[opt  0] boot_args: ro 
--- /dev/null
+++ b/test/parser-tests/002/ps3da1/etc/yaboot.conf
@@ -0,0 +1,8 @@ 
+init-message = "\nWelcome to the 64-bit Yellow Dog Linux 5.0 installer!\nHit <TAB> for boot options.\n\n"
+timeout=6000
+default=linux
+
+image=/ppc/ppc64/vmlinux
+	label=linux
+	initrd=/ppc/ppc64/ramdisk.image.gz
+	read-only
--- /dev/null
+++ b/test/parser-tests/003/expected-output
@@ -0,0 +1,9 @@ 
+[dev  0] id: /dev/ps3da1
+[dev  0] name: (null)
+[dev  0] description: (null)
+[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
+[opt  0] name: test
+[opt  0] description: /dev/sda1:/vmlinux
+[opt  0] boot_image: devices/parser-tests/003/ps3da1/vmlinux
+[opt  0] initrd: (null)
+[opt  0] boot_args: (null)
--- /dev/null
+++ b/test/parser-tests/003/ps3da1/etc/kboot.conf
@@ -0,0 +1,4 @@ 
+# test remapping sda to ps3da, when mounted from a ps3da device
+
+test='/dev/sda1:/vmlinux'
+
--- /dev/null
+++ b/test/parser-tests/004/expected-output
@@ -0,0 +1,9 @@ 
+[dev  0] id: /dev/sda1
+[dev  0] name: (null)
+[dev  0] description: (null)
+[dev  0] boot_image: /usr/share/petitboot/artwork/hdd.png
+[opt  0] name: test
+[opt  0] description: /dev/sda1:/vmlinux
+[opt  0] boot_image: devices/parser-tests/004/sda1/vmlinux
+[opt  0] initrd: (null)
+[opt  0] boot_args: (null)
--- /dev/null
+++ b/test/parser-tests/004/rootdev
@@ -0,0 +1 @@ 
+sda1
--- /dev/null
+++ b/test/parser-tests/004/sda1/etc/kboot.conf
@@ -0,0 +1,4 @@ 
+# test remapping sda to ps3da, when mounted from a plain sd device
+
+test='/dev/sda1:/vmlinux'
+