nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
Blob Blame History Raw
From 795dd1f8388ba8472781a001ab1c832091dffc54 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sat, 27 Apr 2013 19:44:00 +0200
Subject: [PATCH 364/482] 	Core compression test.

---
 ChangeLog                |  4 ++++
 Makefile.util.def        |  6 ++++++
 tests/util/grub-shell.in | 10 +++++++++-
 util/grub-mkrescue.in    |  7 +++++++
 4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 09a6c70..6709939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
 
+	Core compression test.
+
+2013-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
+
 	Implement grub_machine_get_bootlocation for ARC.
 
 2013-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
diff --git a/Makefile.util.def b/Makefile.util.def
index 1b71fd0..caa6c05 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -720,6 +720,12 @@ script = {
 
 script = {
   testcase;
+  name = core_compress_test;
+  common = tests/core_compress_test.in;
+};
+
+script = {
+  testcase;
   name = xzcompress_test;
   common = tests/xzcompress_test.in;
 };
diff --git a/tests/util/grub-shell.in b/tests/util/grub-shell.in
index e00998a..b034e96 100644
--- a/tests/util/grub-shell.in
+++ b/tests/util/grub-shell.in
@@ -177,6 +177,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
 esac
 
 timeout=60
+mkimage_extra_arg=
 
 # Check the arguments.
 for option in "$@"; do
@@ -236,6 +237,13 @@ for option in "$@"; do
     --timeout=*)
         timeout=`echo "$option" | sed -e 's/--timeout=//'`
 	;;
+
+    # Intentionally undocumented
+    --grub-mkimage-extra)
+	mkimage_extra_arg="$mkimage_extra_arg `argument $option "$@"`"; shift ;;
+    --grub-mkimage-extra=*)
+	mkimage_extra_arg="$mkimage_extra_arg `echo "$option" | sed 's/--grub-mkimage-extra=//'`" ;;
+
     --boot=*)
         dev=`echo "$option" | sed -e 's/--boot=//'`
 	if   [ "$dev" = "fd" ] ; then boot=fd;
@@ -325,7 +333,7 @@ echo "${halt_cmd}" >>${cfgfile}
 isofile=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` || exit 1
 if [ x$boot != xnet ] && [ x$boot != xemu ]; then
     pkgdatadir="@builddir@" sh "@builddir@/grub-mkrescue" "--grub-mkimage=${builddir}/grub-mkimage" "--grub-render-label=${builddir}/grub-render-label" "--output=${isofile}" "--override-directory=${builddir}/grub-core" \
-	--rom-directory="${rom_directory}" ${mkrescue_args} \
+	--rom-directory="${rom_directory}" "--grub-mkimage-extra=$mkimage_extra_arg" ${mkrescue_args} \
 	"/boot/grub/grub.cfg=${cfgfile}" "/boot/grub/testcase.cfg=${source}" \
 	${files} >/dev/null 2>&1
 fi
diff --git a/util/grub-mkrescue.in b/util/grub-mkrescue.in
index f2b24b4..eab621e 100644
--- a/util/grub-mkrescue.in
+++ b/util/grub-mkrescue.in
@@ -105,6 +105,7 @@ usage () {
 }
 
 system_area=auto
+mkimage_extra_arg=
 
 # Check the arguments.
 while test $# -gt 0
@@ -154,6 +155,12 @@ do
 	export PATH
 	;;
 
+    # Intentionally undocumented
+    --grub-mkimage-extra)
+	mkimage_extra_arg="$mkimage_extra_arg `argument $option "$@"`"; shift ;;
+    --grub-mkimage-extra=*)
+	mkimage_extra_arg="$mkimage_extra_arg `echo "$option" | sed 's/--grub-mkimage-extra=//'`" ;;
+
     --sparc-boot)
         system_area=sparc64 ;;
 
-- 
1.8.2.1