Updated Geekbench tests to use license file, if present

This commit is contained in:
Mason Rowe 2020-09-09 21:32:25 -04:00
parent 6d46cb0d8b
commit eca5dc9fd3

22
yabs.sh
View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Yet Another Bench Script by Mason Rowe # Yet Another Bench Script by Mason Rowe
# Initial Oct 2019; Last update Aug 2020 # Initial Oct 2019; Last update Sept 2020
# #
# Disclaimer: This project is a work in progress. Any errors or suggestions should be # Disclaimer: This project is a work in progress. Any errors or suggestions should be
# relayed to me via the GitHub project page linked below. # relayed to me via the GitHub project page linked below.
@ -15,7 +15,7 @@
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
echo -e '# Yet-Another-Bench-Script #' echo -e '# Yet-Another-Bench-Script #'
echo -e '# v2020-08-09 #' echo -e '# v2020-09-09 #'
echo -e '# https://github.com/masonr/yet-another-bench-script #' echo -e '# https://github.com/masonr/yet-another-bench-script #'
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
@ -562,19 +562,19 @@ function launch_geekbench {
if [[ "$ARCH" == *"x86"* ]]; then if [[ "$ARCH" == *"x86"* ]]; then
# check if geekbench file exists # check if geekbench file exists
if test -f "geekbench.license"; then if test -f "geekbench.license"; then
$GEEKBENCH_PATH/geekbench_x86_32 --unlock "`cat geekbench.license` 2>/dev/null $GEEKBENCH_PATH/geekbench_x86_32 --unlock `cat geekbench.license` > /dev/null 2>&1
fi fi
# run the Geekbench 4 test and grep the test results URL given at the end of the test # run the Geekbench 4 test and grep the test results URL given at the end of the test
GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 2>/dev/null | grep "https://browser") GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench_x86_32 --upload 2>/dev/null | grep "https://browser")
else else
# check if geekbench file exists # check if geekbench file exists
if test -f "geekbench.license"; then if test -f "geekbench.license"; then
$GEEKBENCH_PATH/geekbench4 --unlock "`cat geekbench.license` 2>/dev/null $GEEKBENCH_PATH/geekbench4 --unlock `cat geekbench.license` > /dev/null 2>&1
fi fi
# run the Geekbench 4 test and grep the test results URL given at the end of the test # run the Geekbench 4 test and grep the test results URL given at the end of the test
GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 2>/dev/null | grep "https://browser") GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 --upload 2>/dev/null | grep "https://browser")
fi fi
fi fi
@ -589,10 +589,10 @@ function launch_geekbench {
# check if geekbench file exists # check if geekbench file exists
if test -f "geekbench.license"; then if test -f "geekbench.license"; then
$GEEKBENCH_PATH/geekbench5 --unlock "`cat geekbench.license` 2>/dev/null $GEEKBENCH_PATH/geekbench5 --unlock `cat geekbench.license` > /dev/null 2>&1
fi fi
GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 2>/dev/null | grep "https://browser") GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench5 --upload 2>/dev/null | grep "https://browser")
fi fi
fi fi
@ -614,9 +614,9 @@ function launch_geekbench {
sleep 20 sleep 20
# parse the public results page for the single and multi core geekbench scores # parse the public results page for the single and multi core geekbench scores
[[ $VERSION == *5* ]] && GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "div class='score'") || [[ $VERSION == *5* ]] && GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "div class='score'") ||
GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "class='score' rowspan") GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "span class='score'")
GEEKBENCH_SCORES_SINGLE=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $3 }') GEEKBENCH_SCORES_SINGLE=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $3 }')
GEEKBENCH_SCORES_MULTI=$(echo $GEEKBENCH_SCORES | awk -v FS="(<|>)" '{ print $7 }') GEEKBENCH_SCORES_MULTI=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $7 }')
# print the Geekbench results # print the Geekbench results
echo -en "\r\033[0K" echo -en "\r\033[0K"