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 /spec | |
parent | validation: Avoid empty test context instance (diff) | |
download | rtems-central-5591cc2fd4619784ec64bb0634eca7a43d99bfbc.tar.bz2 |
validation: Add context and fixture to test case
Diffstat (limited to 'spec')
-rw-r--r-- | spec/rtems/attr/val/attr.yml | 6 | ||||
-rw-r--r-- | spec/rtems/barrier/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/basedefs/val/basedefs.yml | 6 | ||||
-rw-r--r-- | spec/rtems/event/val/event-constant.yml | 6 | ||||
-rw-r--r-- | spec/rtems/event/val/events.yml | 6 | ||||
-rw-r--r-- | spec/rtems/event/val/send-receive.yml | 6 | ||||
-rw-r--r-- | spec/rtems/event/val/system-send-receive.yml | 6 | ||||
-rw-r--r-- | spec/rtems/message/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/mode/val/modes.yml | 6 | ||||
-rw-r--r-- | spec/rtems/option/val/options.yml | 6 | ||||
-rw-r--r-- | spec/rtems/part/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/part/val/part.yml | 6 | ||||
-rw-r--r-- | spec/rtems/ratemon/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/sem/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/timer/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/rtems/userext/val/ident.yml | 6 | ||||
-rw-r--r-- | spec/spec/test-case.yml | 24 | ||||
-rw-r--r-- | spec/testsuites/validation/c-library.yml | 6 | ||||
-rw-r--r-- | spec/testsuites/validation/classic-barrier.yml | 6 |
19 files changed, 108 insertions, 24 deletions
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 |