Skip to content

Commit 9876bf3

Browse files
authored
Merge pull request #24 from redhat-performance/move_rdirs
Move results dir
2 parents 759b033 + 70ceb70 commit 9876bf3

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

pyperf/pyperf_run

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ if [ $to_pbench -eq 0 ]; then
293293
python3 -m pyperf dump ${pyresults}.json > ${pyresults}.results
294294
if [ $? -ne 0 ]; then
295295
echo "Failed: python3 -m pyperf dump ${pyresults}.json > ${pyresults}.results" 1
296+
echo Failed > test_results_report
297+
else
298+
echo Ran > test_results_report
296299
fi
297300
generate_csv_file ${pyresults}
298301
else
@@ -314,27 +317,7 @@ if [ $to_pbench -eq 1 ]; then
314317
results_prefix=$to_puser"_instance_"$to_configuration
315318
dir=`ls -rtd /var/lib/pbench-agent/pyperf* | tail -1`
316319
cd $dir
317-
echo $dir > /tmp/pbench_debug
318320
else
319-
RESULTSDIR=results_${test_name_run}_${to_tuned_setting}_$(date "+%Y.%m.%d-%H.%M.%S")
320-
mkdir /tmp/${RESULTSDIR}
321-
cp python_results/* /tmp/${RESULTSDIR}
322-
cd /tmp
323-
rm results_${test_name_run}_${to_tuned_setting}
324-
ln -s ${RESULTSDIR} results_${test_name_run}_${to_tuned_setting}
325-
mv ${test_name_run}_*.out ${RESULTSDIR}
326-
lines=`wc -l ${RESULTSDIR}/*.csv | cut -d' ' -f1`
327-
if [ $? -ne 0 ]; then
328-
echo Failed >> ${RESULTSDIR}/test_results_report
329-
else
330-
echo Ran >> ${RESULTSDIR}/test_results_report
331-
fi
332-
cp /tmp/pyperf.out ${RESULTSDIR}
333-
cp ${curdir}/meta_data*.yml ${RESULTSDIR}
334-
${curdir}/test_tools/move_data $curdir ${RESULTSDIR}
335-
rm -f results_pbench.tar
336-
working_dir=`ls -rtd /tmp/results*${test_name}* | grep -v tar | tail -1`
337-
find $working_dir -type f | tar --transform 's/.*\///g' -cf results_pbench.tar --files-from=/dev/stdin
338-
tar hcf results_${test_name_run}_${to_tuned_setting}.tar results_${test_name_run}_${to_tuned_setting}
321+
${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --results /tmp/pyperf.out --test_name pyperf --tuned_setting=$to_tuned_setting --version NONE --user $to_user --other_files "python_results/*,test_results_report"
339322
fi
340323
exit 0

0 commit comments

Comments
 (0)