From 2236f1d3e23b8752c15dd582493878886335350a Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Thu, 1 Dec 2022 01:07:51 +0100 Subject: [PATCH] rename PR short name dirs to long names to match the baseline --- pr_testing/run-pr-comparisons | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pr_testing/run-pr-comparisons b/pr_testing/run-pr-comparisons index bf9e23c5f148..291aec554e2a 100755 --- a/pr_testing/run-pr-comparisons +++ b/pr_testing/run-pr-comparisons @@ -115,22 +115,14 @@ if ! grep 'stepList=stepList' $CMSSW_RELEASE_BASE/${MATRIX_READER} >/dev/null 2> #PR tests might have latest short name changes if grep 'stepList=stepList' $CMSSW_BASE/${MATRIX_READER} >/dev/null 2>&1 ; then #PR tests generated short relval names change - #Create long to short symlinks for root & logs files and update mapping file - mv $WORKSPACE/data/$COMPARISON_RELEASE $WORKSPACE/data/${COMPARISON_RELEASE}-long - cp $WORKSPACE/$MAPPING_FILE $WORKSPACE/$MAPPING_FILE.orig - mkdir $WORKSPACE/data/${COMPARISON_RELEASE} - for wf_dir in $(ls $WORKSPACE/data/${COMPARISON_RELEASE}-long) ; do - if [ ! -e $WORKSPACE/data/${COMPARISON_RELEASE}-long/${wf_dir}/cmdLog ] ; then - ln -sf ../${COMPARISON_RELEASE}-long/${wf_dir} $WORKSPACE/data/${COMPARISON_RELEASE}/${wf_dir} - continue - fi + #Move PR short names to long names and rename log fils + for wf_dir in $(ls $WORKSPACE/data/PR-${PR_NUM}) ; do + [ ! -e $WORKSPACE/data/PR-${PR_NUM}/${wf_dir}/cmdLog ] || continue wf=$(echo $wf_dir | cut -d_ -f1) - long_name=$(echo $wf_dir | cut -d_ -f2-) - short_name=$(ls -d $WORKSPACE/data/PR-${PR_NUM}/${wf}_*/cmdLog | sed "s|.*/${wf}_||;s|/cmdLog||") - [ "${short_name}" = "" ] && exit 1 - nwf_dir="${wf}_${short_name}" - ln -sf ../${COMPARISON_RELEASE}-long/${wf_dir} $WORKSPACE/data/${COMPARISON_RELEASE}/${nwf_dir} - sed -i -e "s|${wf_dir}/|${nwf_dir}/|" $WORKSPACE/$MAPPING_FILE + short_name=$(echo $wf_dir | cut -d_ -f2-) + long_name=$(ls -d $WORKSPACE/data/$COMPARISON_RELEASE/${wf}_*/cmdLog | sed "s|.*/${wf}_||;s|/cmdLog||") + nwf_dir="${wf}_${long_name}" + mv $WORKSPACE/data/PR-${PR_NUM}/${wf_dir} $WORKSPACE/data/PR-${PR_NUM}/${nwf_dir} #create symlinks for log files for log in $(ls $WORKSPACE/data/PR-${PR_NUM}/${nwf_dir}/step*_${short_name}.log) ; do mv $log $WORKSPACE/data/PR-${PR_NUM}/${nwf_dir}/$(basename $log | cut -d_ -f1)_${long_name}.log