From e822dba9c1bed9ca947eed9be24a0c26cef89cc7 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Fri, 24 May 2019 13:05:02 +0200 Subject: [PATCH] MPT basic: append config, don't hardcode network If a firewall blocks traffic over one network but not another, and the one happens to be the default pick of Cyclone, then the MPT basic tests won't work properly. With the recent changes to the configuration handling for supporting multiple sources of configuration, it makes far more sense to remove the hardcoded network interface selection in the test configurations and to append the test configuration file to the environment list rather than to replace it. Signed-off-by: Erik Boasson --- src/mpt/tests/basic/etc/config_any.xml | 1 - src/mpt/tests/basic/etc/config_specific.xml | 1 - src/mpt/tests/basic/helloworld.c | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mpt/tests/basic/etc/config_any.xml b/src/mpt/tests/basic/etc/config_any.xml index 71b410f..275eb4b 100644 --- a/src/mpt/tests/basic/etc/config_any.xml +++ b/src/mpt/tests/basic/etc/config_any.xml @@ -14,7 +14,6 @@ any - auto true true diff --git a/src/mpt/tests/basic/etc/config_specific.xml b/src/mpt/tests/basic/etc/config_specific.xml index c6ccf33..0532aa0 100644 --- a/src/mpt/tests/basic/etc/config_specific.xml +++ b/src/mpt/tests/basic/etc/config_specific.xml @@ -14,7 +14,6 @@ ${DOMAIN_ID} - auto true true diff --git a/src/mpt/tests/basic/helloworld.c b/src/mpt/tests/basic/helloworld.c index c959edb..934262a 100644 --- a/src/mpt/tests/basic/helloworld.c +++ b/src/mpt/tests/basic/helloworld.c @@ -13,13 +13,13 @@ /* Environments */ static mpt_env_t environment_any[] = { { "ETC_DIR", MPT_SOURCE_ROOT_DIR"/tests/basic/etc" }, - { "CYCLONEDDS_URI", "file://${ETC_DIR}/config_any.xml" }, + { "CYCLONEDDS_URI", "${CYCLONEDDS_URI},file://${ETC_DIR}/config_any.xml" }, { NULL, NULL } }; static mpt_env_t environment_42[] = { { "ETC_DIR", MPT_SOURCE_ROOT_DIR"/tests/basic/etc" }, { "DOMAIN_ID", "42" }, - { "CYCLONEDDS_URI", "file://${ETC_DIR}/config_specific.xml" }, + { "CYCLONEDDS_URI", "${CYCLONEDDS_URI},file://${ETC_DIR}/config_specific.xml" }, { NULL, NULL } };