text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/val/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <limits.h> #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, tes...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/val/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
201
```yaml tests: san.ubsan: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/ubsan/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
55
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/ubsan/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { int k = INT_MAX; k += 256...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/ubsan/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
186
```yaml tests: san.lsan: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/lsan/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
54
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/lsan/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <limits.h> #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); int helper(void) { char *s = malloc(100); s[0] = '!'; s[1] = '\0'; printf("string is: %s\n", s); return 0; } /** ...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/lsan/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
221
```yaml tests: san.asan: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/asan/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
54
```python #!/usr/bin/env python3 # """ Blackbox tests for twister's command line functions """ import importlib import mock import os import pytest import sys import re from conftest import ( TEST_DATA, ZEPHYR_BASE, clear_log_in_test, sample_filename_mock, testsuite_filename_mock ) from twisterlib...
/content/code_sandbox/scripts/tests/twister_blackbox/test_printouts.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,369
```c /* * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <limits.h> #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); int *ptr; int helper(void) { char *s = malloc(10); strcpy(s, "123456789"); s[9] = '0'; free(s); strcpy(s, "Hello")...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/asan/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
235
```yaml tests: always_fail.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_build_error/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_build_error/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false") } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_build_error/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
79
```yaml tests: one_fail_two_error_one_pass.agnostic.group1.subgroup1: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup1/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
64
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup1/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/san/asan/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: one_fail_two_error_one_pass.agnostic.group1.subgroup3: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup3/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
64
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup1/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_2_tests, test_assert) { dummy zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup3/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
93
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup3/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup4/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_2_tests, test_assert) { dummy zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup4/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
93
```yaml tests: one_fail_two_error_one_pass.agnostic.group1.subgroup4: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup4/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
64
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup2/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: one_fail_two_error_one_pass.agnostic.group1.subgroup2: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup2/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
64
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_2_tests, test_assert) { zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_two_error_one_pass/agnostic/group1/subgroup2/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```yaml tests: sample.twister.pytest: platform_allow: - native_posix - native_sim harness: pytest harness_config: pytest_args: ["--custom-pytest-arg", "foo", "--cmdopt", "."] tags: - test_framework - pytest integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/pytest/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
78
```unknown CONFIG_ZTEST=y CONFIG_IDLE_STACK_SIZE=4096 ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/pytest/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
14
```python # import os import pytest # fixture cmdopt defined in conftest.py, it can be requested either in # tests or in other fixtures @pytest.fixture(autouse=True) def pytest_cmdopt_handle(cmdopt): ''' An auto fixture, all tests automatically request this fixture. Argument "cmdopt" is a fixture defined...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/pytest/pytest/test_sample.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
303
```python # import pytest # add option "--cmdopt" to pytest, or it will report "unknown option" # this option is passed from twister. def pytest_addoption(parser): parser.addoption( '--cmdopt' ) parser.addoption( '--custom-pytest-arg' ) # define fixture to return value of option "--cm...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/pytest/pytest/conftest.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
162
```yaml tests: platform_key.dummy: platform_allow: - qemu_x86 - qemu_x86_64 platform_key: - simulation ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/platform_key/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
35
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/platform_key/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/platform_key/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(test_pytest, NULL, NULL, NULL, NULL, NULL); ZTEST(test_pytest, test_pytest) { TC_PRINT("Hello world\n"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/pytest/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
50
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup1/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup1/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```yaml tests: one_fail_one_pass.agnostic.group1.subgroup1: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup1/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
62
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup2/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: one_fail_one_pass.agnostic.group1.subgroup2: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup2/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
62
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_2_tests, test_assert) { zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/one_fail_one_pass/agnostic/group1/subgroup2/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```yaml common: timeout: 10 tests: always_timeout.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_timeout/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
50
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_timeout/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: seed_native_sim.dummy: platform_allow: - native_sim integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/seed_native_sim/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
29
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { int i = 0; while (true) { i++; } } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_timeout/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
84
```unknown config FAKE_ENTROPY_NATIVE_POSIX default y source "Kconfig.zephyr" ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/seed_native_sim/dummy/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
23
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/seed_native_sim/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/seed_native_sim/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```yaml common: timeout: 10 tests: always_warning.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_warning/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
50
```c /* * */ #include <zephyr/ztest.h> #include <zephyr/logging/log.h> #define LOG_MODULE_NAME log_test LOG_MODULE_REGISTER(LOG_MODULE_NAME, LOG_LEVEL_INF); ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZT...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_warning/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
127
```unknown CONFIG_ZTEST=y CONFIG_TEST_LOGGING_DEFAULTS=y CONFIG_LOG=y CONFIG_LOG_OUTPUT=y CONFIG_LOG_BACKEND_UART=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_MAIN_STACK_SIZE=4096 ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_warning/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
44
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/params/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: params.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: params ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/params/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
46
```yaml tests: always_fail.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_fail/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_fail/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(0, "1 was false"); zassert_false(1, "0 was true"); } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/always_fail/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```yaml tests: always_overflow.dummy: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/qemu_overflow/dummy/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown &dram0 { reg = < 0x100000 DT_SIZE_M(1) >; }; ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/qemu_overflow/dummy/qemu_x86.overlay
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
23
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/qemu_overflow/dummy/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/qemu_overflow/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```yaml tests: dummy.device.group: platform_allow: intel_adl_crb integration_platforms: - intel_adl_crb tags: device ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
36
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(param_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(param_tests, test_assert1) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(N...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/params/dummy/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
328
```yaml tests: dummy.agnostic.group2: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: agnostic ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
49
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a2_tests, test_assert3) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL, "NULL was not NULL"); zassert_not_null("foo", "\"foo\"...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/src/submain.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
129
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a2_tests, test_assert1) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL, "...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group2/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
239
```yaml tests: dummy.agnostic.group1.subgroup1: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
59
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(d_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(d_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL, "NUL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/device/group/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
143
```yaml tests: dummy.agnostic.group1.subgroup2: build_only: true platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim tags: - agnostic - subgrouped ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
65
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_1_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_1_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup1/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```unknown CONFIG_ZTEST=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
6
```yaml tests: sample.pytest.shell: filter: CONFIG_SERIAL and dt_chosen_enabled("zephyr,shell-uart") min_ram: 40 harness: pytest extra_configs: - arch:posix:CONFIG_NATIVE_UART_0_ON_STDINOUT=y integration_platforms: - native_sim - qemu_cortex_m3 tags: - test_framework ...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/pytest/shell/test_sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
95
```unknown CONFIG_PRINTK=y CONFIG_SHELL=y CONFIG_LOG=y CONFIG_SHELL_BACKEND_SERIAL=y CONFIG_KERNEL_SHELL=y ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/pytest/shell/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
28
```python # import logging from twister_harness import Shell logger = logging.getLogger(__name__) def test_shell_print_help(shell: Shell): logger.info('send "help" command') lines = shell.exec_command('help') assert 'Available commands:' in lines, 'expected response not found' logger.info('response...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/pytest/shell/pytest/test_shell.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
131
```c /* * */ #include <zephyr/ztest.h> ZTEST_SUITE(a1_2_tests, NULL, NULL, NULL, NULL, NULL); /** * @brief Test Asserts * * This test verifies various assert macros provided by ztest. * */ ZTEST(a1_2_tests, test_assert) { zassert_true(1, "1 was false"); zassert_false(0, "0 was true"); zassert_is_null(NULL...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/tests/dummy/agnostic/group1/subgroup2/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
149
```yaml sample: description: Hello World sample, the simplest Zephyr application name: hello world common: tags: introduction integration_platforms: - native_sim harness: console harness_config: type: one_line regex: - "Hello World! (.*)" tests: sample.basic.helloworld: tags: int...
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/hello_world/test_sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
82
```unknown # nothing here ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/hello_world/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
5
```c /* * */ int main(void) { /* Shell application source code is injected by applied Kconfg SHELL * options, no more "extra" functionalities are required for exemplary * pytest test. */ return 0; } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/pytest/shell/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
52
```c /* * */ #include <stdio.h> int main(void) { printf("Hello World! %s\n", CONFIG_BOARD); return 0; } ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/samples/hello_world/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```yaml name: dummy_board vendor: others arch: unit identifier: dummy_board/dummy_soc ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/boards/others/dummy_board/dummy_board.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
22
```yaml board: name: dummy vendor: others socs: - name: dummy_soc ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/boards/others/dummy_board/board.yml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
24
```yaml tests: dummy.agnostic.group2.alt: platform_allow: - native_sim - qemu_x86 - qemu_x86_64 integration_platforms: - native_sim slow: true tags: - agnostic - alternate-config-root ```
/content/code_sandbox/scripts/tests/twister_blackbox/test_data/alt-test-configs/dummy/agnostic/group2/test_data.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
63
```python #!/usr/bin/env python3 # """tests for subfolder_list.py""" import os import sys import time sys.path.insert(0, os.path.join(os.environ["ZEPHYR_BASE"], "scripts")) import subfolder_list as iut # Implementation Under Test OUT_FILE = "out_file.txt" DIR_NAME_PREFIX = "dir-" def mkdirs(name_sfxs_range): ...
/content/code_sandbox/scripts/tests/build/test_subfolder_list.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
867
```python #!/usr/bin/env python3 # """ Tests for domains.py classes """ import mock import os import pytest import sys ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/build_helpers")) import domains from contextlib import nullcontext TESTDATA_1 = [ ('', False...
/content/code_sandbox/scripts/tests/build_helpers/test_domains.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,448
```python #!/usr/bin/env python3 # """ Tests for the mixins class """ import os import pytest def test_disable_pytest_test_collection(test_data): test_path = os.path.join(test_data, 'mixins') return_code = pytest.main([test_path]) assert return_code == 5 ```
/content/code_sandbox/scripts/tests/twister/test_mixins.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
65
```python #!/usr/bin/env python3 # """ Tests for scl.py functions """ import logging import mock import os import pytest import sys ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister")) import scl from contextlib import nullcontext from importlib import reload...
/content/code_sandbox/scripts/tests/twister/test_scl.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,786
```python #!/usr/bin/env python3 # """ Tests for log_helper.py functions """ import logging import mock import pytest from importlib import reload import twisterlib.log_helper TESTDATA = [ ('Windows', 'dummy message: [\'dummy\', \'command\', \'-flag\']'), ('Linux', 'dummy message: dummy command -flag'), ] ...
/content/code_sandbox/scripts/tests/twister/test_log_helper.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
204
```python #!/usr/bin/env python3 # ''' This test file contains tests for platform.py module of twister ''' import sys import os import mock import pytest ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister")) from twisterlib.platform import Platform TESTDATA_1...
/content/code_sandbox/scripts/tests/twister/test_platform.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
789
```python #!/usr/bin/env python3 # """ Tests for runner.py classes """ import errno import mock import os import pathlib import pytest import queue import re import subprocess import sys import yaml from contextlib import nullcontext from elftools.elf.sections import SymbolTableSection from typing import List ZEPHYR...
/content/code_sandbox/scripts/tests/twister/test_runner.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19,453
```python #!/usr/bin/env python3 # """ Tests for handlers.py classes' methods """ import itertools import mock import os import pytest import signal import subprocess import sys from contextlib import nullcontext from importlib import reload from serial import SerialException from subprocess import CalledProcessError...
/content/code_sandbox/scripts/tests/twister/test_handlers.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
14,663
```python #!/usr/bin/env python3 # """ Tests for environment.py classes' methods """ import mock import os import pytest import shutil from contextlib import nullcontext import twisterlib.environment TESTDATA_1 = [ ( None, None, None, ['--short-build-path', '-k'], '--sho...
/content/code_sandbox/scripts/tests/twister/test_environment.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
3,706
```python #!/usr/bin/env python3 # # pylint: disable=line-too-long """ Tests for testinstance class """ from contextlib import nullcontext import os import sys import pytest import mock ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister")) from twisterlib.statu...
/content/code_sandbox/scripts/tests/twister/test_testinstance.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
5,581
```python #!/usr/bin/env python3 """ This test file contains testsuites for the Harness classes of twister """ import mock import sys import os import pytest import re import logging as logger #ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") from conftest import ZEPHYR_BASE sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scrip...
/content/code_sandbox/scripts/tests/twister/test_harness.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
7,050
```python #!/usr/bin/env python3 # '''Common fixtures for use in testing the twister tool.''' import os import sys import pytest pytest_plugins = ["pytester"] ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister")) sys.path.insert(0, os.path.join(ZEPHYR_BASE, "s...
/content/code_sandbox/scripts/tests/twister/conftest.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
890
```python #!/usr/bin/env python3 # """ This test file contains foundational testcases for Twister tool """ import os import sys import pytest from pathlib import Path ZEPHYR_BASE = os.getenv("ZEPHYR_BASE") sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister")) import scl from twisterlib.error import...
/content/code_sandbox/scripts/tests/twister/test_twister.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
847
```python #!/usr/bin/env python3 # """ Tests for hardwaremap.py classes' methods """ import mock import pytest import sys from pathlib import Path from twisterlib.hardwaremap import( DUT, HardwareMap ) @pytest.fixture def mocked_hm(): duts = [ DUT(platform='p1', id=1, serial='s1', product='pr1'...
/content/code_sandbox/scripts/tests/twister/test_hardwaremap.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
5,059
```python #!/usr/bin/env python3 # """ Tests for quarantine.py classes' methods """ import mock import os import pytest import textwrap from twisterlib.quarantine import QuarantineException, \ QuarantineElement, \ QuarantineData TESTDATA_1 = [ ...
/content/code_sandbox/scripts/tests/twister/test_quarantine.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,395
```python #!/usr/bin/env python3 # """ Tests for cmakecache.py classes' methods """ import mock import pytest from contextlib import nullcontext from twisterlib.cmakecache import CMakeCacheEntry, CMakeCache TESTDATA_1 = [ ('ON', True), ('YES', True), ('TRUE', True), ('Y', True), ('OFF', False),...
/content/code_sandbox/scripts/tests/twister/test_cmakecache.py
python
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,780