Skip to content

Commit

Permalink
lib UPDATE test setup using the lib function
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed May 21, 2024
1 parent 62458ea commit 7cf58b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/np2_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ np2_glob_test_setup_server(void **state, const char *test_name, const char **mod
int fd;
#endif

#ifdef NETOPEER2_LIB
/* lib setup function */
if (np2_sr_setup(NULL, NULL, 0600)) {
SETUP_FAIL_LOG;
return 1;
}
#else
/* sysrepo environment variables must be set by NP_GLOB_SETUP_ENV_FUNC prior to install modules */
if (setenv("NP2_MODULE_DIR", NP_ROOT_DIR "/modules", 1)) {
SETUP_FAIL_LOG;
Expand Down Expand Up @@ -176,6 +183,7 @@ np2_glob_test_setup_server(void **state, const char *test_name, const char **mod
SETUP_FAIL_LOG;
return 1;
}
#endif

if (setenv("CMOCKA_TEST_ABORT", "1", 0)) {
SETUP_FAIL_LOG;
Expand Down

0 comments on commit 7cf58b7

Please sign in to comment.