Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 45 additions & 13 deletions passmark/passmark_run
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ usage()
echo " --cpu_add n: add n cpus each iteration until hit max cpus"
echo " --powers_2: starting from 1 cpu, keep doubling the cpus until max cpus"
source ${TOOLS_BIN}/general_setup --usage
exit 1
exit $E_USAGE
}

produce_report()
Expand Down Expand Up @@ -174,6 +174,40 @@ produce_report()
echo Checksum: Not applicable for summary file >> $summary_file
}

attempt_tools_wget()
{
if [[ ! -d "$TOOLS_BIN" ]]; then
wget ${tools_git}/archive/refs/heads/main.zip
if [[ $? -eq 0 ]]; then
unzip -q main.zip
mv test_tools-wrappers-main ${TOOLS_BIN}
rm main.zip
fi
fi
}

attempt_tools_curl()
{
if [[ ! -d "$TOOLS_BIN" ]]; then
curl -L -O ${tools_git}/archive/refs/heads/main.zip
if [[ $? -eq 0 ]]; then
unzip -q main.zip
mv test_tools-wrappers-main ${TOOLS_BIN}
rm main.zip
fi
fi
}

attempt_tools_git()
{
if [[ ! -d "$TOOLS_BIN" ]]; then
git clone $tools_git "$TOOLS_BIN"
if [ $? -ne 0 ]; then
exit_out "Error: pulling git $tools_git failed." 101
fi
fi
}

install_tools()
{
pushd $curdir > /dev/null
Expand Down Expand Up @@ -208,12 +242,10 @@ install_tools()
#
TOOLS_BIN=${HOME}/test_tools
export TOOLS_BIN
if [ ! -d "${TOOLS_BIN}" ]; then
git clone $tools_git ${TOOLS_BIN}
if [ $? -ne 0 ]; then
exit_out "pulling git $tools_git failed." 1
fi
fi

attempt_tools_wget
attempt_tools_curl
attempt_tools_git

if [ $show_usage -eq 1 ]; then
usage $1
Expand All @@ -228,7 +260,7 @@ run_passmark()
if [[ $arch == "aarch64" ]]; then
unzip /$to_home_root/$to_user/uploads/pt_linux_arm64.zip
if [ $? -ne 0 ]; then
exit_out "pt_linux_arm64.zip failed" 1
exit_out "pt_linux_arm64.zip failed" $E_GENERAL
fi
#
# Ubuntu check
Expand All @@ -242,7 +274,7 @@ run_passmark()
else
unzip /$to_home_root/$to_user/uploads/pt_linux_x64.zip
if [ $? -ne 0 ]; then
exit_out "pt_linux_x64.zip failed" 1
exit_out "pt_linux_x64.zip failed" $E_GENERAL
fi
fi
fi
Expand All @@ -261,14 +293,14 @@ run_passmark()
#
# Give up.
#
exit_out "/usr/lib64/libncurses.so.6 not present" 1
exit_out "/usr/lib64/libncurses.so.6 not present" $E_GENERAL
fi
if [[ -f "libncurses.so.6" ]]; then
ln -s libncurses.so.6 libncurses.so.5
else
lib=`find . -print | grep 'libncurses.so.6$'`
if [[ $? -ne 0 ]]; then
exit_out "libncurses.so.6 not present" 1
exit_out "libncurses.so.6 not present" $E_GENERAL
fi
fi
fi
Expand Down Expand Up @@ -303,12 +335,12 @@ run_passmark()
if [[ $arch == "aarch64" ]]; then
./pt_linux_arm64 -r 3 >> ${test_name}_${iter}.out
if [ $? -ne 0 ]; then
exit_out "Execution of ./pt_linux_arm64 failed" 1
exit_out "Execution of ./pt_linux_arm64 failed" $E_GENERAL
fi
else
./pt_linux_x64 -r 3 >> ${test_name}_${iter}.out
if [ $? -ne 0 ]; then
exit_out "Execution of ./pt_linux_x64 failed" 1
exit_out "Execution of ./pt_linux_x64 failed" $E_GENERAL
fi
fi
end_time=$(retrieve_time_stamp)
Expand Down
Loading