diff --git a/phoronix/run_phoronix.sh b/phoronix/run_phoronix.sh index 182a707..d046834 100755 --- a/phoronix/run_phoronix.sh +++ b/phoronix/run_phoronix.sh @@ -57,7 +57,6 @@ else fi fi -dnf update -y test_name="phoronix" GIT_VERSION="v10.8.1" if [ ! -f "/tmp/${test_name}.out" ]; then @@ -77,31 +76,6 @@ fi # tools_git=https://github.com/redhat-performance/test_tools-wrappers -# -# Amazon linux is running the wrong version of php by default, install a version that phoronix likes -# -uname -a | grep -q amzn -if [ $? -eq 0 ]; then - # - # Check to see if we need to remove the old php - # - yum list installed | grep -q php-cli.x86_64 - if [ $? -eq 0 ]; then - packages="php-cli.x86_64 php-common.x86_64 php-xml.x86_64" - # - # Remove and add the proper php - # - yum remove -y $packages - if [ $? -ne 0 ]; then - error_out "Failed to remove $packages" 1 - fi - fi - packages="php73-cli.x86_64 php73-common.x86_64 php73-xml.x86_64" - yum install -y $packages - if [ $? -ne 0 ]; then - error_out "Failed to install $packages" 1 - fi -fi # # Clone the repo that contains the common code and tools @@ -144,6 +118,35 @@ if [ $show_usage -eq 1 ]; then usage $0 fi +test_tools/package_tool --update +test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64 +if [[ $? != "0" ]]; then + # + # Check to see if we need to remove the old php + # + test_tools/package_tool --is_installed php-cli.x86_64 + if [ $? -eq 0 ]; then + packages="php-cli.x86_64 php-common.x86_64 php-xml.x86_64" + # + # Remove and add the proper php + # + test_tools/package_tool --remove_packages $packages + if [ $? -ne 0 ]; then + error_out "Failed to remove $packages" 1 + fi + fi + test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64 + if [ $? -ne 0 ]; then + # + # Just to be difficult Amazon 2 uses even different packages. + # + test_tools/package_tool --packages git,php-cli,php-xml,php-json + if [ $? -ne 0 ]; then + error_out "Failed to install $packages" 1 + fi + fi +fi + # Variables set by general setup. # # TOOLS_BIN: points to the tool directory