/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
hack/update-generated.sh
27 строк
1 KB
Stephen Goeddel
remove annotations and replace with environment selector based test skipping and disablement
24 сен 2025, 14:05
24 сен 2025, 14:05
4d9b126
Код
Авторство
О чём код?
#!/usr/bin/env bash STARTTIME=$(date +%s) source "$(dirname "${BASH_SOURCE}")/lib/init.sh" # Update test names. # Since k8s 1.24, GCP PD tests are opt-in through an environment variable. See: # https://github.com/kubernetes/kubernetes/pull/109541 ENABLE_STORAGE_GCE_PD_DRIVER=yes go generate -mod vendor ./test/extended # Update mirror mapping from upstream to quay # By default, "openshift-tests images" lists images from external binaries. However, we force # this script to list images from built-in tests in order to avoid requiring an OCP release image. echo "# This file is generated by hack/update-generated.sh" > test/extended/util/image/zz_generated.txt QUAY_REPO="quay.io/openshift/community-e2e-images" OPENSHIFT_SKIP_EXTERNAL_TESTS=1 go run -mod vendor ./cmd/openshift-tests images --upstream --to-repository "$QUAY_REPO" | grep "$QUAY_REPO" >> test/extended/util/image/zz_generated.txt os::build::setup_env OUTPUT_PARENT=${OUTPUT_ROOT:-$OS_ROOT} # If you hit this, please reduce other tests instead of importing more if [[ "$( cat "${OUTPUT_PARENT}/test/extended/testdata/bindata.go" | wc -c )" -gt 2500000 ]]; then echo "error: extended bindata is $( cat "${OUTPUT_PARENT}/test/extended/testdata/bindata.go" | wc -c ) bytes, reduce the size of the import" 1>&2 exit 1 fi ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret"