Skip to content

Commit 7c39549

Browse files
committed
[DNM] Testing a new approach for Tempest timing data
1 parent 140b9fe commit 7c39549

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

container-images/tcib/base/os/tempest/run_tempest.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ TEMPEST_ARGS=""
9797
TEMPEST_DEBUG_MODE="${TEMPEST_DEBUG_MODE:-false}"
9898
TEMPEST_CLEANUP="${TEMPEST_CLEANUP:-false}"
9999

100+
TEMPEST_STESTR="$HOMEDIR/openshift/.stestr"
101+
STESTR_REPO_URL="https://gitlab.cee.redhat.com/kstrenko/tempest-stestr-data.git"
102+
STESTR_REPO_DIR="components-integration/component-cinder-edpm-rhel9-rhoso18.0-crc-nfs/tempest-tests-tempest"
103+
100104
function catch_error_if_debug {
101105
echo "File run_tempest.sh has run into an error!"
102106
sleep infinity
@@ -291,6 +295,11 @@ function upload_extra_images {
291295
done
292296
}
293297

298+
function pull_timing_data {
299+
git clone ${STESTR_REPO_URL} ${HOMEDIR}/stestr-repo
300+
FULL_PATH=${HOMEDIR}/stestr-repo/${STESTR_REPO_DIR}
301+
cp -rf ${FULL_PATH}/* ${TEMPEST_STESTR}
302+
}
294303

295304
# This function ensures all arguments are handled properly:
296305
# - Embedded quotes are preserved, e.g. "Some string"
@@ -366,6 +375,8 @@ function run_git_tempest {
366375

367376
mkdir -p ${TEMPEST_LOGS_DIR}
368377

378+
pull_timing_data
379+
369380
discover_tempest_config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
370381
&& tempest run ${TEMPEST_ARGS}
371382
RETURN_VALUE=$?
@@ -414,6 +425,8 @@ function run_rpm_tempest {
414425

415426
mkdir -p ${TEMPEST_LOGS_DIR}
416427

428+
pull_timing_data
429+
417430
discover_tempest_config ${TEMPESTCONF_ARGS} ${TEMPESTCONF_OVERRIDES} \
418431
&& tempest run ${TEMPEST_ARGS}
419432
RETURN_VALUE=$?
@@ -457,6 +470,21 @@ function generate_test_results {
457470
popd
458471
}
459472

473+
function push_timing_data {
474+
git clone --branch main ${STESTR_REPO_URL} ${HOMEDIR}/stestr-repo
475+
FULL_PATH=${HOMEDIR}/stestr-repo/${STESTR_REPO_DIR}
476+
mkdir -p ${FULL_PATH}
477+
cp -r ${TEMPEST_STESTR}/* ${FULL_PATH}
478+
479+
git config --global user.email "[email protected]"
480+
git config --global user.name "Dummy"
481+
482+
cd ${HOMEDIR}/stestr-repo
483+
git add ${STESTR_REPO_DIR}
484+
git commit -m "Test update ${STESTR_REPO_DIR}."
485+
git push origin main
486+
}
487+
460488
export OS_CLOUD=default
461489

462490
if [ ! -z ${USE_EXTERNAL_FILES} ] && [ -e ${TEMPEST_PATH}clouds.yaml ]; then
@@ -494,6 +522,8 @@ fi
494522

495523
generate_test_results
496524

525+
push_timing_data
526+
497527
# Keep pod in running state when in debug mode
498528
if [ ${TEMPEST_DEBUG_MODE} == true ]; then
499529
sleep infinity

0 commit comments

Comments
 (0)