Skip to content

Commit

Permalink
Change relative paths to absolute
Browse files Browse the repository at this point in the history
Fixes test cases:
Sysbench test in VMs on LenovoX1
Sysbench test in NetVM

Signed-off-by: Samuli Leivo <[email protected]>
  • Loading branch information
leivos-unikie committed Dec 20, 2024
1 parent 0931d49 commit eab6735
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Sysbench test in NetVM
[Tags] SP-T61-8 nuc orin-agx orin-nx
Transfer Sysbench Test Script To NetVM
${output} Execute Command ./sysbench_test 1 sudo=True sudo_password=${PASSWORD}
${output} Execute Command /tmp/sysbench_test 1 sudo=True sudo_password=${PASSWORD}

&{threads} Create Dictionary net-vm=1
Save sysbench results net-vm _1thread
Expand Down Expand Up @@ -279,7 +279,7 @@ Sysbench test in NetVM
Sysbench test in VMs on LenovoX1
[Documentation] Run CPU and Memory benchmark using Sysbench in Virtual Machines
... for 1 thread and MULTIPLE threads if there are more than 1 thread in VM.
[Tags] SP-T61-9
[Tags] SP-T61-9 lenovo-x1
&{threads} Create Dictionary net-vm=1
... gui-vm=2
... gala-vm=2
Expand Down Expand Up @@ -393,7 +393,7 @@ Transfer Sysbench Test Script To VM
Save cpu results
[Arguments] ${test}=cpu ${host}=ghaf_host

${output} Execute Command cat sysbench_results/${test}_report
${output} Execute Command cat /tmp/sysbench_results/${test}_report
Log ${output}
&{data} Parse Cpu Results ${output}
&{statistics} Save Cpu Data ${host}_${TEST NAME}_${test} ${data}
Expand All @@ -409,7 +409,7 @@ Save cpu results
Save memory results
[Arguments] ${test}=memory_read ${host}=ghaf_host

${output} Execute Command cat sysbench_results/${test}_report
${output} Execute Command cat /tmp/sysbench_results/${test}_report
Log ${output}
&{data} Parse Memory Results ${output}
&{statistics} Save Memory Data ${host}_${TEST NAME}_${test} ${data}
Expand Down
24 changes: 12 additions & 12 deletions Robot-Framework/test-suites/performance-tests/sysbench_test
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
THREADS="$1"

# Create a directory for the results with a timestamp
RESULT_DIR="sysbench_results"
RESULT_DIR="/tmp/sysbench_results"
echo -e "\nCreating directory for test results:"
echo "./$RESULT_DIR"
echo "$RESULT_DIR"
mkdir -p $RESULT_DIR

# Copy this test script file itself into the result directory
FileName=${0##*/}
cp ${FileName} ./$RESULT_DIR
cp ${FileName} $RESULT_DIR

# Create test_info file with information about the run environment: lscpu, free, df
echo -e "\nSaving information about test environment to ./$RESULT_DIR/test_info\n"
echo -e "$(lscpu)" "\n\n" "$(free)" "\n\n" "$(df)" "\n\n" >> ./$RESULT_DIR/test_info
echo -e "\nSaving information about test environment to $RESULT_DIR/test_info\n"
echo -e "$(lscpu)" "\n\n" "$(free)" "\n\n" "$(df)" "\n\n" >> $RESULT_DIR/test_info

echo -e "\nHost: $(hostname)\n" | tee -a ./$RESULT_DIR/test_info
echo -e "\nHost: $(hostname)\n" | tee -a $RESULT_DIR/test_info

# cpu tests
echo -e "\nRunning CPU tests...\n"
sysbench cpu --time=10 --threads=1 --cpu-max-prime=20000 run | tee ./$RESULT_DIR/cpu_1thread_report
sysbench cpu --time=10 --threads=1 --cpu-max-prime=20000 run | tee $RESULT_DIR/cpu_1thread_report
if [ $THREADS -gt 1 ]
then
sysbench cpu --time=10 --threads=${THREADS} --cpu-max-prime=20000 run | tee ./$RESULT_DIR/cpu_report
sysbench cpu --time=10 --threads=${THREADS} --cpu-max-prime=20000 run | tee $RESULT_DIR/cpu_report
fi

# memory tests
echo -e "\nRunning memory tests...\n"
sysbench memory --time=60 --memory-oper=read --threads=1 run | tee ./$RESULT_DIR/memory_read_1thread_report
sysbench memory --time=60 --memory-oper=write --threads=1 run | tee ./$RESULT_DIR/memory_write_1thread_report
sysbench memory --time=60 --memory-oper=read --threads=1 run | tee $RESULT_DIR/memory_read_1thread_report
sysbench memory --time=60 --memory-oper=write --threads=1 run | tee $RESULT_DIR/memory_write_1thread_report
if [ $THREADS -gt 1 ]
then
sysbench memory --time=15 --memory-oper=read --threads=${THREADS} run | tee ./$RESULT_DIR/memory_read_report
sysbench memory --time=30 --memory-oper=write --threads=${THREADS} run | tee ./$RESULT_DIR/memory_write_report
sysbench memory --time=15 --memory-oper=read --threads=${THREADS} run | tee $RESULT_DIR/memory_read_report
sysbench memory --time=30 --memory-oper=write --threads=${THREADS} run | tee $RESULT_DIR/memory_write_report
fi

echo -e "\nTest finished.\n"

0 comments on commit eab6735

Please sign in to comment.