diff --git a/Makefile b/Makefile index 411e1f78fa..16180e8e74 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ generate-protocols: # Some static checks rely on generated source files of components. static-checks: static-checks-build - bash tests/static-checks.sh github.com/kata-containers/kata-containers + bash tests/static-checks.sh docs-url-alive-check: bash ci/docs-url-alive-check.sh diff --git a/tests/static-checks.sh b/tests/static-checks.sh index 88e1d61e95..f4bb4077fa 100755 --- a/tests/static-checks.sh +++ b/tests/static-checks.sh @@ -20,8 +20,6 @@ source "${cidir}/common.bash" # set GO111MODULE to "auto" to enable module-aware mode only when # a go.mod file is present in the current directory. export GO111MODULE="auto" -export test_path="${test_path:-github.com/kata-containers/kata-containers/tests}" -export test_dir="${GOPATH}/src/${test_path}" # List of files to delete on exit files_to_remove=() @@ -125,7 +123,7 @@ usage() cat </dev/null; then warn "$linter_cmd command found but not the required version $linter_version" @@ -1560,22 +1555,17 @@ main() if [ -z "$repo" ] then - if [ -n "$KATA_DEV_MODE" ] - then - # No repo param provided so assume it's the current - # one to avoid developers having to specify one now - # (backwards compatability). - repo=$(git config --get remote.origin.url |\ - sed 's!https://!!g' || true) - - info "Auto-detected repo as $repo" - else - if [ "$list_only" != "true" ]; then - echo >&2 "ERROR: need repo" && usage && exit 1 - fi - fi + # No repo param provided so assume it's the current + # one to avoid developers having to specify one now + # (backwards compatability). + repo=$(git config --get remote.origin.url |\ + sed 's!https://!!g' || true) + info "Auto-detected repo as $repo" fi + test_path="${test_path:-"${repo}/tests"}" + test_dir="${GOPATH}/src/${test_path}" + repo_path=$GOPATH/src/$repo announce