[PATCH] tests: wrap the dup-clobber test in a script, ...

Jim Meyering meyering at redhat.com
Thu Feb 25 14:05:46 UTC 2010


so that its artifacts are created in the usual temporary subdir
* tests/Makefile.am (TESTS): Remove dup-clobber, and instead...
Add t0500-dup-clobber.sh.
* tests/t0500-dup-clobber.sh: New script.
---
 tests/Makefile.am          |    2 +-
 tests/t0500-dup-clobber.sh |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)
 create mode 100644 tests/t0500-dup-clobber.sh

diff --git a/tests/Makefile.am b/tests/Makefile.am
index afe711c..d0d301d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,7 +2,6 @@ XFAIL_TESTS = \
   t3200-type-change.sh

 TESTS = \
-  dup-clobber \
   t0000-basic.sh \
   t0001-tiny.sh \
   t0010-script-no-ctrl-chars.sh \
@@ -17,6 +16,7 @@ TESTS = \
   t0280-gpt-corrupt.sh \
   t0300-dos-on-gpt.sh \
   t0400-loop-clobber-infloop.sh \
+  t0500-dup-clobber.sh \
   t1100-busy-label.sh \
   t1700-ext-probe.sh \
   t2100-mkswap.sh \
diff --git a/tests/t0500-dup-clobber.sh b/tests/t0500-dup-clobber.sh
new file mode 100644
index 0000000..d699a4f
--- /dev/null
+++ b/tests/t0500-dup-clobber.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# Drive the dup-clobber program.
+
+# Copyright (C) 2009-2010 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+if test "$VERBOSE" = yes; then
+  set -x
+  parted --version
+fi
+
+: ${srcdir=.}
+. $srcdir/t-lib.sh
+
+PATH="..:$PATH"
+export PATH
+
+fail=0
+dup-clobber || fail=1
+
+Exit $fail
--
1.7.0.401.g84adb



More information about the parted-devel mailing list