From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: [PATCH 3/6] tests: use ts_cd everywhere to change direcrory
Date: Sun, 22 Jun 2014 11:31:54 +0100 [thread overview]
Message-ID: <1403433117-32652-4-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1403433117-32652-1-git-send-email-kerolasa@iki.fi>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4173 bytes --]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
tests/ts/build-sys/config | 6 +++---
tests/ts/column/fillrow | 2 +-
tests/ts/column/invalid-multibyte | 2 +-
tests/ts/column/multi-file | 2 +-
tests/ts/column/separator_table | 2 +-
tests/ts/cramfs/mkfs | 8 ++++----
tests/ts/namei/logic | 2 +-
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/ts/build-sys/config b/tests/ts/build-sys/config
index 5ae83a3..15b3551 100755
--- a/tests/ts/build-sys/config
+++ b/tests/ts/build-sys/config
@@ -19,7 +19,7 @@ config_gen_dir="$top_srcdir/tools"
[ -n "$CFLAGS" ] && export CFLAGS="$CFLAGS"
-cd $top_builddir && make -j clean &> /dev/null
+ts_cd $top_builddir && make -j clean &> /dev/null
for conf in $config_gen_dir/config-gen.d/*.conf; do
ts_init_subtest $(basename $conf | sed 's/\.conf//')
@@ -27,7 +27,7 @@ for conf in $config_gen_dir/config-gen.d/*.conf; do
opts=$(ul_get_configuration $conf)
olddir=$(pwd)
- cd $top_builddir
+ ts_cd $top_builddir
./configure $opts &> /dev/null
make -j &> /dev/null
@@ -63,7 +63,7 @@ for conf in $config_gen_dir/config-gen.d/*.conf; do
[ -d tests/diff.save ] && mv tests/diff.save tests/diff
[ -d tests/output.save ] && mv tests/output.save tests/output
- cd $olddir
+ ts_cd $olddir
ts_finalize_subtest
done
diff --git a/tests/ts/column/fillrow b/tests/ts/column/fillrow
index 263a267..5700924 100755
--- a/tests/ts/column/fillrow
+++ b/tests/ts/column/fillrow
@@ -23,7 +23,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_COLUMN"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
$TS_CMD_COLUMN -x -c 50 $TS_SELF/input >> $TS_OUTPUT 2>&1
diff --git a/tests/ts/column/invalid-multibyte b/tests/ts/column/invalid-multibyte
index 9935a38..a9e3710 100755
--- a/tests/ts/column/invalid-multibyte
+++ b/tests/ts/column/invalid-multibyte
@@ -23,7 +23,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_COLUMN"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
printf "£\n" | LC_ALL=C $TS_CMD_COLUMN >> $TS_OUTPUT 2>&1
diff --git a/tests/ts/column/multi-file b/tests/ts/column/multi-file
index 76b8686..bc7b331 100755
--- a/tests/ts/column/multi-file
+++ b/tests/ts/column/multi-file
@@ -24,7 +24,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_COLUMN"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
$TS_CMD_COLUMN -x -c 50 $TS_SELF/input \
$TS_SELF/input \
diff --git a/tests/ts/column/separator_table b/tests/ts/column/separator_table
index 8be1e20..7c5caae 100755
--- a/tests/ts/column/separator_table
+++ b/tests/ts/column/separator_table
@@ -23,7 +23,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_COLUMN"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
$TS_CMD_COLUMN -s 2 -t $TS_SELF/input >> $TS_OUTPUT 2>&1
diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs
index 06cdfbd..5a10ba9 100755
--- a/tests/ts/cramfs/mkfs
+++ b/tests/ts/cramfs/mkfs
@@ -53,7 +53,7 @@ if [ ! -d "$IMAGE_SRC" ]; then
done
fi
-cd $IMAGE_SRC
+ts_cd "$IMAGE_SRC"
ts_log "list checksums from original data"
find -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
@@ -63,7 +63,7 @@ ts_log "create cramfs image"
$TS_CMD_MKCRAMFS -n $LABEL $IMAGE_SRC $IMAGE_PATH 2>&1 >> $TS_OUTPUT
[ -s "$IMAGE_PATH" ] || ts_die "Cannot create $IMAGE_PATH"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
ts_log "count MD5 from the image"
md5sum $IMAGE_NAME 2>&1 | sort >> $TS_OUTPUT
@@ -82,7 +82,7 @@ ts_mount "cramfs" -r -L $LABEL $TS_MOUNTPOINT
# check it
ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts" $DEVICE
-cd $TS_MOUNTPOINT
+ts_cd "$TS_MOUNTPOINT"
ts_log "list the image"
export TZ='GMT-1'
@@ -93,7 +93,7 @@ ts_log "list checksums from new data"
find . -type f -exec md5sum {} \; | sort >> $TS_OUTPUT
echo >> $TS_OUTPUT
-cd $ORIGPWD
+ts_cd "$ORIGPWD"
ts_log "umount the image"
$TS_CMD_UMOUNT $DEVICE
diff --git a/tests/ts/namei/logic b/tests/ts/namei/logic
index df48b76..703cc10 100755
--- a/tests/ts/namei/logic
+++ b/tests/ts/namei/logic
@@ -23,7 +23,7 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_NAMEI"
-cd $TS_OUTDIR
+ts_cd "$TS_OUTDIR"
mkdir -p namei1/namei2
touch namei1/namei2/a namei1/namei2/b
--
2.0.0
next prev parent reply other threads:[~2014-06-22 10:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 10:31 [PATCH 0/6] pull: rename fixes Sami Kerola
2014-06-22 10:31 ` [PATCH 1/6] rename: allow renaming in subdirectories Sami Kerola
2014-06-22 10:31 ` [PATCH 2/6] tests: add function to change directory reliable way Sami Kerola
2014-06-22 10:31 ` Sami Kerola [this message]
2014-06-22 10:31 ` [PATCH 4/6] tests: add rename(1) checks Sami Kerola
2014-06-22 10:31 ` [PATCH 5/6] rename: continue despite something failed Sami Kerola
2014-06-25 12:11 ` Karel Zak
2014-06-28 18:29 ` Sami Kerola
2014-06-22 10:31 ` [PATCH 6/6] rename: use function pointer to select file or symlink operation Sami Kerola
2014-06-25 12:05 ` [PATCH 0/6] pull: rename fixes Karel Zak
2014-07-22 10:13 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403433117-32652-4-git-send-email-kerolasa@iki.fi \
--to=kerolasa@iki.fi \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.