nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0364-Core-compression-test.patch

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