Keep the manifest filename the same instead of overwriting the manifest.json in test setup directory.
Also pass the actual manifest file name in the context of the test container as a test container argument during the test container spawn.
Change-Id: I4783c661c487baf18a2e3e18e0151481716b99d0
diff --git a/src/test/setup/cord-test.py b/src/test/setup/cord-test.py
index 3d0843c..487280f 100755
--- a/src/test/setup/cord-test.py
+++ b/src/test/setup/cord-test.py
@@ -432,7 +432,8 @@
if args.manifest:
if os.access(args.manifest, os.F_OK):
##copy it to setup directory
- dest = os.path.join(CordTester.tester_base, 'manifest.json')
+ dest = os.path.join(CordTester.tester_base,
+ os.path.basename(args.manifest))
if os.path.abspath(args.manifest) != dest:
try:
shutil.copy(args.manifest, dest)
@@ -584,7 +585,6 @@
'CORD_TEST_PORT' : test_port,
'ONOS_RESTART' : 0 if test_manifest.olt and args.test_controller else 1,
'LOG_LEVEL': test_manifest.log_level,
- 'MANIFEST': int(use_manifest),
'HEAD_NODE': head_node if head_node else CORD_TEST_HOST,
'MAAS_API_KEY': maas_api_key,
'KARAF_VERSION' : test_manifest.karaf_version
@@ -597,6 +597,10 @@
olt_conf_test_loc = os.path.join(CordTester.sandbox_setup, 'olt_config.json')
test_cnt_env['OLT_CONFIG'] = olt_conf_test_loc
+ if use_manifest:
+ test_cnt_env['MANIFEST'] = os.path.join(CordTester.sandbox_setup,
+ os.path.basename(args.manifest))
+
if iterations is not None:
test_cnt_env['ITERATIONS'] = iterations
@@ -697,7 +701,8 @@
if args.manifest:
if os.access(args.manifest, os.F_OK):
##copy it to setup directory
- dest = os.path.join(CordTester.tester_base, 'manifest.json')
+ dest = os.path.join(CordTester.tester_base,
+ os.path.basename(args.manifest))
if os.path.abspath(args.manifest) != dest:
try:
shutil.copy(args.manifest, dest)
@@ -847,7 +852,6 @@
'CORD_TEST_PORT' : port,
'ONOS_RESTART' : 0 if test_manifest.olt and args.test_controller else 1,
'LOG_LEVEL': test_manifest.log_level,
- 'MANIFEST': int(use_manifest),
'HEAD_NODE': head_node if head_node else CORD_TEST_HOST,
'MAAS_API_KEY': maas_api_key,
'KARAF_VERSION' : test_manifest.karaf_version
@@ -860,6 +864,9 @@
test_cnt_env['OLT_CONFIG'] = olt_conf_test_loc
if test_manifest.iterations is not None:
test_cnt_env['ITERATIONS'] = iterations
+ if use_manifest:
+ test_cnt_env['MANIFEST'] = os.path.join(CordTester.sandbox_setup,
+ os.path.basename(args.manifest))
test_cnt = CordTester((),
ctlr_ip = ctlr_addr,
image = nose_cnt['image'],