From 3ea70d336aaf73983274bd730c7f3198303ed5c6 Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Mon, 4 Nov 2019 10:48:58 -0500 Subject: [PATCH] Revert "test: Fix a few instances of errant cd" This reverts commit 0b9931516ddc23e3b821ed2de1f45692a06f0d4d. "cd $dir && ..." in single line does switch directory for the following commands. The patch being reverted, broke the nightly (autopackage.sh) tests. It was only fixing couple of instances of SC2164, which is being excluded either way. https://github.com/koalaman/shellcheck/wiki/SC2164 Signed-off-by: Tomasz Zawadzki Change-Id: Id4f134ad98953b92fdc69cd0d0b80c02660cf7a9 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473220 Reviewed-by: Seth Howell Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- autopackage.sh | 16 ++++++++++++---- test/unit/unittest.sh | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/autopackage.sh b/autopackage.sh index 9ba3322e9..eff16daaa 100755 --- a/autopackage.sh +++ b/autopackage.sh @@ -55,22 +55,30 @@ echo "tmpdir=$tmpdir" tar -C "$tmpdir" -xf $spdk_tarball if [ -z "$WITH_DPDK_DIR" ]; then - cd dpdk && git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball} + cd dpdk + git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball} + cd .. tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball fi if [ -d "intel-ipsec-mb" ]; then - cd intel-ipsec-mb && git archive HEAD^{tree} --prefix=intel-ipsec-mb/ -o ../${ipsec_tarball} + cd intel-ipsec-mb + git archive HEAD^{tree} --prefix=intel-ipsec-mb/ -o ../${ipsec_tarball} + cd .. tar -C "$tmpdir/${spdk_pv}" -xf $ipsec_tarball fi if [ -d "isa-l" ]; then - cd isa-l && git archive HEAD^{tree} --prefix=isa-l/ -o ../${isal_tarball} + cd isa-l + git archive HEAD^{tree} --prefix=isa-l/ -o ../${isal_tarball} + cd .. tar -C "$tmpdir/${spdk_pv}" -xf $isal_tarball fi if [ -d "ocf" ]; then - cd ocf && git archive HEAD^{tree} --prefix=ocf/ -o ../${ocf_tarball} + cd ocf + git archive HEAD^{tree} --prefix=ocf/ -o ../${ocf_tarball} + cd .. tar -C "$tmpdir/${spdk_pv}" -xf $ocf_tarball fi diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 95ebad8b4..0a6dc6af0 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -188,7 +188,9 @@ if [ "$cov_avail" = "yes" ]; then rm -f $UT_COVERAGE/ut_cov_base.info $UT_COVERAGE/ut_cov_test.info genhtml $UT_COVERAGE/ut_cov_unit.info --output-directory $UT_COVERAGE # git -C option not used for compatibility reasons - cd $rootdir && git clean -f "*.gcda" + cd $rootdir + git clean -f "*.gcda" + cd - fi set +x