diff --git a/tests/00-setup b/tests/00-setup index 9e76997..812fe8d 100755 --- a/tests/00-setup +++ b/tests/00-setup @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" jtest_prepare "create a test skeleton in temporary directory" diff --git a/tests/01-cqfd_init b/tests/01-cqfd_init index 0030c09..a9dc3ba 100755 --- a/tests/01-cqfd_init +++ b/tests/01-cqfd_init @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cd $TDIR/ @@ -18,7 +18,7 @@ fi ################################################################################ # 'cqfd init' with a nonexistent Dockerfile should fail ################################################################################ -cqfdrc_old=`mktemp` +cqfdrc_old=$(mktemp) jtest_prepare "init with a nonexisting dockerfile shall fail" cp -f .cqfdrc $cqfdrc_old sed -i -e "s/\[build\]/[build]\ndistro='thisshouldfail'/" .cqfdrc diff --git a/tests/03-cqfd_error b/tests/03-cqfd_error index ae85480..f57307d 100755 --- a/tests/03-cqfd_error +++ b/tests/03-cqfd_error @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" ################################################################################ # Running cqfd with an unknown argument shall fail diff --git a/tests/03-cqfd_help b/tests/03-cqfd_help index f7467e7..f322e24 100755 --- a/tests/03-cqfd_help +++ b/tests/03-cqfd_help @@ -1,12 +1,12 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" ################################################################################ # 'cqfd help' shall be an accepted command ################################################################################ jtest_prepare "cqfd help shall exit normally" -TEST=`mktemp` +TEST=$(mktemp) if ! $TDIR/.cqfd/cqfd help >$TEST; then jtest_result fail diff --git a/tests/03-cqfd_version b/tests/03-cqfd_version index 67d692a..585ae0b 100755 --- a/tests/03-cqfd_version +++ b/tests/03-cqfd_version @@ -1,12 +1,12 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" ################################################################################ # 'cqfd version' shall be an accepted command ################################################################################ jtest_prepare "cqfd version shall exit normally" -TEST=`mktemp` +TEST=$(mktemp) if ! $TDIR/.cqfd/cqfd version >$TEST; then jtest_result fail diff --git a/tests/05-cqfd_init_alt_ext b/tests/05-cqfd_init_alt_ext index 793c2eb..d1f833c 100755 --- a/tests/05-cqfd_init_alt_ext +++ b/tests/05-cqfd_init_alt_ext @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cd $TDIR/ ################################################################################ diff --git a/tests/05-cqfd_init_flavor b/tests/05-cqfd_init_flavor index 9313229..73cfbe9 100755 --- a/tests/05-cqfd_init_flavor +++ b/tests/05-cqfd_init_flavor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" flavor="foo" @@ -9,7 +9,7 @@ cd $TDIR/ ################################################################################ # 'cqfd init' with different flavor makes a different container ################################################################################ -cqfdrc_old=`mktemp` +cqfdrc_old=$(mktemp) cp -f .cqfdrc $cqfdrc_old sed -i -e "s/\[foo\]/[foo]\ndistro='centos'/" .cqfdrc diff --git a/tests/05-cqfd_run b/tests/05-cqfd_run index 006942d..9c488ba 100755 --- a/tests/05-cqfd_run +++ b/tests/05-cqfd_run @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" test_file="a/cqfd_a.txt" diff --git a/tests/05-cqfd_run_c b/tests/05-cqfd_run_c index 35c779f..5717e41 100755 --- a/tests/05-cqfd_run_c +++ b/tests/05-cqfd_run_c @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" test_file="a/cqfd_a.txt" test_run_c_file="test_run_c.txt" diff --git a/tests/05-cqfd_run_c_flavor b/tests/05-cqfd_run_c_flavor index e5ccdd2..14d147c 100755 --- a/tests/05-cqfd_run_c_flavor +++ b/tests/05-cqfd_run_c_flavor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" flavor="foo" test_file=$flavor diff --git a/tests/05-cqfd_run_command b/tests/05-cqfd_run_command index a962ac2..182dd6f 100755 --- a/tests/05-cqfd_run_command +++ b/tests/05-cqfd_run_command @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" test_file="file.$RANDOM" diff --git a/tests/05-cqfd_run_config b/tests/05-cqfd_run_config index 501d15c..880dd65 100755 --- a/tests/05-cqfd_run_config +++ b/tests/05-cqfd_run_config @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" confdir=$TDIR/.config/dir flavor="foo" diff --git a/tests/05-cqfd_run_extra_env b/tests/05-cqfd_run_extra_env index dcebaf5..6c5a579 100755 --- a/tests/05-cqfd_run_extra_env +++ b/tests/05-cqfd_run_extra_env @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" cd $TDIR/ diff --git a/tests/05-cqfd_run_extra_groups b/tests/05-cqfd_run_extra_groups index ebeb5d2..c803414 100755 --- a/tests/05-cqfd_run_extra_groups +++ b/tests/05-cqfd_run_extra_groups @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" cd $TDIR/ diff --git a/tests/05-cqfd_run_extra_hosts b/tests/05-cqfd_run_extra_hosts index 0c29cf1..3564025 100755 --- a/tests/05-cqfd_run_extra_hosts +++ b/tests/05-cqfd_run_extra_hosts @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" getent_cmd="getent hosts 1.2.3.4" diff --git a/tests/05-cqfd_run_flavor b/tests/05-cqfd_run_flavor index 5685e14..12178cf 100755 --- a/tests/05-cqfd_run_flavor +++ b/tests/05-cqfd_run_flavor @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" flavor="foo" diff --git a/tests/05-cqfd_run_home_env_var b/tests/05-cqfd_run_home_env_var index fd8506a..01e0893 100755 --- a/tests/05-cqfd_run_home_env_var +++ b/tests/05-cqfd_run_home_env_var @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" cd $TDIR/ diff --git a/tests/05-cqfd_run_spaces_in_path b/tests/05-cqfd_run_spaces_in_path index 1f4b808..bb85ed7 100755 --- a/tests/05-cqfd_run_spaces_in_path +++ b/tests/05-cqfd_run_spaces_in_path @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" cd $TDIR/ diff --git a/tests/05-cqfd_run_tty b/tests/05-cqfd_run_tty index b002e31..ae08dcd 100755 --- a/tests/05-cqfd_run_tty +++ b/tests/05-cqfd_run_tty @@ -3,7 +3,7 @@ # This test ensures cqfd works when not invoked from a tty (this is the case # when running from a CI system for example). -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" ################################################################################ diff --git a/tests/06-cqfd_release b/tests/06-cqfd_release index 191e922..c3a1cbf 100755 --- a/tests/06-cqfd_release +++ b/tests/06-cqfd_release @@ -1,6 +1,6 @@ #!/usr/bin/env bash -. `dirname $0`/jtest.inc "$1" +. "$(dirname $0)"/jtest.inc "$1" cqfd="$TDIR/.cqfd/cqfd" cd $TDIR/ @@ -119,7 +119,7 @@ rm -rf "${tmp_dir}" jtest_prepare "build.archive can template filenames" export CTEST=foobar -d3=`date --rfc-3339='date'` +d3=$(date --rfc-3339='date') echo 'archive=cqfd-%D3-$CTEST.tar.xz' >> .cqfdrc # Generate the release archive diff --git a/tests/jtest.inc b/tests/jtest.inc index 437c46b..794eb60 100644 --- a/tests/jtest.inc +++ b/tests/jtest.inc @@ -74,7 +74,7 @@ jtest_log() ;; esac - echo -e "\e[${color}m[`date +%T`|$level] $@\e[0m" + echo -e "\e[${color}m[$(date +%T)|$level] $@\e[0m" } # jtest_prepare() - prepare next test