From ba49e2c543492a8b30fb83651dde61f65b292332 Mon Sep 17 00:00:00 2001 From: Dmitry Pyzhov Date: Fri, 16 Nov 2012 16:57:52 +0400 Subject: [PATCH] Fix clean-integration-test target --- test/integration/__init__.py | 8 +++----- test/integration_test.py | 7 ++----- test/module.mk | 14 ++++---------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/test/integration/__init__.py b/test/integration/__init__.py index aab8fb4652..cb9b338692 100644 --- a/test/integration/__init__.py +++ b/test/integration/__init__.py @@ -16,8 +16,7 @@ class Ci(object): installation_timeout = 1800 deployment_timeout = 1800 - def __init__(self, cache_file=None, iso=None, forward='nat'): - self.environment_cache_file = cache_file + def __init__(self, iso=None, forward='nat'): self.iso = iso self.environment = None self.forward = forward @@ -26,9 +25,8 @@ class Ci(object): logger.info("Successfully loaded existing environment") except Exception, e: logger.info( - "Failed to load existing integration environment: %s\n%s", - str(e), - traceback.format_exc() + "Failed to load existing integration environment: %s", + str(e) ) pass diff --git a/test/integration_test.py b/test/integration_test.py index 88d15cd525..f102fe615c 100644 --- a/test/integration_test.py +++ b/test/integration_test.py @@ -26,8 +26,6 @@ def main(): "ERROR" ], default="ERROR", metavar="LEVEL") - parser.add_argument('--cache-file', dest='cache_file', type=str, - help='file to store integration environment name') parser.add_argument('--no-forward-network', dest='no_forward_network', action="store_true", default=False, help='do not forward environment netork') @@ -55,11 +53,10 @@ def main(): suite = integration # todo fix default values - ci = suite.Ci(params.cache_file, params.iso) if params.no_forward_network: - ci = suite.Ci(params.cache_file, params.iso, forward=None) + ci = suite.Ci(params.iso, forward=None) else: - ci = suite.Ci(params.cache_file, params.iso) + ci = suite.Ci(params.iso) if not params.deployment_timeout is None: ci.deployment_timeout = params.deployment_timeout diff --git a/test/module.mk b/test/module.mk index 57445310a4..61923c86ad 100644 --- a/test/module.mk +++ b/test/module.mk @@ -25,20 +25,14 @@ clean: clean-integration-test .PHONY: test-integration test-integration: $/environment-id-integration - python test/integration_test.py -l $(LEVEL) --installation-timeout=$(INSTALLATION_TIMEOUT) --deployment-timeout=$(DEPLOYMENT_TIMEOUT) --cache-file $(abspath $<) --iso $(abspath $(iso.path)) test $(NOSEARGS) + python test/integration_test.py -l $(LEVEL) --installation-timeout=$(INSTALLATION_TIMEOUT) --deployment-timeout=$(DEPLOYMENT_TIMEOUT) --iso $(abspath $(iso.path)) test $(NOSEARGS) $/environment-id-integration: | $(iso.path) @mkdir -p $(@D) - python test/integration_test.py -l $(LEVEL) --cache-file $(abspath $@) destroy - python test/integration_test.py -l $(LEVEL) $(NOFORWARD_CLI_ARG) --cache-file $(abspath $@) --iso $(abspath $(iso.path)) setup + python test/integration_test.py -l $(LEVEL) destroy + python test/integration_test.py -l $(LEVEL) $(NOFORWARD_CLI_ARG) --iso $(abspath $(iso.path)) setup .PHONY: clean-integration-test clean-integration-test: /:=$/ clean-integration-test: - test -f $/environment-id-integration.candidate && \ - python test/integration_test.py -l $(LEVEL) --cache-file $(abspath $/environment-id-integration.candidate) destroy || true - test -f $/environment-id-integration && \ - python test/integration_test.py -l $(LEVEL) --cache-file $(abspath $/environment-id-integration) destroy || true - - - + python test/integration_test.py -l $(LEVEL) destroy