From 35a492e4a2c70d27bc0a7f0c567b2a3405f31599 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Mon, 16 Feb 2015 22:07:33 +0300 Subject: [PATCH] tests: remove hardcoded paths from syslinux_test abs_top_srcdir appeared in Autoconf 2.52f. Minimal grub requirement is 2.60 so we should be good here. --- Makefile.am | 6 ++++ conf/Makefile.extra-dist | 2 +- ...10.04_grub.cfg => ubuntu10.04_grub.cfg.in} | 30 +++++++++---------- tests/syslinux_test.in | 4 +-- 4 files changed, 24 insertions(+), 18 deletions(-) rename tests/syslinux/{ubuntu10.04_grub.cfg => ubuntu10.04_grub.cfg.in} (85%) diff --git a/Makefile.am b/Makefile.am index f702951af..994ebbd39 100644 --- a/Makefile.am +++ b/Makefile.am @@ -452,3 +452,9 @@ ChangeLog: FORCE fi EXTRA_DIST += ChangeLog ChangeLog-2015 + +syslinux_test: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg + +tests/syslinux/ubuntu10.04_grub.cfg: $(top_builddir)/config.status tests/syslinux/ubuntu10.04_grub.cfg.in + (for x in tests/syslinux/ubuntu10.04_grub.cfg.in ; do cat $(srcdir)/"$$x"; done) | $(top_builddir)/config.status --file=$@:- +CLEANFILES += tests/syslinux/ubuntu10.04_grub.cfg diff --git a/conf/Makefile.extra-dist b/conf/Makefile.extra-dist index 8a65e37a6..db6cfd12e 100644 --- a/conf/Makefile.extra-dist +++ b/conf/Makefile.extra-dist @@ -132,4 +132,4 @@ EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/stdmenu.cfg EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/dtmenu.cfg EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/po4a.cfg EXTRA_DIST += tests/syslinux/ubuntu10.04/isolinux/rqtxt.cfg -EXTRA_DIST += tests/syslinux/ubuntu10.04_grub.cfg +EXTRA_DIST += tests/syslinux/ubuntu10.04_grub.cfg.in diff --git a/tests/syslinux/ubuntu10.04_grub.cfg b/tests/syslinux/ubuntu10.04_grub.cfg.in similarity index 85% rename from tests/syslinux/ubuntu10.04_grub.cfg rename to tests/syslinux/ubuntu10.04_grub.cfg.in index e6bd82cbe..846e4acf0 100644 --- a/tests/syslinux/ubuntu10.04_grub.cfg +++ b/tests/syslinux/ubuntu10.04_grub.cfg.in @@ -1,4 +1,4 @@ - background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux'/'splash.png' + background_image '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux'/'splash.png' # D-I config version 2.0 # UNSUPPORTED command 'menu hshift 13' # UNSUPPORTED command 'menu width 49' @@ -41,7 +41,7 @@ menuentry 'Test memory' --hotkey 'm' --id 'memtest' { linux$linux_suffix '/'/'/install/mt86plus' } menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/gtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/gtk.cfg not found # UNSUPPORTED command 'menu begin advanced' # UNSUPPORTED command 'menu title Advanced options' # UNSUPPORTED command 'menu color title * #FFFFFFFF *' @@ -63,15 +63,15 @@ menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { } menuentry 'Back..' --hotkey 'b' --id 'mainmenu' { # UNSUPPORTED command 'menu exit' -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/adgtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/adgtk.cfg not found # UNSUPPORTED command 'menu end' # UNSUPPORTED entry type 0 true; } menuentry 'Help' --hotkey 'h' --id 'help' { # UNSUPPORTED command 'ui gfxboot bootlogo' -#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: - background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'splash.png' +#'@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux'/'prompt.cfg' (host)@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: + background_image '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/'/'splash.png' # UNSUPPORTED command 'display f1.txt' # UNSUPPORTED command 'menu hshift 13' # UNSUPPORTED command 'menu width 49' @@ -114,7 +114,7 @@ menuentry 'Test memory' --hotkey 'm' --id 'memtest' { linux$linux_suffix '/'/'/install/mt86plus' } menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//gtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//gtk.cfg not found # UNSUPPORTED command 'menu begin advanced' # UNSUPPORTED command 'menu title Advanced options' # UNSUPPORTED command 'menu color title * #FFFFFFFF *' @@ -136,14 +136,14 @@ menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { } menuentry 'Back..' --hotkey 'b' --id 'mainmenu' { # UNSUPPORTED command 'menu exit' -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//adgtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//adgtk.cfg not found # UNSUPPORTED command 'menu end' # UNSUPPORTED entry type 0 true; } menuentry 'Help' --hotkey 'h' --id 'help' { -#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: - syslinux_configfile -r '/'/'/' -c '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'' '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg' +#'@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg' (host)@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: + syslinux_configfile -r '/'/'/' -c '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/'/'' '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg' } menuentry 'menu' --id 'menu' { # UNSUPPORTED command 'f1 f1.txt' @@ -156,8 +156,8 @@ menuentry 'menu' --id 'menu' { # UNSUPPORTED command 'f8 f8.txt' # UNSUPPORTED command 'f9 f9.txt' # UNSUPPORTED command 'f0 f10.txt' -#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'isolinux.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg: - background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'splash.png' +#'@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/'/'isolinux.cfg' (host)@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg: + background_image '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//'/'splash.png' # D-I config version 2.0 # UNSUPPORTED command 'menu hshift 13' # UNSUPPORTED command 'menu width 49' @@ -200,7 +200,7 @@ menuentry 'Test memory' --hotkey 'm' --id 'memtest' { linux$linux_suffix '/'/'/install/mt86plus' } menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux///gtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux///gtk.cfg not found # UNSUPPORTED command 'menu begin advanced' # UNSUPPORTED command 'menu title Advanced options' # UNSUPPORTED command 'menu color title * #FFFFFFFF *' @@ -222,15 +222,15 @@ menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' { } menuentry 'Back..' --hotkey 'b' --id 'mainmenu' { # UNSUPPORTED command 'menu exit' -# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux///adgtk.cfg not found +# File (host)/@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux///adgtk.cfg not found # UNSUPPORTED command 'menu end' # UNSUPPORTED entry type 0 true; } menuentry 'Help' --hotkey 'h' --id 'help' { # UNSUPPORTED command 'ui gfxboot bootlogo' -#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: - syslinux_configfile -r '/'/'/' -c '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'' '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg' +#'@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg' (host)@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg: + syslinux_configfile -r '/'/'/' -c '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//'/'' '@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg' } } } diff --git a/tests/syslinux_test.in b/tests/syslinux_test.in index 08d28da08..fc4edd8ef 100644 --- a/tests/syslinux_test.in +++ b/tests/syslinux_test.in @@ -4,11 +4,11 @@ set -e outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1 -"@builddir@/grub-syslinux2cfg" -r "@srcdir@/tests/syslinux/ubuntu10.04" "@srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg" -o "$outfile" +"@builddir@/grub-syslinux2cfg" -r "@abs_top_srcdir@/tests/syslinux/ubuntu10.04" "@abs_top_srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg" -o "$outfile" echo "$outfile" -if ! diff -u "$outfile" "@srcdir@/tests/syslinux/ubuntu10.04_grub.cfg"; then +if ! diff -u "$outfile" "@builddir@/tests/syslinux/ubuntu10.04_grub.cfg"; then echo "Mismatch in ubuntu10.04" exit 1; fi