diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-12-24 21:55:16 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-12-24 13:19:13 -0800 |
| commit | f3862b744197c02393197e28c1fa426455f8a7e2 (patch) | |
| tree | d906f890259dfbcee579dae9fcac9f05c80fbff2 /meta-multimedia/recipes-multimedia/wireplumber/files | |
| parent | ca7fe11935982bcbb8bf10b80c4b17a381190fb3 (diff) | |
| download | meta-openembedded-f3862b744197c02393197e28c1fa426455f8a7e2.tar.gz | |
wireplumber: add ptest support
Execution takes <10s.
Sample output:
root@qemux86-64:~# ptest-runner
START: ptest-runner
2025-12-24T19:17
BEGIN: /usr/lib/wireplumber/ptest
PASS: ./wp/test-spa-json
PASS: ./wp/test-spa-pod
PASS: ./wp/test-spa-type
PASS: ./wp/test-properties
PASS: ./wp/test-core
PASS: ./wp/test-session-item
PASS: ./wp/test-json-utils
PASS: ./wp/test-events
PASS: ./wp/test-conf
PASS: ./wp/test-transition
PASS: ./wp/test-object-interest
PASS: ./wp/test-metadata
PASS: ./wp/test-object-manager
PASS: ./wp/test-factory
PASS: ./wp/test-settings
PASS: ./wp/test-proxy
PASS: ./wp/test-state
PASS: ./wp/test-component-loader
PASS: 00-test-linking-non-default-device-node.lua
PASS: 01-test-linking-non-default-device-node-capture.lua
PASS: 02-test-linking-default-device-node.lua
PASS: 03-test-linking-default-device-node-capture.lua
PASS: 04-test-linking-defined-device-node-target-object-string.lua
PASS: 05-test-linking-defined-device-node-target-object-int.lua
PASS: 06-test-linking-defined-device-node-target-object-name.lua
PASS: 07-test-linking-defined-device-node-target-object-string-capture.lua
PASS: 08-test-linking-defined-device-node-target-object-int-capture.lua
PASS: 09-test-linking-defined-device-node-target-object-name-capture.lua
PASS: 10-test-linking-defined-device-node-node-target.lua
PASS: 11-test-linking-defined-device-node-node-target-capture.lua
PASS: 12-test-linking-defined-device-node-target-node-metadata.lua
PASS: 13-test-linking-defined-device-node-target-node-metadata-capture.lua
PASS: 14-test-linking-defined-device-node-target-object-metadata.lua
PASS: 15-test-linking-defined-device-node-target-object-metadata-capture.lua
PASS: 16-test-linking-defined-device-node-target-object-int-metadata.lua
PASS: 17-test-linking-defined-device-node-target-object-int-metadata-capture.lua
PASS: 00-test-default-nodes-initial-metadata-update.lua
/usr/lib/wireplumber/ptest
PASS: pod.lua
PASS: json.lua
PASS: json-utils.lua
PASS: monitor-rules.lua
PASS: require.lua
PASS: async-activation.lua
PASS: settings.lua
PASS: event-hooks.lua
PASS: properties.lua
/usr/lib/wireplumber/ptest
PASS: ./wplua/test-wplua
PASS: ./modules/test-file-monitor
PASS: ./modules/test-si-node
PASS: ./modules/test-si-standard-link
PASS: ./modules/test-dbus-connection
PASS: ./modules/test-si-audio-adapter
PASS: ./modules/test-reserve-device
DURATION: 1
END: /usr/lib/wireplumber/ptest
2025-12-24T19:17
STOP: ptest-runner
TOTAL: 1 FAIL: 0
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/wireplumber/files')
| -rw-r--r-- | meta-multimedia/recipes-multimedia/wireplumber/files/run-ptest | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/wireplumber/files/run-ptest b/meta-multimedia/recipes-multimedia/wireplumber/files/run-ptest new file mode 100644 index 0000000000..a3682bd2b0 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/wireplumber/files/run-ptest | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | RET=0 | ||
| 3 | |||
| 4 | export HOME=/invalid | ||
| 5 | export XDG_RUNTIME_DIR=/invalid | ||
| 6 | export PIPEWIRE_RUNTIME_DIR=/tmp | ||
| 7 | export XDG_CONFIG_HOME=$(pwd)/.config | ||
| 8 | export XDG_STATE_HOME=$(pwd)/.local/state | ||
| 9 | export FILE_MONITOR_DIR=$(pwd)/.local/file_monitor | ||
| 10 | export WIREPLUMBER_MODULE_DIR=/usr/lib/wireplumber-0.5 | ||
| 11 | export G_TEST_SRCDIR=/usr/lib/wireplumber/ptest/data | ||
| 12 | |||
| 13 | run_scripted_test(){ | ||
| 14 | test_dir=$(dirname $1) | ||
| 15 | cd $test_dir | ||
| 16 | while read line; do | ||
| 17 | arg1=$(echo $line | cut -f1 -d" ") | ||
| 18 | arg2=$(echo $line | cut -f2 -d" ") | ||
| 19 | if ./script-tester $arg1 scripts/$arg2 > $arg2.out 2>&1; then | ||
| 20 | echo PASS: $arg2 | ||
| 21 | else | ||
| 22 | echo FAIL: $arg2 | ||
| 23 | RET=1 | ||
| 24 | fi | ||
| 25 | done < ./ptest-list | ||
| 26 | cd - | ||
| 27 | } | ||
| 28 | |||
| 29 | run_regular_test(){ | ||
| 30 | if ./$1 > $1.out 2>&1; then | ||
| 31 | echo PASS: $1 | ||
| 32 | else | ||
| 33 | echo FAIL: $1 | ||
| 34 | RET=1 | ||
| 35 | fi | ||
| 36 | } | ||
| 37 | |||
| 38 | run_test(){ | ||
| 39 | case $1 in | ||
| 40 | *run-ptest) | ||
| 41 | ;; | ||
| 42 | *script-tester) | ||
| 43 | run_scripted_test $1 | ||
| 44 | ;; | ||
| 45 | *) | ||
| 46 | run_regular_test $1 | ||
| 47 | ;; | ||
| 48 | esac | ||
| 49 | } | ||
| 50 | |||
| 51 | |||
| 52 | for t in $(find . -type f -executable); do | ||
| 53 | run_test $t | ||
| 54 | done | ||
| 55 | exit $RET | ||
