zephyr/tests/ztest/fail/testcase.yaml
Yuval Peress ba9b4f3734 ztest: Fix confusing SKIP log
When CONFIG_ZTEST_FAIL_ON_ASSUME is set, a failed assumption will
cause the suite to fail, but the individual test will be marked as
SKIPPED. We should fail the test so it's clear what's going on.

Fixes #86611

Signed-off-by: Yuval Peress <peress@google.com>
2025-04-04 21:16:34 +02:00

76 lines
2.2 KiB
YAML

# Copyright (c) 2022 Google LLC
# SPDX-License-Identifier: Apache-2.0
common:
tags:
- test_framework
# test has dependencies on host libc
platform_allow:
- unit_testing
- native_sim
- native_sim/native/64
integration_platforms:
- native_sim
tests:
testing.fail.unit.assert_after:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSERT_AFTER=y
testing.fail.unit.assert_teardown:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSERT_TEARDOWN=y
testing.fail.unit.assume_after:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_AFTER=y
testing.fail.unit.assume_teardown:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_TEARDOWN=y
testing.fail.unit.pass_after:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_PASS_AFTER=y
testing.fail.unit.pass_teardown:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_PASS_TEARDOWN=y
testing.fail.zephyr.assert_after:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSERT_AFTER=y
testing.fail.zephyr.assert_teardown:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSERT_TEARDOWN=y
testing.fail.zephyr.assume_after.fail:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_AFTER=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=y
testing.fail.zephyr.assume_teardown.fail:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_TEARDOWN=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=y
testing.fail.zephyr.assume_after.skip:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_AFTER=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=n
testing.fail.zephyr.assume_teardown.skip:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_ASSUME_TEARDOWN=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=n
testing.fail.zephyr.pass_after:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_PASS_AFTER=y
testing.fail.zephyr.pass_teardown:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_PASS_TEARDOWN=y
testing.fail.unit.fail_on_bad_assumption:
type: unit
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_UNEXPECTED_ASSUME=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=y
testing.fail.zephyr.fail_on_bad_assumption:
extra_configs:
- CONFIG_ZTEST_FAIL_TEST_UNEXPECTED_ASSUME=y
- CONFIG_ZTEST_FAIL_ON_ASSUME=y