Skip to content

Commit 7658b52

Browse files
authored
Merge pull request #20 from redhat-performance/package
Update packaging.
2 parents 489ad99 + 5e51e61 commit 7658b52

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

pyperf/pyperf_run

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
PATH="${PATH}:/usr/local/bin"
44
export PATH
55
python_pkgs=""
6-
test_tools/detect_os | grep Ubuntu > /dev/null
7-
ubuntu=$?
86
python_exec=""
97
#
108
# To make sure.
@@ -109,26 +107,9 @@ generate_csv_file()
109107
printf "%s:%12.2f:%s\n" $test_name $results $unit >> ${1}.csv
110108
}
111109

112-
pkg_install()
113-
{
114-
if [ to_no_pkg_install -eq 0 ]; then
115-
if [ $ubuntu -eq 0 ]; then
116-
apt install -y $1
117-
if [ $? -ne 0 ]; then
118-
exit_out "apt install of $1 failed" 1
119-
fi
120-
else
121-
dnf install -y $1
122-
if [ $? -ne 0 ]; then
123-
exit_out "dnf install of $1 failed" 1
124-
fi
125-
fi
126-
fi
127-
}
128-
129110
pip3_install()
130111
{
131-
if [ to_no_pkg_install -eq 0 ]; then
112+
if [ $to_no_pkg_install -eq 0 ]; then
132113
pip3 install $1
133114
if [ $? -ne 0 ]; then
134115
exit_out "pip3 install of $1 failed." 1
@@ -270,10 +251,7 @@ if [ $to_pbench -eq 0 ]; then
270251
fi
271252
if [[ ${python_pkgs} != "" ]]; then
272253
pkg_list=`echo $python_pkgs | sed "s/,/ /g"`
273-
echo pkg_list $pkg_list >>/tmp/dave
274-
for i in $pkg_list; do
275-
pkg_install $i
276-
done
254+
test_tools/package_install --packages "$python_pkgs" --no_packages $to_no_pkg_install
277255
fi
278256
if [[ $python_exec != "" ]]; then
279257
if [[ ! -f $python_exec ]]; then

0 commit comments

Comments
 (0)