Skip to content

Commit 489ad99

Browse files
authored
Merge pull request #19 from redhat-performance/package_option
Update packaging so it can be turned off.
2 parents 442ed5d + b3d0090 commit 489ad99

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

pyperf/pyperf_run

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,30 @@ generate_csv_file()
111111

112112
pkg_install()
113113
{
114-
if [ $ubuntu -eq 0 ]; then
115-
apt install -y $1
116-
if [ $? -ne 0 ]; then
117-
exit_out "apt install of $1 failed" 1
118-
fi
119-
else
120-
dnf install -y $1
121-
if [ $? -ne 0 ]; then
122-
exit_out "dnf install of $1 failed" 1
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
123125
fi
124126
fi
125127
}
126128

127129
pip3_install()
128130
{
129-
pip3 install $1
130-
if [ $? -ne 0 ]; then
131-
exit_out "pip3 install of $1 failed." 1
131+
if [ to_no_pkg_install -eq 0 ]; then
132+
pip3 install $1
133+
if [ $? -ne 0 ]; then
134+
exit_out "pip3 install of $1 failed." 1
135+
fi
132136
fi
133137
}
134-
135138
#
136139
# Variables set by general setup.
137140
#

0 commit comments

Comments
 (0)