Giter VIP home page Giter VIP logo

sof-test's Introduction

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.

sof-test's People

Contributors

bin-qa avatar clarexzhou avatar deekue avatar fredoh9 avatar keqiaozhang avatar libinyang avatar marc-hb avatar plbossart avatar stripes416 avatar xiulipan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.