OSDN Git Service

tests: better quoting to avoid failure with poorly-named src directory
authorJim Meyering <meyering@redhat.com>
Thu, 9 Jul 2009 17:07:01 +0000 (19:07 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 9 Jul 2009 17:23:05 +0000 (19:23 +0200)
* libparted/tests/Makefile.am (init.sh): Quote, in case
$(abs_top_srcdir) contains e.g., spaces.
* tests/Makefile.am (init.sh): Likewise.
* libparted/tests/t2000-disk.sh: Better quoting here, too.
* libparted/tests/t1000-label.sh: Likewise.
Reported by Joel Granados

libparted/tests/Makefile.am
libparted/tests/t1000-label.sh
libparted/tests/t2000-disk.sh
tests/Makefile.am

index 197b02d..d2a7176 100644 (file)
@@ -25,9 +25,9 @@ CLEANFILES = init.sh
 all: init.sh
 init.sh: Makefile.in
        rm -f $@-t $@
-       echo 'PARTED_USABLE_TEST_DIR=$(PARTED_USABLE_TEST_DIR)' > $@-t
-       echo 'abs_top_srcdir=$(abs_top_srcdir)' >> $@-t
-       echo 'PATH=$(abs_builddir)$(PATH_SEPARATOR)$$PATH; export PATH' >> $@-t
+       echo 'PARTED_USABLE_TEST_DIR="$(PARTED_USABLE_TEST_DIR)"' > $@-t
+       echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t
+       echo 'PATH="$(abs_builddir)$(PATH_SEPARATOR)$$PATH"; export PATH' >> $@-t
        chmod a-w $@-t
        mv $@-t $@
 
index 900433f..f77919d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
 # 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
@@ -20,7 +20,7 @@ test_description='run the label unit tests in a directory supporting O_DIRECT'
 # in which one can open a file with the O_DIRECT flag.
 
 : ${top_srcdir=../..}
-. $top_srcdir/tests/test-lib.sh
+. "$top_srcdir/tests/test-lib.sh"
 
 test_expect_success \
     'run the actual tests' 'label'
index ae261a9..2d074b0 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
 # 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
@@ -20,7 +20,7 @@ test_description='run the disk unit tests in a directory supporting O_DIRECT'
 # in which one can open a file with the O_DIRECT flag.
 
 : ${top_srcdir=../..}
-. $top_srcdir/tests/test-lib.sh
+. "$top_srcdir/tests/test-lib.sh"
 
 test_expect_success \
     'run the actual tests' 'disk'
index 7b532ff..9c17c06 100644 (file)
@@ -35,9 +35,9 @@ CLEANFILES = init.sh
 all: init.sh
 init.sh: Makefile.in
        rm -f $@-t $@
-       echo 'PARTED_USABLE_TEST_DIR=$(PARTED_USABLE_TEST_DIR)' > $@-t
-       echo 'abs_top_srcdir=$(abs_top_srcdir)' >> $@-t
-       echo 'PATH=$(parted_dir)$(sep)$(pp_dir)$(sep)$$PATH' >> $@-t
+       echo 'PARTED_USABLE_TEST_DIR="$(PARTED_USABLE_TEST_DIR)"' > $@-t
+       echo 'abs_top_srcdir="$(abs_top_srcdir)"' >> $@-t
+       echo 'PATH="$(parted_dir)$(sep)$(pp_dir)$(sep)$$PATH"' >> $@-t
        echo 'export PATH' >> $@-t
        chmod a-w $@-t
        mv $@-t $@