diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-04 07:48:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-04 14:23:14 +0100 |
commit | 5591cc2fd4619784ec64bb0634eca7a43d99bfbc (patch) | |
tree | d91adbac86dca07f67e9312f6211ed107ac9b37c | |
parent | validation: Avoid empty test context instance (diff) | |
download | rtems-central-5591cc2fd4619784ec64bb0634eca7a43d99bfbc.tar.bz2 |
validation: Add context and fixture to test case
27 files changed, 225 insertions, 38 deletions
diff --git a/rtemsspec/tests/spec-validation/tc.yml b/rtemsspec/tests/spec-validation/tc.yml index 3cd4bf85..6b5b8218 100644 --- a/rtemsspec/tests/spec-validation/tc.yml +++ b/rtemsspec/tests/spec-validation/tc.yml @@ -37,10 +37,11 @@ test-actions: Test case action 1 description. links: [] test-brief: Test case brief description. +test-context: [] +test-context-support: null test-description: Test case description. test-epilogue: | /* Test case epilogue code */ -test-fixture: null test-header: null test-includes: - a.h @@ -48,7 +49,10 @@ test-local-includes: - x.h test-prologue: | /* Test case prologue code */ +test-setup: null +test-stop: null test-support: | /* Test case support code */ test-target: tc12.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/spec-validation/tc2.yml b/rtemsspec/tests/spec-validation/tc2.yml index bbf884a3..89f23763 100644 --- a/rtemsspec/tests/spec-validation/tc2.yml +++ b/rtemsspec/tests/spec-validation/tc2.yml @@ -27,15 +27,31 @@ test-actions: Test case 2 action 1 description. links: [] test-brief: Test case 2 brief description. +test-context: +- brief: | + Context member brief. + description: | + Context member description. + member: | + int member +test-context-support: null test-description: Test case 2 description. test-epilogue: null -test-fixture: test_case_2_fixture test-header: null test-includes: - b.h test-local-includes: - y.h test-prologue: null +test-setup: + brief: | + Setup brief. + code: | + /* Setup code */ + description: | + Setup description. +test-stop: null test-support: null test-target: tc12.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/spec-validation/tc3.yml b/rtemsspec/tests/spec-validation/tc3.yml index 8a51a180..e91b0673 100644 --- a/rtemsspec/tests/spec-validation/tc3.yml +++ b/rtemsspec/tests/spec-validation/tc3.yml @@ -16,15 +16,19 @@ test-actions: Test case 3 action 0 description. links: [] test-brief: Test case 3 brief description. +test-context: [] +test-context-support: null test-description: Test case 3 description. test-epilogue: null -test-fixture: null test-header: null test-includes: - c.h test-local-includes: - z.h test-prologue: null +test-setup: null +test-stop: null test-support: null test-target: tc34.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/spec-validation/tc4.yml b/rtemsspec/tests/spec-validation/tc4.yml index c05bfd30..28ddd64f 100644 --- a/rtemsspec/tests/spec-validation/tc4.yml +++ b/rtemsspec/tests/spec-validation/tc4.yml @@ -5,14 +5,18 @@ enabled-by: true links: [] test-actions: [] test-brief: Test case 4 brief description. +test-context: [] +test-context-support: null test-description: Test case 4 description. test-epilogue: | /* Test case 4 epilogue code */ -test-fixture: null test-header: null test-includes: [] test-local-includes: [] test-prologue: null +test-setup: null +test-stop: null test-support: null test-target: tc34.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/spec-validation/tc5.yml b/rtemsspec/tests/spec-validation/tc5.yml index efd6fa54..cdb98d97 100644 --- a/rtemsspec/tests/spec-validation/tc5.yml +++ b/rtemsspec/tests/spec-validation/tc5.yml @@ -37,10 +37,11 @@ test-actions: Test case action 1 description. links: [] test-brief: Test case 5 brief description. +test-context: [] +test-context-support: null test-description: Test case 5 description. test-epilogue: | /* Test case 5 epilogue code */ -test-fixture: null test-header: code: | /* Header code for ${.:/test-run}() */ @@ -68,6 +69,9 @@ test-header: test-includes: [] test-local-includes: [] test-prologue: null +test-setup: null +test-stop: null test-support: null test-target: tc34.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/spec-validation/tc6.yml b/rtemsspec/tests/spec-validation/tc6.yml index 02c100b8..19a03397 100644 --- a/rtemsspec/tests/spec-validation/tc6.yml +++ b/rtemsspec/tests/spec-validation/tc6.yml @@ -5,9 +5,10 @@ enabled-by: true links: [] test-actions: [] test-brief: null +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: code: null includes: [] @@ -17,6 +18,9 @@ test-header: test-includes: [] test-local-includes: [] test-prologue: null +test-setup: null +test-stop: null test-support: null test-target: tc34.c +test-teardown: null type: test-case diff --git a/rtemsspec/tests/test_validation.py b/rtemsspec/tests/test_validation.py index 8902f530..0103d004 100644 --- a/rtemsspec/tests/test_validation.py +++ b/rtemsspec/tests/test_validation.py @@ -903,9 +903,50 @@ T_TEST_CASE( Tc ) */ /** + * @brief Test context for spec:/tc2 test case. + */ +typedef struct { + /** + * @brief Context member brief. + * + * Context member description. + */ + int member; +} Tc2_Context; + +static Tc2_Context + Tc2_Instance; + +/** + * @brief Setup brief. + * + * Setup description. + */ +static void Tc2_Setup( Tc2_Context *ctx ) +{ + /* Setup code */ +} + +static void Tc2_Setup_Wrap( void *arg ) +{ + Tc2_Context *ctx; + + ctx = arg; + Tc2_Setup( ctx ); +} + +static T_fixture Tc2_Fixture = { + .setup = Tc2_Setup_Wrap, + .stop = NULL, + .teardown = NULL, + .scope = NULL, + .initial_context = &Tc2_Instance +}; + +/** * @fn void T_case_body_Tc2( void ) */ -T_TEST_CASE_FIXTURE( Tc2, &test_case_2_fixture ) +T_TEST_CASE_FIXTURE( Tc2, &Tc2_Fixture ) { /* Test case 2 action 0 code */ /* Test case 2 action 0 check 0 code */ diff --git a/rtemsspec/validation.py b/rtemsspec/validation.py index 386277dc..51b602df 100644 --- a/rtemsspec/validation.py +++ b/rtemsspec/validation.py @@ -89,6 +89,7 @@ class _TestItem: def __init__(self, item: Item): self._item = item self._ident = to_camel_case(item.uid[1:]) + self._context = f"{self._ident}_Context" self._mapper = _Mapper(item) def __getitem__(self, key: str): @@ -112,7 +113,7 @@ class _TestItem: @property def context(self) -> str: """ Returns the test case context type. """ - return f"{self._ident}_Context" + return self._context @property def name(self) -> str: @@ -320,13 +321,42 @@ class _TestItem: self.add_header_body(content, header) content.write(os.path.join(base_directory, header["target"])) + def _add_context_and_fixture(self, content: CContent) -> Optional[str]: + instance = self.add_context(content) + if instance == "NULL": + self._context = "void" + do_wrap = False + else: + do_wrap = True + setup = self.add_support_method(content, + "test-setup", + "Setup", + do_wrap=do_wrap) + stop = self.add_support_method(content, + "test-stop", + "Stop", + do_wrap=do_wrap) + teardown = self.add_support_method(content, + "test-teardown", + "Teardown", + do_wrap=do_wrap) + if all(ptr == "NULL" for ptr in [instance, setup, stop, teardown]): + return None + content.add([ + f"static T_fixture {self.ident}_Fixture = {{", + f" .setup = {setup},", f" .stop = {stop},", + f" .teardown = {teardown},", " .scope = NULL,", + f" .initial_context = {instance}", "};" + ]) + return f"&{self.ident}_Fixture" + def generate(self, content: CContent, base_directory: str, test_case_to_suites: Dict[str, List["_TestItem"]]) -> None: """ Generates the content. """ self.add_test_case_description(content, test_case_to_suites) + fixture = self._add_context_and_fixture(content) self._mapper.reset() actions = self._generate_test_case_actions() - fixture = self["test-fixture"] header = self["test-header"] if header: self.generate_header(base_directory, header) @@ -346,7 +376,7 @@ class _TestItem: ret = "" params = [f"{self.ident}"] if fixture: - params.append(f"&{fixture}") + params.append(fixture) name = "T_TEST_CASE_FIXTURE" else: name = "T_TEST_CASE" @@ -816,10 +846,6 @@ class _RuntimeMeasurementRequestItem(_TestItem): super().__init__(item) self._context = context - @property - def context(self) -> str: - return self._context - def _add_call_method(content: CContent, name: str) -> None: if name != "NULL": diff --git a/spec/rtems/attr/val/attr.yml b/spec/rtems/attr/val/attr.yml index c60aab1a..167948f3 100644 --- a/spec/rtems/attr/val/attr.yml +++ b/spec/rtems/attr/val/attr.yml @@ -246,15 +246,18 @@ test-actions: links: [] test-brief: | Tests the attribute constants of the Classic API. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h test-local-includes: [] test-prologue: | rtems_attribute attributes; +test-setup: null +test-stop: null test-support: | static bool IsPowerOfTwo( rtems_attribute attribute ) { @@ -275,4 +278,5 @@ test-support: | return count; } test-target: testsuites/validation/tc-attr.c +test-teardown: null type: test-case diff --git a/spec/rtems/barrier/val/ident.yml b/spec/rtems/barrier/val/ident.yml index 86e30210..08f983e0 100644 --- a/spec/rtems/barrier/val/ident.yml +++ b/spec/rtems/barrier/val/ident.yml @@ -17,11 +17,12 @@ test-actions: objects defined by ${../../req/ident-local}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_barrier_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -37,6 +38,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicBarrierIdentAction( rtems_name name, @@ -46,4 +49,5 @@ test-support: | return rtems_barrier_ident( name, id ); } test-target: testsuites/validation/tc-barrier-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/basedefs/val/basedefs.yml b/spec/rtems/basedefs/val/basedefs.yml index 05536ff8..a717e6d6 100644 --- a/spec/rtems/basedefs/val/basedefs.yml +++ b/spec/rtems/basedefs/val/basedefs.yml @@ -1486,9 +1486,10 @@ test-actions: links: [] test-brief: | Tests the basedefs macros of the Classic API. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - stddef.h @@ -1497,6 +1498,8 @@ test-includes: test-local-includes: - tc-basedefs-pendant.h test-prologue: null +test-setup: null +test-stop: null test-support: | #define WHITE_SPACE_STRING_MAX_LENGTH 80 #define abccat concat @@ -1685,4 +1688,5 @@ test-support: | return 64; } test-target: testsuites/validation/tc-basedefs.c +test-teardown: null type: test-case diff --git a/spec/rtems/event/val/event-constant.yml b/spec/rtems/event/val/event-constant.yml index d1e0b84e..e33fd76b 100644 --- a/spec/rtems/event/val/event-constant.yml +++ b/spec/rtems/event/val/event-constant.yml @@ -359,9 +359,10 @@ test-actions: test-brief: | Tests an event constant and number of the Event Manager using the Classic and system event sets of the executing task. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: code: null includes: @@ -386,6 +387,9 @@ test-local-includes: test-prologue: | rtems_status_code sc; rtems_event_set out; +test-setup: null +test-stop: null test-support: null test-target: testsuites/validation/tr-event-constant.c +test-teardown: null type: test-case diff --git a/spec/rtems/event/val/events.yml b/spec/rtems/event/val/events.yml index b5653203..4c2372f1 100644 --- a/spec/rtems/event/val/events.yml +++ b/spec/rtems/event/val/events.yml @@ -46,9 +46,10 @@ test-actions: Validate the Event Manager directive options. links: [] test-brief: Tests the Event Manager API. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h @@ -57,6 +58,8 @@ test-local-includes: test-prologue: | rtems_event_set all; int i; +test-setup: null +test-stop: null test-support: | static const rtems_event_set events[] = { RTEMS_EVENT_0, @@ -93,4 +96,5 @@ test-support: | RTEMS_EVENT_31, }; test-target: testsuites/validation/tc-events.c +test-teardown: null type: test-case diff --git a/spec/rtems/event/val/send-receive.yml b/spec/rtems/event/val/send-receive.yml index f3d67209..ac09b015 100644 --- a/spec/rtems/event/val/send-receive.yml +++ b/spec/rtems/event/val/send-receive.yml @@ -23,9 +23,10 @@ test-actions: links: [] test-brief: | Tests the ${../if/send:/name} and ${../if/receive:/name} directives. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems/rtems/eventimpl.h @@ -35,6 +36,8 @@ test-includes: test-local-includes: - tr-event-send-receive.h test-prologue: null +test-setup: null +test-stop: null test-support: | static rtems_status_code EventSend( rtems_id id, @@ -62,4 +65,5 @@ test-support: | return api->Event.pending_events; } test-target: testsuites/validation/tc-event-send-receive.c +test-teardown: null type: test-case diff --git a/spec/rtems/event/val/system-send-receive.yml b/spec/rtems/event/val/system-send-receive.yml index 18bdeb03..8e17d48f 100644 --- a/spec/rtems/event/val/system-send-receive.yml +++ b/spec/rtems/event/val/system-send-receive.yml @@ -24,9 +24,10 @@ test-actions: test-brief: | Tests the ${../if/system-send:/name} and ${../if/system-receive:/name} directives. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems/rtems/eventimpl.h @@ -36,6 +37,8 @@ test-includes: test-local-includes: - tr-event-send-receive.h test-prologue: null +test-setup: null +test-stop: null test-support: | static rtems_status_code EventSystemSend( rtems_id id, @@ -68,4 +71,5 @@ test-support: | return api->System_event.pending_events; } test-target: testsuites/validation/tc-event-send-receive.c +test-teardown: null type: test-case diff --git a/spec/rtems/message/val/ident.yml b/spec/rtems/message/val/ident.yml index 450b19e6..628f17f9 100644 --- a/spec/rtems/message/val/ident.yml +++ b/spec/rtems/message/val/ident.yml @@ -17,11 +17,12 @@ test-actions: class objects defined by ${../../req/ident}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_message_queue_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -35,6 +36,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static RTEMS_MESSAGE_QUEUE_BUFFER( 1 ) ClassicMessageIdentBuffers[ 1 ]; @@ -56,4 +59,5 @@ test-support: | return rtems_message_queue_ident( name, node, id ); } test-target: testsuites/validation/tc-message-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/mode/val/modes.yml b/spec/rtems/mode/val/modes.yml index bcbb32a2..b62a66bc 100644 --- a/spec/rtems/mode/val/modes.yml +++ b/spec/rtems/mode/val/modes.yml @@ -210,15 +210,18 @@ test-actions: links: [] test-brief: | Tests the task mode constants and function-like macros of the Classic API. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h test-local-includes: [] test-prologue: | rtems_mode modes; +test-setup: null +test-stop: null test-support: | static bool IsPowerOfTwo( rtems_mode mode ) { @@ -239,4 +242,5 @@ test-support: | return count; } test-target: testsuites/validation/tc-modes.c +test-teardown: null type: test-case diff --git a/spec/rtems/option/val/options.yml b/spec/rtems/option/val/options.yml index 7efa7885..0364dcce 100644 --- a/spec/rtems/option/val/options.yml +++ b/spec/rtems/option/val/options.yml @@ -85,15 +85,18 @@ test-actions: links: [] test-brief: | Tests the option constants of the Classic API. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h test-local-includes: [] test-prologue: | rtems_option options; +test-setup: null +test-stop: null test-support: | static bool IsPowerOfTwo( rtems_option option ) { @@ -114,4 +117,5 @@ test-support: | return count; } test-target: testsuites/validation/tc-options.c +test-teardown: null type: test-case diff --git a/spec/rtems/part/val/ident.yml b/spec/rtems/part/val/ident.yml index c2bcf400..ba402387 100644 --- a/spec/rtems/part/val/ident.yml +++ b/spec/rtems/part/val/ident.yml @@ -17,11 +17,12 @@ test-actions: objects defined by ${../../req/ident}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_partition_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -40,6 +41,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicPartIdentAction( rtems_name name, @@ -50,4 +53,5 @@ test-support: | return rtems_partition_ident( name, node, id ); } test-target: testsuites/validation/tc-part-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/part/val/part.yml b/spec/rtems/part/val/part.yml index c4e8c7ed..43f1a718 100644 --- a/spec/rtems/part/val/part.yml +++ b/spec/rtems/part/val/part.yml @@ -90,9 +90,10 @@ test-actions: links: [] test-brief: | Validates some functional requirements of the Partition Manager. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h @@ -104,6 +105,9 @@ test-prologue: | void *pointer; rtems_status_code sc; rtems_id id; +test-setup: null +test-stop: null test-support: null test-target: testsuites/validation/tc-part.c +test-teardown: null type: test-case diff --git a/spec/rtems/ratemon/val/ident.yml b/spec/rtems/ratemon/val/ident.yml index 7a73c541..0abbfe06 100644 --- a/spec/rtems/ratemon/val/ident.yml +++ b/spec/rtems/ratemon/val/ident.yml @@ -17,11 +17,12 @@ test-actions: class objects defined by ${../../req/ident-local}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_rate_monotonic_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -35,6 +36,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicRatemonIdentAction( rtems_name name, @@ -44,4 +47,5 @@ test-support: | return rtems_rate_monotonic_ident( name, id ); } test-target: testsuites/validation/tc-ratemon-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/sem/val/ident.yml b/spec/rtems/sem/val/ident.yml index d515aabd..ba40dfd9 100644 --- a/spec/rtems/sem/val/ident.yml +++ b/spec/rtems/sem/val/ident.yml @@ -17,11 +17,12 @@ test-actions: objects defined by ${../../req/ident}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_semaphore_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -38,6 +39,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicSemIdentAction( rtems_name name, @@ -48,4 +51,5 @@ test-support: | return rtems_semaphore_ident( name, node, id ); } test-target: testsuites/validation/tc-sem-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/timer/val/ident.yml b/spec/rtems/timer/val/ident.yml index 6937af27..446e5dc9 100644 --- a/spec/rtems/timer/val/ident.yml +++ b/spec/rtems/timer/val/ident.yml @@ -17,11 +17,12 @@ test-actions: objects defined by ${../../req/ident-local}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_timer_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -35,6 +36,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicTimerIdentAction( rtems_name name, @@ -44,4 +47,5 @@ test-support: | return rtems_timer_ident( name, id ); } test-target: testsuites/validation/tc-timer-ident.c +test-teardown: null type: test-case diff --git a/spec/rtems/userext/val/ident.yml b/spec/rtems/userext/val/ident.yml index 37be348f..03620bd6 100644 --- a/spec/rtems/userext/val/ident.yml +++ b/spec/rtems/userext/val/ident.yml @@ -17,11 +17,12 @@ test-actions: class objects defined by ${../../req/ident-local}. links: [] test-brief: Test the ${../if/ident:/name} directive. +test-context: [] +test-context-support: null test-description: null test-epilogue: | sc = rtems_extension_delete( id_local_object ); T_rsc_success( sc ); -test-fixture: null test-header: null test-includes: [] test-local-includes: @@ -37,6 +38,8 @@ test-prologue: | &id_local_object ); T_assert_rsc_success( sc ); +test-setup: null +test-stop: null test-support: | static rtems_status_code ClassicUserExtIdentAction( rtems_name name, @@ -46,4 +49,5 @@ test-support: | return rtems_extension_ident( name, id ); } test-target: testsuites/validation/tc-userext-ident.c +test-teardown: null type: test-case diff --git a/spec/spec/test-case.yml b/spec/spec/test-case.yml index 614bb98e..0a03d25e 100644 --- a/spec/spec/test-case.yml +++ b/spec/spec/test-case.yml @@ -21,6 +21,15 @@ spec-info: description: | It shall be the test case brief description. spec-type: str + test-context: + description: null + spec-type: test-context-list + test-context-support: + description: | + If the value is present, then it shall be the test context support + code. The context support code is placed at file scope before the + test context definition. + spec-type: optional-str test-description: description: | It shall be the test case description. @@ -31,12 +40,6 @@ spec-info: code. The epilogue code is placed in the test case body after the test case actions. spec-type: optional-str - test-fixture: - description: | - If the value is present, then it shall be a pointer to the test case - fixture. The test case fixture pointer declaration may be provided - by the test case support code or via an included header file. - spec-type: optional-str test-header: description: null spec-type: test-header @@ -55,6 +58,12 @@ spec-info: test case actions. A use case is the declaration of local variables used by the test case actions. spec-type: optional-str + test-setup: + description: null + spec-type: test-support-method + test-stop: + description: null + spec-type: test-support-method test-support: description: | If the value is present, then it shall be the test case support code. @@ -64,6 +73,9 @@ spec-info: description: | It shall be the path to the generated target test case source file. spec-type: str + test-teardown: + description: null + spec-type: test-support-method description: | This set of attributes specifies a test case. mandatory-attributes: all diff --git a/spec/testsuites/validation/c-library.yml b/spec/testsuites/validation/c-library.yml index e2abea9a..72cc9884 100644 --- a/spec/testsuites/validation/c-library.yml +++ b/spec/testsuites/validation/c-library.yml @@ -60,9 +60,10 @@ test-actions: test-brief: | This test case calls functions of the C Library which are included in the space profile. +test-context: [] +test-context-support: null test-description: null test-epilogue: null -test-fixture: null test-header: null test-includes: - rtems.h @@ -73,6 +74,9 @@ test-prologue: | void *p; int s; int d; +test-setup: null +test-stop: null test-support: null test-target: testsuites/validation/tc-space-profile.c +test-teardown: null type: test-case diff --git a/spec/testsuites/validation/classic-barrier.yml b/spec/testsuites/validation/classic-barrier.yml index 08325898..e28795cb 100644 --- a/spec/testsuites/validation/classic-barrier.yml +++ b/spec/testsuites/validation/classic-barrier.yml @@ -67,10 +67,11 @@ test-actions: test-brief: | This test case calls functions of the Barrier Manager which are included in the space profile. +test-context: [] +test-context-support: null test-description: null test-epilogue: | T_check_rtems_barriers(T_EVENT_RUN_INITIALIZE_EARLY, T_case_name()); -test-fixture: null test-header: null test-includes: - rtems.h @@ -81,6 +82,9 @@ test-prologue: | rtems_id id; rtems_id id2; uint32_t released; +test-setup: null +test-stop: null test-support: null test-target: testsuites/validation/tc-space-profile.c +test-teardown: null type: test-case |