FrontPage 

Fuego wiki

Login or create account

function test run in split format

NAME [edit section]

= NAME =
test_run

SYNOPSIS [edit section]

= SYNOPSIS =
Performs the actual steps needed to execute the test software on the target.

DESCRIPTION [edit section]

= DESCRIPTION =
This function is defined in the base test script for a test, and executes those
commands required to build the software.
When this function starts, the test program (if any) has been installed on the target board.
When this function starts, the test program (if any) has been installed on the
target board.

Commonly called functions or programs [edit section]

== Commonly called functions or programs ==
This function can contain calls to just about any command, but there are some
common commands sed for building Linux source
 * cmd - used to execute commands on the target, e.g. for test preparation
 * get_program_path - used to find pre-installed test programs or auxiliary programs on the board
 * report - used to execute the test and save the log output (test stdout) to a file
 * report_append - used to execute another command on the target, and append the log output to the test log
 * log_this - execute a command an log the output on the host
Disk and filesystem tests may use the following routines: * hd_test_mount_prepare - mount a filesystem in preparation for a test * hd_test_clean_unmount - unmount a filesystem after a test had concluded
Disk and filesystem tests may use the following routines:
 * hd_test_mount_prepare - mount a filesystem in preparation for a test
 * hd_test_clean_unmount - unmount a filesystem after a test had concluded
Batch tests may use the following routines * allocate_next_batch_id * run_test
Batch tests may use the following routines
 * allocate_next_batch_id
 * run_test

EXAMPLES [edit section]

= EXAMPLES =
Some sample contents are:
{{{#!YellowBox
function test_run {
    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./hello $FUNCTIONAL_HELLO_WORLD_ARG"
}
}}}
{{{#!YellowBox
function test_run {
    report "cd /tmp/fuego.$TESTDIR/target_bin; ./bin/run-all-posix-option-group-tests.sh"
}
}}}
{{{#!YellowBox
function test_run {
    assert_define BENCHMARK_TIOBENCH_MOUNT_BLOCKDEV
    assert_define BENCHMARK_TIOBENCH_MOUNT_POINT
    assert_define BENCHMARK_TIOBENCH_THREADS
    assert_define BENCHMARK_TIOBENCH_SIZE
hd_test_mount_prepare $BENCHMARK_TIOBENCH_MOUNT_BLOCKDEV $BENCHMARK_TIOBENCH_MOUNT_POINT
    hd_test_mount_prepare $BENCHMARK_TIOBENCH_MOUNT_BLOCKDEV $BENCHMARK_TIOBENCH_MOUNT_POINT
report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./tiotest -d $BENCHMARK_TIOBENCH_MOUNT_POINT -t $BENCHMARK_TIOBENCH_THREADS -f $BENCHMARK_TIOBENCH_SIZE –S" report_append "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./tiotest -d $BENCHMARK_TIOBENCH_MOUNT_POINT -t $BENCHMARK_TIOBENCH_THREADS -f $BENCHMARK_TIOBENCH_SIZE –W"
    report "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./tiotest -d $BENCHMARK_TIOBENCH_MOUNT_POINT -t $BENCHMARK_TIOBENCH_THREADS -f $BENCHMARK_TIOBENCH_SIZE –S"  
    report_append "cd $BOARD_TESTDIR/fuego.$TESTDIR; ./tiotest -d $BENCHMARK_TIOBENCH_MOUNT_POINT -t $BENCHMARK_TIOBENCH_THREADS -f $BENCHMARK_TIOBENCH_SIZE –W"  
hd_test_clean_umount $BENCHMARK_TIOBENCH_MOUNT_BLOCKDEV $BENCHMARK_TIOBENCH_MOUNT_POINT } }}}
    hd_test_clean_umount $BENCHMARK_TIOBENCH_MOUNT_BLOCKDEV $BENCHMARK_TIOBENCH_MOUNT_POINT
}
}}}

ENVIRONMENT and ARGUMENTS [edit section]

Core interfaces and Variables)
= ENVIRONMENT and ARGUMENTS =
A number of environment variables are set (see [[Core interfaces]] and [[Variables]])
However, some variables that are commonly used in this function are: * $TESTDIR - name of the test directory (which, coincedentally is the name of the test) * $BOARD_TESTDIR - the directory where materials for the test are located (on the target) * This is usually used with $BOARD_TESTDIR/fuego.$TESTDIR
However, some variables that are commonly used in this function are:
 * $TESTDIR - name of the test directory (which, coincedentally is the name of the test)
 * $BOARD_TESTDIR - the directory where materials for the test are located (on the target)
   * This is usually used with $BOARD_TESTDIR/fuego.$TESTDIR
There are no arguments to this function.
There are no arguments to this function.

RETURN [edit section]

= RETURN =
returns non-zero for error

SOURCE [edit section]

= SOURCE =
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''

SEE ALSO [edit section]

report, report_append, cmd, log_this, hd_test_mount_prepare, hd_test_clean_umount, run_test, allocate_next_batch_id, get_program_path
= SEE ALSO =
 * [[function_report|report]], [[function_report_append|report_append]], [[function_cmd|cmd]], [[function_log_this|log_this]], [[function_hd_test_mount_prepare|hd_test_mount_prepare]], [[function_hd_test_clean_umount|hd_test_clean_umount]], [[function_run_test|run_test]], [[function_allocate_next_batch_id|allocate_next_batch_id]],
[[function_get_program_path|get_program_path]]
TBWiki engine 1.8.3 by Tim Bird