Skip to content

Commit

Permalink
Tests: Add testcase for CONFIG_THINGSET_TEXT_MODE=n
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjaeger committed May 1, 2024
1 parent 5310e56 commit 0e4bb5e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/protocol/src/txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,16 @@ ZTEST(thingset_txt, test_import_record)
records[1].b = true;
}

static bool thingset_txt_predicate(const void *global_state)
{
return IS_ENABLED(CONFIG_THINGSET_TEXT_MODE);
}

static void *thingset_setup(void)
{
thingset_init_global(&ts);

return NULL;
}

ZTEST_SUITE(thingset_txt, NULL, thingset_setup, NULL, NULL, NULL);
ZTEST_SUITE(thingset_txt, thingset_txt_predicate, thingset_setup, NULL, NULL, NULL);
7 changes: 7 additions & 0 deletions tests/protocol/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ tests:
- native_posix
- native_posix_64
extra_args: EXTRA_CFLAGS=-Werror
thingset.protocol.text_mode_disabled:
integration_platforms:
- native_posix
- native_posix_64
extra_args: EXTRA_CFLAGS=-Werror
extra_configs:
- CONFIG_THINGSET_TEXT_MODE=n
thingset.protocol.objectlookup:
integration_platforms:
- native_posix
Expand Down

0 comments on commit 0e4bb5e

Please sign in to comment.