Skip to content

Commit cf0fdff

Browse files
committed
tests UPDATE ignore yang files in build
1 parent f26304d commit cf0fdff

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/utests/basic/test_context.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ test_set_priv_parsed(void **state)
999999
ly_ctx_destroy(UTEST_LYCTX);
10001000
const char *feats[] = {"f1", NULL};
10011001

1002-
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_SET_PRIV_PARSED, &UTEST_LYCTX));
1002+
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD | LY_CTX_SET_PRIV_PARSED, &UTEST_LYCTX));
10031003
assert_int_equal(LY_SUCCESS, ly_ctx_set_searchdir(UTEST_LYCTX, TESTS_DIR_MODULES_YANG));
10041004
assert_non_null(ly_ctx_load_module(UTEST_LYCTX, "ietf-restconf", "2017-01-26", NULL));
10051005
UTEST_ADD_MODULE(schema_a, LYS_IN_YANG, feats, NULL);
@@ -1075,7 +1075,7 @@ test_explicit_compile(void **state)
10751075
ly_ctx_destroy(UTEST_LYCTX);
10761076
const char *feats[] = {"f1", NULL};
10771077

1078-
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_EXPLICIT_COMPILE, &UTEST_LYCTX));
1078+
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD | LY_CTX_EXPLICIT_COMPILE, &UTEST_LYCTX));
10791079
UTEST_ADD_MODULE(schema_a, LYS_IN_YANG, NULL, &mod);
10801080
UTEST_ADD_MODULE(schema_b, LYS_IN_YANG, NULL, NULL);
10811081
UTEST_ADD_MODULE(schema_c, LYS_IN_YANG, NULL, NULL);

tests/utests/schema/test_schema.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ test_extension_argument(void **state)
14751475

14761476
/* context reset */
14771477
ly_ctx_destroy(UTEST_LYCTX);
1478-
ly_ctx_new(NULL, 0, &UTEST_LYCTX);
1478+
ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD, &UTEST_LYCTX);
14791479

14801480
/* from YIN */
14811481
ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, (void *)mod_def_yin);
@@ -1577,7 +1577,7 @@ test_extension_argument_element(void **state)
15771577

15781578
/* context reset */
15791579
ly_ctx_destroy(UTEST_LYCTX);
1580-
ly_ctx_new(NULL, 0, &UTEST_LYCTX);
1580+
ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD, &UTEST_LYCTX);
15811581

15821582
/* from YIN */
15831583
ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, (void *)mod_def_yin);
@@ -1849,7 +1849,7 @@ test_ext_recursive(void **state)
18491849

18501850
/* context reset */
18511851
ly_ctx_destroy(UTEST_LYCTX);
1852-
ly_ctx_new(NULL, 0, &UTEST_LYCTX);
1852+
ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD, &UTEST_LYCTX);
18531853

18541854
/* from YIN */
18551855
ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, (void *)mod_imp_yin);

tests/utests/utests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ utest_setup(void **state)
13161316
*state = current_utest_context;
13171317

13181318
/* libyang context */
1319-
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &current_utest_context->ctx));
1319+
assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, LY_CTX_DISABLE_SEARCHDIR_CWD, &current_utest_context->ctx));
13201320

13211321
/* backup timezone, if any */
13221322
cur_tz = getenv("TZ");

0 commit comments

Comments
 (0)