OSDN Git Service

tests: switch from t-lib.sh to init.sh
authorJim Meyering <meyering@redhat.com>
Fri, 19 Nov 2010 10:30:45 +0000 (11:30 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 20 Nov 2010 16:04:09 +0000 (17:04 +0100)
commitd6d9855d714c377d8928582c622a2847ff4de71e
tree545c468d12de1419d8815e3346fa0f8f9a1a0aff
parent3bbdef285df7ccb47ab2448f41cdd55c08dc244c
tests: switch from t-lib.sh to init.sh

* tests/init.cfg: Source t-local.sh.
* tests/t-local.sh: Replace trap so that we always run
scsi_debug_cleanup_, regardless of the cleanup_ function.
Replace each snippet like this:
-if test "$VERBOSE" = yes; then
-  set -x
-  parted --version
-fi
-
-: ${srcdir=.}
-. $srcdir/t-lib.sh
+. "${srcdir=.}/init.sh"; path_prepend_ ../parted

Use this command (LHS elided, because it was too long):
  git grep -l 'srcdir/t-lib.sh'|xargs perl -p0i -e \
    's!...!. "\${srcdir=.}/init.sh"; path_prepend_ ../parted\n!'

* tests/t3310-flags.sh: Adjust manually, since the snippet
didn't quite match.
32 files changed:
tests/init.cfg
tests/t-local.sh
tests/t0001-tiny.sh
tests/t0010-script-no-ctrl-chars.sh
tests/t0100-print.sh
tests/t0200-gpt.sh
tests/t0201-gpt.sh
tests/t0202-gpt-pmbr.sh
tests/t0205-gpt-list-clobbers-pmbr.sh
tests/t0206-gpt-print-with-corrupt-primary-clobbers-pmbr.sh
tests/t0250-gpt.sh
tests/t0280-gpt-corrupt.sh
tests/t0300-dos-on-gpt.sh
tests/t0400-loop-clobber-infloop.sh
tests/t0500-dup-clobber.sh
tests/t1700-ext-probe.sh
tests/t2200-dos-label-recog.sh
tests/t2300-dos-label-extended-bootcode.sh
tests/t2310-dos-extended-2-sector-min-offset.sh
tests/t2400-dos-hfs-partition-type.sh
tests/t3000-resize-fs.sh
tests/t3200-type-change.sh
tests/t3300-palo-prep.sh
tests/t3310-flags.sh
tests/t4001-sun-vtoc.sh
tests/t6000-dm.sh
tests/t8000-loop.sh
tests/t9010-big-sector.sh
tests/t9020-alignment.sh
tests/t9021-maxima.sh
tests/t9030-align-check.sh
tests/t9040-many-partitions.sh