diff options
Diffstat (limited to 'protocols/service/test_runner/packed-c/test_result.h')
-rw-r--r-- | protocols/service/test_runner/packed-c/test_result.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/protocols/service/test_runner/packed-c/test_result.h b/protocols/service/test_runner/packed-c/test_result.h new file mode 100644 index 000000000..888d2ece1 --- /dev/null +++ b/protocols/service/test_runner/packed-c/test_result.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef TS_TEST_RUNNER_TEST_RESULT +#define TS_TEST_RUNNER_TEST_RESULT + +#include <stdint.h> + +/** + * Test result summary structure + */ +struct __attribute__ ((__packed__)) ts_test_runner_result_summary +{ + uint32_t num_tests; + uint32_t num_passed; + uint32_t num_failed; +}; + +/** + * Variable length parameter tag for a test result object. + * Multiple test results may be returned for a test run. + */ +enum +{ + /* A test result record describes the result of a + * particular test. + */ + TS_TEST_RUNNER_TEST_RESULT_TAG = 1 +}; + +/* Test run state values */ +enum +{ + TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_NOT_RUN = 1, + TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_PASSED = 2, + TS_TEST_RUNNER_TEST_RESULT_RUN_STATE_FAILED = 3 +}; + +/* Test result fixed sized structure */ +struct __attribute__ ((__packed__)) ts_test_runner_test_result +{ + uint32_t run_state; + uint32_t fail_line; +}; + +/* Variable length output parameter tags */ +enum +{ + /* The name of the test */ + TS_TEST_RUNNER_TEST_RESULT_TAG_NAME = 1, + + /* The group the test belongs to */ + TS_TEST_RUNNER_TEST_RESULT_TAG_GROUP = 2 +}; + +#endif /* TS_TEST_RUNNER_TEST_RESULT */ |