bug-fix: do not have permission to execute sudo pip 75/45175/1
authorYang Yu <Gabriel.yuyang@huawei.com>
Mon, 16 Oct 2017 04:31:52 +0000 (12:31 +0800)
committerYang Yu <Gabriel.yuyang@huawei.com>
Mon, 16 Oct 2017 04:34:07 +0000 (12:34 +0800)
JIRA: BOTTLENECK-211

This patch is to fix the bug by adding -H flag to sudo, i.e.,
sudo -H pip install ...

Change-Id: Ie31f435e341ae9fe8f8e084696e8e1b7a05888d3
Signed-off-by: Yang Yu <Gabriel.yuyang@huawei.com>
jjb/bottlenecks/bottlenecks-run-suite.sh

index c349062..0e325e1 100644 (file)
@@ -77,8 +77,8 @@ if [[ $SUITE_NAME == *posca* ]]; then
     cd ${RELENG_REPO}/modules
     sudo virtualenv venv
     source venv/bin/activate
-    sudo pip install -e ./ >/dev/null
-    sudo pip install netaddr
+    sudo -H pip install -e ./ >/dev/null
+    sudo -H pip install netaddr
 
     if [[ ${INSTALLER_TYPE} == compass ]]; then
         options="-u root -p root"