Merging upstream version 3.12.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
6375ddbe5b
commit
580fa3f55c
66 changed files with 4041 additions and 2142 deletions
|
@ -161,7 +161,8 @@ struct utest_context {
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief Compare two lyd_node structure. Macro print lyd_node structure into string and then compare string. Print function use these two parameters. LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK;
|
||||
* @brief Compare two lyd_node structure. Macro print lyd_node structure into string and then compare string.
|
||||
*
|
||||
* @param[in] NODE_1 pointer to lyd_node
|
||||
* @param[in] NODE_2 pointer to lyd_node
|
||||
*/
|
||||
|
@ -169,8 +170,8 @@ struct utest_context {
|
|||
{ \
|
||||
char *str1; \
|
||||
char *str2; \
|
||||
assert_int_equal(LY_SUCCESS, lyd_print_mem(&str1, NODE_1, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK)); \
|
||||
assert_int_equal(LY_SUCCESS, lyd_print_mem(&str2, NODE_2, LYD_XML, LYD_PRINT_WITHSIBLINGS | LYD_PRINT_SHRINK)); \
|
||||
assert_int_equal(LY_SUCCESS, lyd_print_mem(&str1, NODE_1, LYD_XML, LYD_PRINT_WITHSIBLINGS)); \
|
||||
assert_int_equal(LY_SUCCESS, lyd_print_mem(&str2, NODE_2, LYD_XML, LYD_PRINT_WITHSIBLINGS)); \
|
||||
assert_non_null(str1); \
|
||||
assert_non_null(str2); \
|
||||
assert_string_equal(str1, str2); \
|
||||
|
@ -1315,7 +1316,7 @@ utest_setup(void **state)
|
|||
*state = current_utest_context;
|
||||
|
||||
/* libyang context */
|
||||
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, ¤t_utest_context->ctx));
|
||||
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD, ¤t_utest_context->ctx));
|
||||
|
||||
/* backup timezone, if any */
|
||||
cur_tz = getenv("TZ");
|
||||
|
@ -1325,6 +1326,8 @@ utest_setup(void **state)
|
|||
|
||||
/* set CET */
|
||||
setenv("TZ", "CET+02:00", 1);
|
||||
/* call tzset explicitly, to update the tzname, timezone and daylight global variables */
|
||||
tzset();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue