summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautomated/bin/setenv.sh8
-rw-r--r--automated/utils/requirements.txt2
-rwxr-xr-xautomated/utils/test-runner.py12
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.