function_pre_test 

Fuego wiki

Login or create account

function pre test

NAME [edit section]

pre_test

SYNOPSIS [edit section]

  • pre_test <test_name>

DESCRIPTION [edit section]

Perform setup and other operations needed on the host and target, before executing a test.

It does the following, in sequence:

  • set SSHPASS (from $PASSWORD)
  • if $TARGET_SETUP_LINK is defined, execute it
  • if $Target_PreCleanup flag is true, call target_cleanup()
  • if test_pre_check is defined, call it
  • test the connection to the target (by running 'true' on the target)
  • create the log directories on the host
  • get the firmware version from the target
  • run ov_rootfs_state
  • remove the test directories (in $BOARD_TESTDIR and /tmp) on the target
    • note that this removes just this test's prior directories, if any, on the target. If $Target_Cleanup is not true, and there are directories from other tests on the target, they are left alone.
  • log the test name
  • get the 'before' syslogs
  • flush filesystem buffers and drop filesystem caches

EXAMPLES [edit section]

Here are some sample invocations:
     pre_test $TESTDIR

ENVIRONMENT and ARGUMENTS [edit section]

$1 is the base name of the test (e.g. Functional.hellO_world). This is usually passed in as $TESTDIR by the caller.

Variables also used by pre_test are:

  • $TESTDIR
  • $JOB_NAME
  • $PASSWORD
  • $TARGET_SETUP_LINK
  • $Target_Cleanup
  • $Device
  • $TRANSPORT
  • $FUEGO_LOGS_PATH
  • $FWVER
  • $BOARD_TESTDIR

RETURN [edit section]

Returns non-zero on error.

SOURCE [edit section]

Located in scripts/functions.sh

SEE ALSO [edit section]

TBWiki engine 1.8.2 by Tim Bird