|
|
= NAME =test_processing
|
|
|
= SYNOPSIS =Performs the steps needed to determine success or failure of the test
|
|
|
= DESCRIPTION =This function is defined in the base test script for a test, and executesthe commands needed to determine success or failure of the test.
|
|
When this function starts, the test has been run, and the test log has beenretrieved from the system.
|
When this function starts, the test has been run, and the test log has beenretrieved from the system.
|
|
log_compare one or more times. This is used to verify if an expected pattern is in the log a certainnumber of times.
|
== Commonly called functions or programs ==This function commonly [[function_log_compare|log_compare]] one or more times. This is used to verify if an expected pattern is in the log a certainnumber of times.
|
|
The arguments to log_compare are sometimes parameterized. That is, a testvariable may be used for the number of positive or negative results expectedfor the test. This allows for taking into account board-specific results for complex tests, such as LTP. A complex, comprehensive testoften will have results that are dependent on kernel configuration ordistribution settings. Using a variable to customize the expected resultsallows the tester to avoid lots of false test failures.
|
The arguments to log_compare are sometimes parameterized. That is, a testvariable may be used for the number of positive or negative results expectedfor the test. This allows for taking into account board-specific results for complex tests, such as LTP. A complex, comprehensive testoften will have results that are dependent on kernel configuration ordistribution settings. Using a variable to customize the expected resultsallows the tester to avoid lots of false test failures.
|
|
|
= EXAMPLES =Some sample contents are:{{{#!YellowBoxfunction test_processing { log_compare "$TESTDIR" "11" "^TEST.*OK" "p"}}}}
|
|
|
{{{#!YellowBoxfunction test_processing { log_compare "$TESTDIR" $FUNCTIONAL_CMT_LINES_COUNT "Test passed" "p"}}}}
|
|
|
{{{#!YellowBoxfunction test_processing { log_compare "$TESTDIR" "0" "^TEST.*FAILED" "n"}}}}
|
|
|
{{{#!YellowBoxfunction test_processing { assert_define LTP_OPEN_POSIX_SUBTEST_COUNT_POS P_CRIT="execution: PASS" log_compare "$TESTDIR" $LTP_OPEN_POSIX_SUBTEST_COUNT_POS "${P_CRIT}" "p"}}}}
|
|
|
= ENVIRONMENT and ARGUMENTS =However, some variables that are commonly used in this function are: * $TESTDIR - the directory name for the test * this is passed to log_compare and is used to find the log file and parsed (pn) log files
|
|
|
= RETURN =Returns non-zero for error
|
|
Note that test_processing is the last function called during test execution.The return value for this function is the return value for the entire test,and indicates success or failure for the whole test.
|
Note that test_processing is the last function called during test execution.The return value for this function is the return value for the entire test,and indicates success or failure for the whole test.
|
|
|
= SOURCE =This function is located in the base script for each test. The base test scripts are located in /home/jenkins/fuego/engine/tests/<test_name>.
|
|
An example path would be: /home/jenkins/fuego/engine/tests/Functional.hello_world/hello_world.sh
|
An example path would be: ''/home/jenkins/fuego/engine/tests/Functional.hello_world/hello_world.sh''
|
|
test_build, test_deploy, test_run, log_compare
|
= SEE ALSO = * [[function_test_build|test_build]], [[function_test_deploy|test_deploy]], [[function_test_run|test_run]], [[function_log_compare|log_compare]]
|