From 04a66a165c4a53a2dc5708d7730a12ff1af8d3aa Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Mon, 15 Dec 2014 12:33:57 +0100 Subject: [PATCH] Fix lpconfig test on read-only storage --- tester/setup_tester.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tester/setup_tester.c b/tester/setup_tester.c index 21fcfd091..63a8616d5 100644 --- a/tester/setup_tester.c +++ b/tester/setup_tester.c @@ -132,7 +132,9 @@ static void linphone_lpconfig_from_file_zerolen_value(){ char* rc_path = ms_strdup_printf("%s/rcfiles/%s", liblinphone_tester_file_prefix, zero_rc_file); LpConfig* conf; - conf = lp_config_new(rc_path); + /* not using lp_config_new() because it expects a readable file, and iOS (for instance) + stores the app bundle in read-only */ + conf = lp_config_new_with_factory(NULL, rc_path); CU_ASSERT_STRING_EQUAL(lp_config_get_string(conf,"test","zero_len","LOL"),"LOL"); CU_ASSERT_STRING_EQUAL(lp_config_get_string(conf,"test","non_zero_len",""),"test");