[PSM Interop] used fixed names like latest, oldest to maintain history (#33794)

Co-authored-by: Sergii Tkachenko <hi@sergii.org>
pull/32701/head^2
sanjaypujare 2 years ago committed by GitHub
parent 3e2acbd947
commit 04a7b80e98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      tools/internal_ci/linux/grpc_xds_k8s_run_xtest.sh
  2. 8
      tools/internal_ci/linux/grpc_xds_k8s_xbranch.sh
  3. 4
      tools/internal_ci/linux/grpc_xds_k8s_xlang.sh

@ -64,8 +64,8 @@ find_oldest_branch() {
# Test xUnit report to ${TEST_XML_OUTPUT_DIR}/${test_name}/sponge_log.xml
#######################################
run_test() {
if [ "$#" -ne 4 ]; then
echo "Usage: run_test client_lang client_branch server_lang server_branch" >&2
if [ "$#" -ne 6 ]; then
echo "Usage: run_test client_lang client_branch server_lang server_branch cl-branch-fixed srv-branch-fixed" >&2
exit 1
fi
# Test driver usage:
@ -74,6 +74,8 @@ run_test() {
local client_branch="$2"
local server_lang="$3"
local server_branch="$4"
local client_branch_fixed="$5"
local server_branch_fixed="$6"
local server_image_name="${IMAGE_REPO}/${server_lang}-server"
local client_image_name="${IMAGE_REPO}/${client_lang}-client"
@ -87,9 +89,10 @@ run_test() {
local server_image_name_tag="${server_image_name}:${server_branch}"
local client_image_name_tag="${client_image_name}:${client_branch}"
local out_dir="${TEST_XML_OUTPUT_DIR}/${client_branch}-${server_branch}/${client_lang}-${server_lang}"
local out_dir="${TEST_XML_OUTPUT_DIR}/${client_branch_fixed}-${server_branch_fixed}/${client_lang}-${server_lang}"
mkdir -pv "${out_dir}"
set -x
echo "Client branch='${client_branch}', Server branch='${server_branch}'" > ${out_dir}/sponge_log.log
python -m "tests.security_test" \
--flagfile="${TEST_DRIVER_FLAGFILE}" \
--kube_context="${KUBE_CONTEXT}" \
@ -101,5 +104,5 @@ run_test() {
--collect_app_logs \
--log_dir="${out_dir}" \
--xml_output_file="${out_dir}/sponge_log.xml" \
|& tee "${out_dir}/sponge_log.log"
|& tee -a "${out_dir}/sponge_log.log"
}

@ -75,25 +75,25 @@ main() {
# Run cross branch tests per language: master x latest and master x oldest
for LANG in ${LANGS}
do
if run_test "${LANG}" "${MAIN_BRANCH}" "${LANG}" "${LATEST_BRANCH}"; then
if run_test "${LANG}" "${MAIN_BRANCH}" "${LANG}" "${LATEST_BRANCH}" "${MAIN_BRANCH}" "latest"; then
successful_string="${successful_string} ${MAIN_BRANCH}-${LATEST_BRANCH}/${LANG}"
else
failed_tests=$((failed_tests + 1))
failed_string="${failed_string} ${MAIN_BRANCH}-${LATEST_BRANCH}/${LANG}"
fi
if run_test "${LANG}" "${LATEST_BRANCH}" "${LANG}" "${MAIN_BRANCH}"; then
if run_test "${LANG}" "${LATEST_BRANCH}" "${LANG}" "${MAIN_BRANCH}" "latest" "${MAIN_BRANCH}"; then
successful_string="${successful_string} ${LATEST_BRANCH}-${MAIN_BRANCH}/${LANG}"
else
failed_tests=$((failed_tests + 1))
failed_string="${failed_string} ${LATEST_BRANCH}-${MAIN_BRANCH}/${LANG}"
fi
if run_test "${LANG}" "${MAIN_BRANCH}" "${LANG}" "${OLDEST_BRANCH}"; then
if run_test "${LANG}" "${MAIN_BRANCH}" "${LANG}" "${OLDEST_BRANCH}" "${MAIN_BRANCH}" "oldest"; then
successful_string="${successful_string} ${MAIN_BRANCH}-${OLDEST_BRANCH}/${LANG}"
else
failed_tests=$((failed_tests + 1))
failed_string="${failed_string} ${MAIN_BRANCH}-${OLDEST_BRANCH}/${LANG}"
fi
if run_test "${LANG}" "${OLDEST_BRANCH}" "${LANG}" "${MAIN_BRANCH}"; then
if run_test "${LANG}" "${OLDEST_BRANCH}" "${LANG}" "${MAIN_BRANCH}" "oldest" "${MAIN_BRANCH}"; then
successful_string="${successful_string} ${OLDEST_BRANCH}-${MAIN_BRANCH}/${LANG}"
else
failed_tests=$((failed_tests + 1))

@ -75,6 +75,7 @@ main() {
OLDEST_BRANCH=$(find_oldest_branch "${OLDEST_BRANCH}" "${LATEST_BRANCH}")
# Run cross lang tests: for given cross lang versions
XLANG_VERSIONS="${MAIN_BRANCH} ${LATEST_BRANCH} ${OLDEST_BRANCH}"
declare -A FIXED_VERSION_NAMES=( ["${MAIN_BRANCH}"]="${MAIN_BRANCH}" ["${LATEST_BRANCH}"]="latest" ["${OLDEST_BRANCH}"]="oldest")
for VERSION in ${XLANG_VERSIONS}
do
for CLIENT_LANG in ${CLIENT_LANGS}
@ -82,7 +83,8 @@ main() {
for SERVER_LANG in ${SERVER_LANGS}
do
if [ "${CLIENT_LANG}" != "${SERVER_LANG}" ]; then
if run_test "${CLIENT_LANG}" "${VERSION}" "${SERVER_LANG}" "${VERSION}"; then
FIXED="${FIXED_VERSION_NAMES[${VERSION}]}"
if run_test "${CLIENT_LANG}" "${VERSION}" "${SERVER_LANG}" "${VERSION}" "${FIXED}" "${FIXED}"; then
successful_string="${successful_string} ${VERSION}/${CLIENT_LANG}-${SERVER_LANG}"
else
failed_tests=$((failed_tests+1))

Loading…
Cancel
Save