Fix clean-integration-test target
This commit is contained in:
parent
462447495c
commit
ba49e2c543
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user