File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ PATH="${PATH}:/usr/local/bin"
44export PATH
55python_pkgs=" "
66python_exec=" "
7+ PYPERF_VERSION=1.0.4
78#
89# To make sure.
910#
@@ -16,6 +17,7 @@ exit_out()
1617usage ()
1718{
1819 echo " $1 Usage:"
20+ echo " --pyperf_version <vers number>: Versionof pyperf to run, default is $PYPERF_VERSION ."
1921 echo " --python_exec_path: Python to set via alternatives"
2022 echo " --python_pkgs: comma seprated list of python packages to install"
2123 source test_tools/general_setup --usage
198200source test_tools/general_setup " $@ "
199201
200202ARGUMENT_LIST=(
203+ " pyperf_version"
201204 " python_exec"
202205 " python_pkgs"
203206)
@@ -219,6 +222,10 @@ eval set --$opts
219222
220223while [[ $# -gt 0 ]]; do
221224 case " $1 " in
225+ --pyperf_version)
226+ PYPERF_VERSION=$2
227+ shift 2
228+ ;;
222229 --python_exec)
223230 python_exec=$2
224231 shift 2
@@ -245,15 +252,11 @@ done
245252
246253if [ $to_pbench -eq 0 ]; then
247254 rm -rf pyperformance
248- git clone https://github.com/python/ pyperformance
255+ python3 -m pip install pyperformance== $PYPERF_VERSION
249256 if [ $? -ne 0 ]; then
250- exit_out " Cloning of https://github.com/python/ pyperformance failed. " 1
257+ exit_out " python3 -m pip install pyperformance== $PYPERF_VERSION : failed" 1
251258 fi
252259 cd pyperformance
253- git checkout tags/1.0.4
254- if [ $? -ne 0 ]; then
255- exit_out " Checkout of 1.0.4 failed." 1
256- fi
257260 if [[ ${python_pkgs} != " " ]]; then
258261 pkg_list=` echo $python_pkgs | sed " s/,/ /g" `
259262 test_tools/package_install --packages " $python_pkgs " --no_packages $to_no_pkg_install
You can’t perform that action at this time.
0 commit comments