Skip to content

sathya-nujella/sof-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOF Test Case repo

Environment set up

requirements

apt packages

expect alsa-utils python3

sudo apt install expect alsa-utils python3

user group

sudo adm audio

env-check.sh

You can use this script to ensure the sof-test environment is set up properly

Usage

test cases

To run a test, call the scripts directly

  • -h will show the usage for the test

Example:

~/sof-test/test-case$ ./check-playback.sh -h
Usage: ./check-playback.sh [OPTION]

    -F |  --fmts
	    Iterate all supported formats
	    Default Value: Off
    -d parameter |  --duration parameter
	    aplay duration in second
	    Default Value: 10
    ...
~/sof-test/test-case$ ./check-playback.sh -d 4
2020-03-19 22:13:32 UTC [INFO] no source file, use /dev/zero as dummy playback source
2020-03-19 22:13:32 UTC [INFO] ./check-playback.sh using /lib/firmware/intel/sof-tplg/sof-apl-pcm512x.tplg as target TPLG to run the test case
2020-03-19 22:13:32 UTC [INFO] Catch block option from TPLG_BLOCK_LST will block 'pcm=HDA Digital,Media Playback,DMIC16k' for /lib/firmware/intel/sof-tplg/sof-apl-pcm512x.tplg
2020-03-19 22:13:32 UTC [INFO] Run command: 'sof-tplgreader.py /lib/firmware/intel/sof-tplg/sof-apl-pcm512x.tplg -f type:playback,both -b pcm:'HDA Digital,Media Playback,DMIC16k' -s 0 -e' to get BASH Array
2020-03-19 22:13:32 UTC [INFO] Testing: (Round: 1/1) (PCM: Port5 [hw:0,0]<both>) (Loop: 1/3)
    ...

tools

To use tool script, call the scripts directly

  • -h will show the usage for the tool

Example:

$ ./tools/sof-dump-status.py -p
apl

test case result

exit code display description
0 PASS Test has passed
1 FAIL Test has failed
2 N/A Test is not applicable
* unknown exit status

Folder description

  • case-lib
    Test case helper functions library

  • test-case
    The test cases

  • tools
    Script helper tools for the test cases.
    Can also be used directly via the command line
    Filenames should have the "sof-" prefix

  • logs
    Records in the test-case log folder.
    It will be auto created and follow the test name
    Ordered by time tag, the last link will link to the last run result

Tools list description

  • sof-boot-once.sh
    This script writes to rc.local, which is loaded and read after reboot.
    After rc.local command is run, the command will be removed.
    example: sof-boot-once.sh reboot
    Effect: when system boots up it will auto reboot again

  • sof-combinatoric.py
    Used to compute permutations or combinations of the various pipelines avilable during tests if multiple are needed at once.

  • sof-disk-usage.sh
    Used to ensure we have enough disk space to collect logs and avoid system problems.

  • sof-dump-status.py
    Dump the sound card status

  • sof-get-default-tplg.sh
    Load the tplg file name from system log which is recorded from system bootup

  • sof-get-kernel-line.sh
    Print all kernel versions and their line numbers from /var/log/kern.log, with the most recent <first/last>

  • sof-kernel-dump.sh
    Catch all kernel information after system boot up from /var/log/kern.log file

  • sof-kernel-log-check.sh
    Check dmesg for errors and ensure that any found are real errors

  • sof-process-kill.sh
    Kills aplay or arecord processes

  • sof-process-state.sh
    Shows the current state of a given process

  • sof-tplgreader.py
    tplgtool.py wrapper, it reads info from tplgtool.py to analyze topologies.

  • tplgtool.py
    Dumps info from tplg binary file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 67.2%
  • Python 32.8%