Skip to content

Run testselect directly #3388

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 2 commits into from
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