tests: kernel: workq: inhibit warnings on tests of deprecated API

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>
This commit is contained in:
Peter Bigot 2021-04-07 12:54:40 -05:00 committed by Kumar Gala
commit 353aa8757b
2 changed files with 18 additions and 0 deletions

View file

@ -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)

View file

@ -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>