Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions scripts/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
6 changes: 1 addition & 5 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down