diff options
author | Chase Qi <chase.qi@linaro.org> | 2016-08-29 19:34:01 +0800 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2016-09-02 08:40:13 +0000 |
commit | faf7d2820ef33bb47d81ec9bccd19353188bfdb5 (patch) | |
tree | 55a551913e89f8eeac231f61c4cebfddf1268d96 | |
parent | d805476cd80076ab2da02962b1f964748efd27bd (diff) |
v2: test-runner: handle 3rd party python modules
Change-Id: I0a7b460cc891f2c4a927b11940699fde221d87e4
Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-x | automated/bin/setenv.sh | 8 | ||||
-rw-r--r-- | automated/utils/requirements.txt | 2 | ||||
-rwxr-xr-x | automated/utils/test-runner.py | 12 |
3 files changed, 17 insertions, 5 deletions
diff --git a/automated/bin/setenv.sh b/automated/bin/setenv.sh index 1449fc6..a11f6aa 100755 --- a/automated/bin/setenv.sh +++ b/automated/bin/setenv.sh @@ -1,6 +1,7 @@ -#!/bin/sh +#!/bin/sh -eu -export REPO_PATH="$(pwd)" +REPO_PATH="$(pwd)" +export REPO_PATH echo "REPO_PATH: ${REPO_PATH}" if ! [ -d "${REPO_PATH}/automated/bin" ]; then @@ -9,5 +10,6 @@ if ! [ -d "${REPO_PATH}/automated/bin" ]; then exit 1 fi -export PATH="${REPO_PATH}/automated/bin":"${PATH}" +PATH="${REPO_PATH}/automated/bin:${PATH}" +export PATH echo "BIN_PATH: ${PATH}" diff --git a/automated/utils/requirements.txt b/automated/utils/requirements.txt new file mode 100644 index 0000000..867cb6f --- /dev/null +++ b/automated/utils/requirements.txt @@ -0,0 +1,2 @@ +pexpect +pyyaml diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py index 5e58add..5ebd3bb 100755 --- a/automated/utils/test-runner.py +++ b/automated/utils/test-runner.py @@ -4,15 +4,23 @@ import csv import json import logging import os -import pexpect import re import shutil import sys import time -import yaml from uuid import uuid4 +try: + import pexpect + import yaml +except ImportError as e: + print(e) + print('Please run the below command to install modules required') + print('pip install -r ${REPO_PATH}/automated/utils/requirements.txt') + sys.exit(1) + + class TestPlan(object): """ Analysis args specified, then generate test plan. |