mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-10 14:55:06 +00:00
add furnace test suite
This commit is contained in:
parent
58c9edf9c1
commit
5a2a3a03c0
2 changed files with 34 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -9,3 +9,6 @@ linuxbuild/
|
|||
*.swp
|
||||
.cache/
|
||||
.DS_Store
|
||||
test/songs/
|
||||
test/delta/
|
||||
test/result/
|
||||
|
|
31
test/furnace-test.sh
Executable file
31
test/furnace-test.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
# renders all files in test/songs/ and outputs them for delta testing.
|
||||
# useful when doing changes to playback.
|
||||
# requires GNU parallel.
|
||||
|
||||
testDir=$(date +%Y%m%d%H%M%S)
|
||||
if [ -e "test/result" ]; then
|
||||
lastTest=$(ls "test/result" | tail -2 | head -1 || echo "")
|
||||
else
|
||||
lastTest=""
|
||||
fi
|
||||
|
||||
echo "lastTest is $lastTest"
|
||||
|
||||
echo "furnace test suite begin..."
|
||||
echo "--- STEP 1: render test files"
|
||||
mkdir -p "test/result/$testDir" || exit 1
|
||||
ls "test/songs/" | parallel --verbose -j4 ./build/furnace -output "test/result/$testDir/{0}.wav" "test/songs/{0}"
|
||||
echo "--- STEP 2: calculate deltas"
|
||||
if [ -z $lastTest ]; then
|
||||
echo "skipping since this apparently is your first run."
|
||||
else
|
||||
mkdir -p "test/delta/$testDir" || exit 1
|
||||
ls "test/result/$testDir/" | parallel --verbose -j4 ffmpeg -i "test/result/$lastTest/{0}" -i "test/result/$testDir/{0}" -filter_complex stereotools=phasel=1:phaser=1,amix=inputs=2:duration=longest -c:a pcm_s16le -y "test/delta/$testDir/{0}"
|
||||
fi
|
||||
echo "--- STEP 3: make delta images"
|
||||
if [ -z $lastTest ]; then
|
||||
echo "skipping since this apparently is your first run."
|
||||
else
|
||||
ls "test/result/$testDir/" | parallel --verbose -j4 ffmpeg -i "test/delta/$testDir/{0}" -lavfi showspectrumpic "test/delta/$testDir/{0}.png"
|
||||
fi
|
Loading…
Reference in a new issue