From 08d5d8474b288a658b4e542e197805a6b5b18ce5 Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Wed, 13 Nov 2019 15:28:31 -0700 Subject: [PATCH] test: fix SC2103 errors on older shellcheck. Shellcheck version 0.6.0 reports all instances where we cd .. or cd - as instances of SC2103. The version we are using on the test pool must be newer, because we don't get the same errors, but for people running check_format locally, it can make it difficult to parse the output. Change-Id: I09f81a83c6f37480f13c36eb622e500364a1c437 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474150 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris Reviewed-by: Maciej Wawryk --- autopackage.sh | 16 ++++------------ test/unit/unittest.sh | 4 +--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/autopackage.sh b/autopackage.sh index 5428cb344..ddc46f530 100755 --- a/autopackage.sh +++ b/autopackage.sh @@ -55,30 +55,22 @@ 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 .. + (cd dpdk && git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball}) 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 .. + (cd intel-ipsec-mb && git archive HEAD^{tree} --prefix=intel-ipsec-mb/ -o ../${ipsec_tarball}) 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 .. + (cd isa-l && git archive HEAD^{tree} --prefix=isa-l/ -o ../${isal_tarball}) 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 .. + (cd ocf && git archive HEAD^{tree} --prefix=ocf/ -o ../${ocf_tarball}) tar -C "$tmpdir/${spdk_pv}" -xf $ocf_tarball fi diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index d88260cb4..483ea9fcd 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -190,9 +190,7 @@ 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 - + (cd $rootdir && git clean -f "*.gcda") fi set +x