diff options
author | 2020-05-20 02:07:39 -0700 | |
---|---|---|
committer | 2020-05-20 02:07:39 -0700 | |
commit | 50975a2d401f79a57f4a72cd6fa1b0591bf64d81 (patch) | |
tree | 185484159e42fccba3592d8e254d4f7ad95ad6bf /test/mocks/mass-pnf-sim/setup.sh | |
parent | 5717b5ee81cedfb3c1361cad6683cf585c90ae31 (diff) |
Create setuptools based Python env setup for the scripts
Change-Id: I00095182de5532c28fd7d9605de2d9c8b29f6c1c
Issue-ID: INT-1577
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks/mass-pnf-sim/setup.sh')
-rwxr-xr-x | test/mocks/mass-pnf-sim/setup.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/mocks/mass-pnf-sim/setup.sh b/test/mocks/mass-pnf-sim/setup.sh index 2c941361f..34481df1f 100755 --- a/test/mocks/mass-pnf-sim/setup.sh +++ b/test/mocks/mass-pnf-sim/setup.sh @@ -1,13 +1,10 @@ #!/bin/bash -virtualenv --version > /dev/null || { echo 'Virtualenv command is not available, exiting' ; sleep 10; exit 1; } -pip3 --version > /dev/null || { echo 'python3-pip package is not available, exiting' ; sleep 10; exit 1; } +# Setup runtime environment for the Python scripts +virtualenv --version > /dev/null 2>&1 || { echo 'Virtualenv command is not available, exiting'; exit 1; } +pip3 --version > /dev/null 2>&1 || { echo 'python3-pip package is not available, exiting' ; exit 1; } +tox --version > /dev/null 2>&1 || { echo 'tox command is not available, exiting' ; exit 1; } -if [ -d ".env" ]; then - echo ".env is prepared" -else - virtualenv -p python3 .env -fi - -source .env/bin/activate && pip3 install -r requirements.txt +tox -e MassPnfSim-runtime +echo -e "\n\nNow run:\nsource .tox/MassPnfSim-runtime/bin/activate" |