1 /* 2 * Copyright 2021 Google LLC 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/ztest.h> 8 9 #ifdef CONFIG_ZTEST_RULE_1CPU one_cpu_rule_before_each(const struct ztest_unit_test * test,void * data)10static void one_cpu_rule_before_each(const struct ztest_unit_test *test, void *data) 11 { 12 ARG_UNUSED(test); 13 ARG_UNUSED(data); 14 z_test_1cpu_start(); 15 } one_cpu_rule_after_each(const struct ztest_unit_test * test,void * data)16static void one_cpu_rule_after_each(const struct ztest_unit_test *test, void *data) 17 { 18 ARG_UNUSED(test); 19 ARG_UNUSED(data); 20 z_test_1cpu_stop(); 21 } 22 ZTEST_RULE(one_cpu, one_cpu_rule_before_each, one_cpu_rule_after_each); 23 #endif /* CONFIG_ZTEST_RULE_1CPU */ 24