Skip to content

Commit

Permalink
Add a test using the peaq executable with WAV input
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Jun 26, 2024
1 parent 700678d commit b92a94e
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
test/stimulus_ref.wav filter=lfs diff=lfs merge=lfs -text
test/stimulus_test.wav filter=lfs diff=lfs merge=lfs -text
8 changes: 8 additions & 0 deletions src/runtest-1.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ echo $ODG
if [ x$ODG != x-2.007 ]; then
exit 1
fi

ODG=`LC_ALL=C ./peaq --gst-disable-segtrap --gst-debug-level=2 --gst-plugin-load=.libs/libgstpeaq.so \
../test/stimulus_ref.wav ../test/stimulus_test.wav \
| grep "Objective Difference Grade:" | cut -d " " -f4`
echo $ODG
if [ x$ODG != x-1.077 ]; then
exit 1
fi
exit 0
3 changes: 3 additions & 0 deletions test/stimulus_ref.wav
Git LFS file not shown
3 changes: 3 additions & 0 deletions test/stimulus_test.wav
Git LFS file not shown
7 changes: 7 additions & 0 deletions vs/runtest-win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ if ($ODG -ne -2.007) {
throw "$ODG -ne -2.007"
}

$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\win32\Release\peaq.exe " + `
"$PSScriptRoot\..\test\stimulus_ref.wav $PSScriptRoot\..\test\stimulus_test.wav") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -1.077) {
throw "$ODG -ne -1.077"
}
7 changes: 7 additions & 0 deletions vs/runtest-x64.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ if ($ODG -ne -2.007) {
throw "$ODG -ne -2.007"
}

$ODG = [convert]::ToDouble(( `
Invoke-Expression ("$PSScriptRoot\x64\Release\peaq.exe " + `
"$PSScriptRoot\..\test\stimulus_ref.wav $PSScriptRoot\..\test\stimulus_test.wav") `
| Select-String -Pattern 'Objective Difference Grade: (.*)').Matches.Groups[1].Value)
if ($ODG -ne -1.077) {
throw "$ODG -ne -1.077"
}

0 comments on commit b92a94e

Please sign in to comment.