diff options
author | Jan Gelety <jgelety@cisco.com> | 2016-09-13 15:16:13 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2016-09-20 03:12:45 +0000 |
commit | 56a9ea7e421100594d8be68c0ff15236f5c50a6e (patch) | |
tree | 01cd08834697dd385ad3f2afca095c554a6b6acd /resources/libraries/python/SetupFramework.py | |
parent | 6dfe17cc81d1534398b655d22475a3a4b806ed45 (diff) |
CSIT-360: Parallel test sets run
- use parallel test set runs on as many VIRL sessions as needed
for defined test sets
Change-Id: I7640f15894a1451aba963989fab4dc838f2ab6d8
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/SetupFramework.py')
-rw-r--r-- | resources/libraries/python/SetupFramework.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/resources/libraries/python/SetupFramework.py b/resources/libraries/python/SetupFramework.py index 570a2baf4b..d035317006 100644 --- a/resources/libraries/python/SetupFramework.py +++ b/resources/libraries/python/SetupFramework.py @@ -21,6 +21,7 @@ from subprocess import Popen, PIPE, call from multiprocessing import Pool from tempfile import NamedTemporaryFile from os.path import basename +from os import environ from robot.api import logger from robot.libraries.BuiltIn import BuiltIn @@ -35,7 +36,16 @@ __all__ = ["SetupFramework"] def pack_framework_dir(): """Pack the testing WS into temp file, return its name.""" - tmpfile = NamedTemporaryFile(suffix=".tgz", prefix="openvpp-testing-") + try: + directory = environ["TMPDIR"] + except Keyerror: + directory = None + + if directory is not None: + tmpfile = NamedTemporaryFile(suffix=".tgz", prefix="openvpp-testing-",\ + dir="{0}".format(directory)) + else: + tmpfile = NamedTemporaryFile(suffix=".tgz", prefix="openvpp-testing-") file_name = tmpfile.name tmpfile.close() |