Add mechanism to set configure flags from test case

Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/32fc37c1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/32fc37c1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/32fc37c1

Branch: refs/heads/master
Commit: 32fc37c16d6b3cf1a3aefa5231803e3d8a868d78
Parents: 8ec6630
Author: Thomas Jackson <[email protected]>
Authored: Tue Dec 23 16:50:43 2014 -0800
Committer: Thomas Jackson <[email protected]>
Committed: Tue Dec 23 16:50:43 2014 -0800

----------------------------------------------------------------------
 tsqa/test_cases.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/32fc37c1/tsqa/test_cases.py
----------------------------------------------------------------------
diff --git a/tsqa/test_cases.py b/tsqa/test_cases.py
index 72f9633..d7ba75a 100644
--- a/tsqa/test_cases.py
+++ b/tsqa/test_cases.py
@@ -16,6 +16,10 @@ class EnvironmentCase(unittest.TestCase):
     '''
     This class will get an environment (which is unique) but won't start it
     '''
+    # TODO: better naming??
+    environment_factory = {'configure': None,
+                           'env': None,
+                           }
     @classmethod
     def setUpClass(cls):
         # call parent constructor
@@ -48,7 +52,7 @@ class EnvironmentCase(unittest.TestCase):
         SOURCE_DIR = os.getenv('TSQA_SRC_DIR', '~/trafficserver')
         TMP_DIR = os.getenv('TSQA_TMP_DIR','/tmp/tsqa')
         ef = tsqa.environment.EnvironmentFactory(SOURCE_DIR, 
os.path.join(TMP_DIR, 'base_envs'))
-        return ef.get_environment()
+        return ef.get_environment(cls.environment_factory['configure'], 
cls.environment_factory['env'])
 
     @classmethod
     def setUpEnv(cls, env):

Reply via email to