Skip to content

Commit

Permalink
tests: kernel: workq: inhibit warnings on tests of deprecated API
Browse files Browse the repository at this point in the history
Legacy k_work API has been marked deprecated, but it is still present
in tree and should be tested.  Avoid CI warnings by disabling warnings
on use of deprecated API within the test source files.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
  • Loading branch information
pabigot authored and galak committed May 7, 2021
1 parent 0c607ad commit 353aa87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/kernel/workq/work/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
* SPDX-License-Identifier: Apache-2.0
*/

/* This test covers deprecated API. Avoid inappropriate diagnostics
* about the use of that API.
*/
#include <toolchain.h>
#undef __deprecated
#define __deprecated
#undef __DEPRECATED_MACRO
#define __DEPRECATED_MACRO

#include <ztest.h>

#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACKSIZE)
Expand Down
9 changes: 9 additions & 0 deletions tests/kernel/workq/work_queue/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

#include <stdbool.h>

/* This test covers deprecated API. Avoid inappropriate diagnostics
* about the use of that API.
*/
#include <toolchain.h>
#undef __deprecated
#define __deprecated
#undef __DEPRECATED_MACRO
#define __DEPRECATED_MACRO

#include <zephyr.h>
#include <ztest.h>
#include <tc_util.h>
Expand Down

0 comments on commit 353aa87

Please sign in to comment.