diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..312239f --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16ad415..c321df8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + lfs: true - name: install prerequisites - run: sudo apt-get install -y ${{ matrix.cc }} git2cl gtk-doc-tools w3-dtd-mathml libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-tools gstreamer1.0-plugins-base + run: sudo apt-get install -y ${{ matrix.cc }} git2cl gtk-doc-tools w3-dtd-mathml libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-tools gstreamer1.0-plugins-base gstreamer1.0-plugins-good - name: autogen run: ./autogen.sh - name: make @@ -48,6 +49,8 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 + with: + lfs: true - name: Install prerequisites shell: cmd run: | diff --git a/Makefile.am b/Makefile.am index 167f95a..d2261e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,4 +3,5 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man SUBDIRS = src doc EXTRA_DIST=INSTALL.Windows vs/gstpeaq.props \ vs/gstpeaq.vcxproj vs/peaq.vcxproj vs/gstpeaq.sln \ - INSTALL.OSX xcode/GstPEAQ.xcodeproj/project.pbxproj + INSTALL.OSX xcode/GstPEAQ.xcodeproj/project.pbxproj \ + test/stimulus_ref.wav test/stimulus_test.wav diff --git a/src/runtest-1.0.sh b/src/runtest-1.0.sh index deb3c67..d924412 100755 --- a/src/runtest-1.0.sh +++ b/src/runtest-1.0.sh @@ -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 \ + ${srcdir}/../test/stimulus_ref.wav ${srcdir}/../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 diff --git a/test/stimulus_ref.wav b/test/stimulus_ref.wav new file mode 100644 index 0000000..f6dca94 --- /dev/null +++ b/test/stimulus_ref.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:907a6e3fd0ece2d5a2e1bbbb17d436dbbf02099b12622517511d4a269081c2da +size 1910460 diff --git a/test/stimulus_test.wav b/test/stimulus_test.wav new file mode 100644 index 0000000..7165856 --- /dev/null +++ b/test/stimulus_test.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0892ec6eaabebb844a2362fbdbd00d475ae6c624031ed13c3f3ce14db750c35 +size 1910460 diff --git a/vs/runtest-win32.ps1 b/vs/runtest-win32.ps1 index 1a383bf..5a6466c 100644 --- a/vs/runtest-win32.ps1 +++ b/vs/runtest-win32.ps1 @@ -48,3 +48,10 @@ if ($ODG -ne -2.007) { throw "$ODG -ne -2.007" } +$ODG = [convert]::ToDouble(( ` + Invoke-Expression ("$PSScriptRoot\win32\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\win32\Release\gstpeaq.dll " + ` + "$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" +} diff --git a/vs/runtest-x64.ps1 b/vs/runtest-x64.ps1 index 6df1bd4..9b1a5c8 100644 --- a/vs/runtest-x64.ps1 +++ b/vs/runtest-x64.ps1 @@ -48,3 +48,10 @@ if ($ODG -ne -2.007) { throw "$ODG -ne -2.007" } +$ODG = [convert]::ToDouble(( ` + Invoke-Expression ("$PSScriptRoot\x64\Release\peaq.exe --gst-plugin-load=$PSScriptRoot\x64\Release\gstpeaq.dll " + ` + "$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" +}