Test Script APIs
The following functions are available to test scripts.
FIXTHIS - core functions: should document which of the functions are internal, and which are intended for test script use
list of routines (by providing script) [edit section]
from functions.sh- allocate_next_batch_id - allocate and return the next unique batch id for the system
- assert_has_program - check that a program is present on the target, and abort the test if it is missing
- build - internal - perform the 'build' phase of test execution
- build_cleanup - internal -
- check_capability - check to see if the target has the specified capability
- check_has_program - check to see if a specified program is on the target
- cleanup - clean up target after a test
- calls test_cleanup, if present
- cmd - to be used externally - execute a command on the target
- concurrent_check - wait for other test to complete before proceeding
- deploy - internal - perform the 'deploy phase of test execution
- dump_syslogs - dump the syslogs for the target under test
- fetch_results - retrieve testlog and system logs for a test
- also, call test_fetch_results, if present
- fail_check_cases
- firmware - get the firmware name from the target
- get - to be used externally - get a file or files from the target
- get_program_path - find path to execute a progam on the target board
- get_testlog
- hd_test_mount_prepare
- hd_test_clean_umount
- is_abs_path - check if a path is absolute (starts with /) or not
- is_empty - fail if an environment variable is empty
- is_on_target - check if a program or file is on the target board
- is_on_target_path - check if a program is in one of the directories in the PATH on the target board
- kill_procs - kill process on the target
- log_compare - to be used by scripts (specifically by test_processing)
- log_this - used to log output of operations performed on the host (as opposed to on the board)
- pre_build - internal
- pre_deploy - internal
- pre_test - internal
- post_build - internal
- post_deploy - internal
- post_test - internal
- processing - internal
- put - to be used externally - put a file or files on the target
- report - to be used externally - execute command and put stdout into log
- report_append - to be used externally - execute command and append stdout to log
- report_devlog
- report_live - to be used externally - execute command capture stdout live to a log on the host
- function_run_test
- run another test from the current one (usually from a batch test)
- safe_cmd - to be used externally
- snapshot - internal
- syslog_cmp
- target_cleanup
- target_reboot - reboot the target
- target_setup_route_to_host
- unpack - internal - used to unpack the test program source tarball
from common.sh
- abort_job - abort the current test, emitting a reason string to output
- assert_define - to be used externally - check that an environment variable is defined
- run_python
- dprint - print a 'debug' message
- vprint - print a 'verbose' message
- iprint - print an 'info' message
- wprint - print a 'warning' message
- eprint - print an 'error' message
from reports.sh
from overlays.sh
- set_overlay_vars - internal - process overlays and set variables for board, platform, test plan and test specs
FIXTHIS - need to document the ov_* functions as well, from the scripts in the engine/overlays/base directory.
From base-distrib.fuegoclass:
- ov_get_firmware
- ov_rootfs_reboot
- ov_rootfs_state
- ov_logger
- ov_rootfs_sync
- ov_rootfs_drop_caches
- ov_rootfs_oom
- ov_rootfs_kill
- ov_rootfs_logread
From base-board.fuegoclass:
- ov_board_setup
- ov_board_teardown
- ov_transport_connect
- ov_transport_disconnect
- ov_transport_get
- ov_transport_put
- ov_transport_cmd
- ov_board_control_reboot
From base-funcs.fuegoclass:
From fuego_test.sh (in alphabetical order):
NOTE: phases are: pre_check, build, deploy, run, fetch_results, post_test, processing