Skip to content
Closed
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
12 changes: 2 additions & 10 deletions hack/lib/testselect.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@

function run_testselect {
if [[ -n "${ARTIFACT_DIR:-}" && -n "${CLONEREFS_OPTIONS:-}" ]]; then
local clonedir rootdir hack_tmp_dir

hack_tmp_dir=$(mktemp -d)
git clone --branch main https://github.com/openshift-knative/hack "$hack_tmp_dir"
pushd "$hack_tmp_dir" || return $?
go install github.com/openshift-knative/hack/cmd/testselect
popd || return $?
rm -rf "$hack_tmp_dir"

local clonedir rootdir
clonedir=$(mktemp -d)

# CLONEREFS_OPTIONS var is set in CI
Expand All @@ -22,7 +14,7 @@ function run_testselect {

# The testselect clones a repository. Make sure it's cloned into a temp dir.
pushd "$clonedir" || return $?
"$(go env GOPATH)/bin/testselect" --testsuites="${rootdir}/test/testsuites.yaml" --clonerefs="${ARTIFACT_DIR}/clonerefs.json" --output="${ARTIFACT_DIR}/tests.txt"
go run github.com/openshift-knative/hack/cmd/testselect@latest --testsuites="${rootdir}/test/testsuites.yaml" --clonerefs="${ARTIFACT_DIR}/clonerefs.json" --output="${ARTIFACT_DIR}/tests.txt"
popd || return $?

logger.info 'Tests to be run:'
Expand Down
Loading