summaryrefslogtreecommitdiff
path: root/docs/design.md
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2015-05-08 11:18:06 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2015-06-18 09:49:01 +0100
commit351469cbd6bcdb06226fc6df324d1ce8394f82ce (patch)
tree6dc0460ec7760010862197b28654c2a1bd5625f4 /docs/design.md
parent560ade0e26817191741488b791086a81b20ded19 (diff)
Clean up the code keeping track of the tests progress
* Introduce test_to_run & test_progress fields in TEST_NVM They replace current_testcase and next_testcase. They provide the same functionality but in a more intuitive way. * Get rid of cur_testsuite & cur_testcase variables They were variables stored in RAM, therefore they were volatile and their values were lost through platform reset. They used to be needed because the TEST_NVM structure kept function pointers to keep track of the progress of the test session. Now we store the testsuite and testcase index directly into NVM. * Remove some functions that are no longer needed: - tftf_get_testcase_index() Was used to get the index of a testcase from its function pointer. No longer needed because we no longer identify tests by their function pointers, instead we use indexes directly. - test_set_passed_and_next() Was used for tests that intended to reset the board. It set the current test case's result as "passed" and set up the next_testcase pointer so that the test session would resume in the 2nd part of the test. This has all changed. Tests that reset the board no longer need to be implemented in 2 functions, instead the same function will be re-entered upon resume from reset. - tftf_testcase_set_result_as_crashed() Now simplified because we use indexes rather than function pointers to identify a test. Therefore, we no longer need a dedicated function for that. - tftf_testcase_update_result() Not needed, can use tftf_testcase_set_result() instead. * Move test progress values out of TEST_RESULT. They now belong to test_progress_t. Change-Id: I6f0917480d96a3194b42ca0c909efc91209a187e
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md21
1 files changed, 7 insertions, 14 deletions
diff --git a/docs/design.md b/docs/design.md
index 9f789e1..7154d80 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -56,24 +56,17 @@ execution starts at the warm boot entry point, which is `tftf_hotplug_entry()`
TODO: talk about lead CPU
-Tests results are written into NVM as we go along. The following data is saved
-(see struct `TEST_NVM` in `framework/include/nvm.h`):
+Information about the progression of the test session and tests results
+are written into Non-Volatile Memory as we go along. This consists of the
+following data (see struct `TEST_NVM` in `framework/include/nvm.h`):
- * current_testcase
+ * test_to_run
- Contains the function pointer of the current test. It is set up just
- before starting the execution of the test and reset after the test has
- completed. This is used to detect when the previous test session crashed:
- if current_testcase is not empty when the platform is brought up
- then it means that a test crashed/timed out during last run.
+ Reference to the test to run.
- * next_testcase
+ * test_progress
- Contains the function pointer of the next test to run. It is used
- to allow a test session to be interrupted and resumed later:
- if next_testcase is not empty when the platform is brought up
- then it means that the last test session is not over and TFTF will
- try to resume test execution where it has been left.
+ Progress in the execution of test_to_run.
* testcase_buffer