diff --git a/scripts/library.sh b/scripts/library.sh index ca33e3111ce..1182c0379ce 100755 --- a/scripts/library.sh +++ b/scripts/library.sh @@ -254,19 +254,11 @@ function start_latest_knative_build() { # $2...$n - directories and files to inspect. function update_licenses() { cd ${REPO_ROOT_DIR} || return 1 - if [[ ! $PWD =~ (.*)/go/src/(.*) ]]; then - echo "ERROR: expected to be under /go/src, but actually in '$PWD'" - return 1 - fi - local go_src="/go/src/${BASH_REMATCH[2]}" local dst=$1 shift local local_dep_collector="$(which dep-collector)" - if [[ -n ${local_dep_collector} ]]; then - dep-collector $@ > ./${dst} - else - docker run -v $PWD:${go_src} --entrypoint sh \ - gcr.io/knative-tests/test-infra/prow-tests -c \ - "cd ${go_src} ; dep-collector $@ > ${go_src}/${dst}" + if [[ -z ${local_dep_collector} ]]; then + go get -u github.com/mattmoor/dep-collector fi + dep-collector $@ > ./${dst} } diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index f5a8d6ea93a..fb485109330 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -21,11 +21,7 @@ # Use the flags --build-tests, --unit-tests and --integration-tests # to run a specific set of tests. -# Load github.com/knative/test-infra/images/prow-tests/scripts/presubmit-tests.sh -[ -f /workspace/presubmit-tests.sh ] \ - && source /workspace/presubmit-tests.sh \ - || eval "$(docker run --entrypoint sh gcr.io/knative-tests/test-infra/prow-tests -c 'cat presubmit-tests.sh')" -[ -v KNATIVE_TEST_INFRA ] || exit 1 +source $(dirname $0)/../scripts/presubmit-tests.sh function build_tests() { header "Running build tests"