|
57 | 57 | fi
|
58 | 58 | fi
|
59 | 59 |
|
60 |
| -dnf update -y |
61 | 60 | test_name="phoronix"
|
62 | 61 | GIT_VERSION="v10.8.1"
|
63 | 62 | if [ ! -f "/tmp/${test_name}.out" ]; then
|
|
77 | 76 | #
|
78 | 77 | tools_git=https://github.com/redhat-performance/test_tools-wrappers
|
79 | 78 |
|
80 |
| -# |
81 |
| -# Amazon linux is running the wrong version of php by default, install a version that phoronix likes |
82 |
| -# |
83 |
| -uname -a | grep -q amzn |
84 |
| -if [ $? -eq 0 ]; then |
85 |
| - # |
86 |
| - # Check to see if we need to remove the old php |
87 |
| - # |
88 |
| - yum list installed | grep -q php-cli.x86_64 |
89 |
| - if [ $? -eq 0 ]; then |
90 |
| - packages="php-cli.x86_64 php-common.x86_64 php-xml.x86_64" |
91 |
| - # |
92 |
| - # Remove and add the proper php |
93 |
| - # |
94 |
| - yum remove -y $packages |
95 |
| - if [ $? -ne 0 ]; then |
96 |
| - error_out "Failed to remove $packages" 1 |
97 |
| - fi |
98 |
| - fi |
99 |
| - packages="php73-cli.x86_64 php73-common.x86_64 php73-xml.x86_64" |
100 |
| - yum install -y $packages |
101 |
| - if [ $? -ne 0 ]; then |
102 |
| - error_out "Failed to install $packages" 1 |
103 |
| - fi |
104 |
| -fi |
105 | 79 |
|
106 | 80 | #
|
107 | 81 | # Clone the repo that contains the common code and tools
|
@@ -144,6 +118,35 @@ if [ $show_usage -eq 1 ]; then
|
144 | 118 | usage $0
|
145 | 119 | fi
|
146 | 120 |
|
| 121 | +test_tools/package_tool --update |
| 122 | +test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64 |
| 123 | +if [[ $? != "0" ]]; then |
| 124 | + # |
| 125 | + # Check to see if we need to remove the old php |
| 126 | + # |
| 127 | + test_tools/package_tool --is_installed php-cli.x86_64 |
| 128 | + if [ $? -eq 0 ]; then |
| 129 | + packages="php-cli.x86_64 php-common.x86_64 php-xml.x86_64" |
| 130 | + # |
| 131 | + # Remove and add the proper php |
| 132 | + # |
| 133 | + test_tools/package_tool --remove_packages $packages |
| 134 | + if [ $? -ne 0 ]; then |
| 135 | + error_out "Failed to remove $packages" 1 |
| 136 | + fi |
| 137 | + fi |
| 138 | + test_tools/package_tool --packages php73-cli.x86_64,php73-common.x86_64,php73-xml.x86_64 |
| 139 | + if [ $? -ne 0 ]; then |
| 140 | + # |
| 141 | + # Just to be difficult Amazon 2 uses even different packages. |
| 142 | + # |
| 143 | + test_tools/package_tool --packages git,php-cli,php-xml,php-json |
| 144 | + if [ $? -ne 0 ]; then |
| 145 | + error_out "Failed to install $packages" 1 |
| 146 | + fi |
| 147 | + fi |
| 148 | +fi |
| 149 | + |
147 | 150 | # Variables set by general setup.
|
148 | 151 | #
|
149 | 152 | # TOOLS_BIN: points to the tool directory
|
|
0 commit comments