]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
Annotate include statements in shell scripts where the source file is a variable
authorBart Van Assche <bart.vanassche@wdc.com>
Tue, 19 Jun 2018 20:23:46 +0000 (13:23 -0700)
committerOmar Sandoval <osandov@fb.com>
Mon, 25 Jun 2018 19:14:27 +0000 (12:14 -0700)
This causes shellcheck to stop complaining about these include statements.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
check

diff --git a/check b/check
index 10c7acd99d97f78aa482d9bab962bf2c74514364..1c0ad20768d6f3a3cd1ffeb61d1c32c7b59ef7d1 100755 (executable)
--- a/check
+++ b/check
@@ -23,6 +23,7 @@ _found_test() {
 
        unset DESCRIPTION QUICK TIMED requires device_requires test test_device
 
+       # shellcheck disable=SC1090
        if ! . "tests/${test_name}"; then
                return 1
        fi
@@ -395,6 +396,7 @@ _run_test() {
        CHECK_DMESG=1
        DMESG_FILTER=cat
 
+       # shellcheck disable=SC1090
        . "tests/${TEST_NAME}"
 
        if declare -fF test >/dev/null; then
@@ -435,6 +437,7 @@ _run_group() {
        local tests=("$@")
        local group="${tests[0]%/*}"
 
+       # shellcheck disable=SC1090
        . "tests/${group}/group"
 
        if declare -fF group_requires >/dev/null && ! group_requires; then