From db24ba3854ce41ee78b0fcf07a35cc5f7b265583 Mon Sep 17 00:00:00 2001 From: mmusich Date: Sun, 17 Nov 2024 17:10:18 +0100 Subject: [PATCH] clearer printout of the outpus in test_unitSubmitPVsplit --- .../scripts/submitPVResolutionJobs.py | 4 +++- .../testingScripts/test_unitSubmitPVsplit.sh | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Alignment/OfflineValidation/scripts/submitPVResolutionJobs.py b/Alignment/OfflineValidation/scripts/submitPVResolutionJobs.py index e5b8653d5c3f0..34e6565964bba 100755 --- a/Alignment/OfflineValidation/scripts/submitPVResolutionJobs.py +++ b/Alignment/OfflineValidation/scripts/submitPVResolutionJobs.py @@ -210,7 +210,9 @@ def batchScriptCERN(theCMSSW_BASE, cfgdir, runindex, eosdir, lumiToRun, key, con cd $LXBATCH_DIR cp -pr {CFGDIR}/PrimaryVertexResolution_{KEY}_{runindex}_cfg.py . cmsRun PrimaryVertexResolution_{KEY}_{runindex}_cfg.py TrackCollection={TRKS} GlobalTag={GT} lumi={LUMITORUN} {REC} {EXT} >& log_{KEY}_run{runindex}.out -ls -lh . +# Print the contents of the current directory using $PWD and echo +echo "Contents of the current directory ($PWD):" +echo "$(ls -lh "$PWD")" """.format(CMSSW_BASE_DIR=theCMSSW_BASE, CFGDIR=cfgdir, runindex=runindex, diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh index aaced2fc5aac2..405a21cad34b1 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh @@ -30,5 +30,17 @@ cd "${testdir}/testExecution" || exit 1 # Execute the script and handle errors $PWD/"${scriptName}" || die "Failure running PVSplit script" $? -# Dump to screen the content of the log file -cat log*.out +# Dump to screen the content of the log file(s) with clear headers +log_files=(log*.out) +if [[ ${#log_files[@]} -gt 0 ]]; then + echo "Displaying content of log files:" + for log_file in "${log_files[@]}"; do + echo "========================================" + echo "Content of $log_file:" + echo "========================================" + cat "$log_file" + echo # Add an extra blank line for separation + done +else + echo "No log files found matching 'log*.out'." +fi