]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: use ts_cd everywhere to change direcrory
authorSami Kerola <kerolasa@iki.fi>
Sun, 22 Jun 2014 09:43:00 +0000 (10:43 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 18 Jul 2014 17:34:15 +0000 (18:34 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests/ts/build-sys/config
tests/ts/column/fillrow
tests/ts/column/invalid-multibyte
tests/ts/column/multi-file
tests/ts/column/separator_table
tests/ts/cramfs/mkfs
tests/ts/namei/logic

index 5ae83a3bb9986c07527a0d80e4177fa473e37f6e..15b355103f805421409a66c337324f8e48ec503d 100755 (executable)
@@ -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
 
index 263a2673f8f638a59130bd035d39e9824a5e2070..5700924cbc92ce66e174903340031b9a1e65ac1e 100755 (executable)
@@ -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
 
index 9935a383375435aa95b71b66ab83a04420dbd9c5..a9e371003ba295cbebcffa906fee68ced7e48059 100755 (executable)
@@ -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
 
index 76b8686355bc93777f30edd7171e26b85e262c90..bc7b33101444fb2dd96206c1307c88827c9d4694 100755 (executable)
@@ -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 \
index 8be1e20002a5dd26da616dda3f0c3dd2d9835c07..7c5caae62c0a9cdad9ed340b48602519eadebfb5 100755 (executable)
@@ -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
 
index 06cdfbd32cacae6d162a0f474d18a4ba1f6daeeb..5a10ba9976d5b5b9ab543491624cf6423fa1ea63 100755 (executable)
@@ -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
index df48b76204f0a79f9d9c936fa5e1a72a70cff84d..703cc105459fbdf423f811e4358021683230a68c 100755 (executable)
@@ -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