[PATCH] adjust tests here (libparted/tests/), as done for tests/

Jim Meyering meyering at redhat.com
Sun Jun 8 21:18:02 UTC 2008


* libparted/tests/Makefile.am (init.sh): Don't emit code to
source test-lib.sh.
* libparted/tests/t1000-label.sh: Source test-lib.sh, not init.sh.
* libparted/tests/t2000-disk.sh: Likewise.
---
 libparted/tests/Makefile.am    |    1 -
 libparted/tests/t1000-label.sh |    5 +++--
 libparted/tests/t2000-disk.sh  |    5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
index fc42a43..cde1602 100644
--- a/libparted/tests/Makefile.am
+++ b/libparted/tests/Makefile.am
@@ -28,7 +28,6 @@ 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 '. $(abs_top_srcdir)/tests/test-lib.sh' >> $@-t
 	echo 'PATH=$(abs_builddir)$(PATH_SEPARATOR)$$PATH; export PATH' >> $@-t
 	chmod a-w $@-t
 	mv $@-t $@
diff --git a/libparted/tests/t1000-label.sh b/libparted/tests/t1000-label.sh
index c7a4d66..900433f 100755
--- a/libparted/tests/t1000-label.sh
+++ b/libparted/tests/t1000-label.sh
@@ -1,6 +1,6 @@
 #!/bin/sh

-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 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
@@ -19,7 +19,8 @@ test_description='run the label unit tests in a directory supporting O_DIRECT'
 # This wrapper around the ./label binary is used to find a directory
 # in which one can open a file with the O_DIRECT flag.

-. ./init.sh
+: ${top_srcdir=../..}
+. $top_srcdir/tests/test-lib.sh

 test_expect_success \
     'run the actual tests' 'label'
diff --git a/libparted/tests/t2000-disk.sh b/libparted/tests/t2000-disk.sh
index 7a85b98..ae261a9 100755
--- a/libparted/tests/t2000-disk.sh
+++ b/libparted/tests/t2000-disk.sh
@@ -1,6 +1,6 @@
 #!/bin/sh

-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2008 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
@@ -19,7 +19,8 @@ test_description='run the disk unit tests in a directory supporting O_DIRECT'
 # This wrapper around the ./label binary is used to find a directory
 # in which one can open a file with the O_DIRECT flag.

-. ./init.sh
+: ${top_srcdir=../..}
+. $top_srcdir/tests/test-lib.sh

 test_expect_success \
     'run the actual tests' 'disk'
-- 
1.5.6.rc0.30.g7c3f3



More information about the parted-devel mailing list