soc: intel_s1000: add dummy sys_reboot() for test with XCC

XCC does not seem to handle if(IS_ENABLED()) well which means
XCC would not get rid of code even IS_ENABLED() is false.
In this case, sys_reboot() call in ztest is in this situation
so add a dummy version for ztest only.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-12-16 09:35:03 -08:00 committed by Johan Hedberg
commit 2a2351b58f
2 changed files with 17 additions and 0 deletions

View file

@ -3,3 +3,4 @@
zephyr_library_sources_ifdef(CONFIG_CPLUSPLUS cpp_fixes.c)
zephyr_library_sources_ifdef(CONFIG_NEWLIB_LIBC newlib_fixes.c)
zephyr_library_sources_ifdef(CONFIG_LOG_MINIMAL log_minimal_fixes.c)
zephyr_library_sources_ifdef(CONFIG_TEST ztest_fixes.c)

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2019, Intel Corporation.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <toolchain.h>
#ifndef CONFIG_ZTEST_RETEST_IF_PASSED
void sys_reboot(int type)
{
ARG_UNUSED(type);
}
#endif /* CONFIG_ZTEST_RETEST_IF_PASSED */