Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
myrrc committed Jul 23, 2024
1 parent 69dcb10 commit 24c9556
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 35 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ chmod +x prepare copy-configs test

If you don't use X11 you can have a look at `.github/workflows/wf.yml` to see how x11 is
emulated with Xvfb.
Use `./test -s` to skip first invocation which bypasses "Still evaluating" window.

### Writing tests

Expand Down
9 changes: 6 additions & 3 deletions tests/ignored_keys
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<TRACK
TRACKID
AUTOXFADE
CFGEDITVIEW
CURSOR
EGUID
FIXEDLANES
SEL
GUID
IGUID
IID
POOLEDEVTS
SEL
TRACKID
39 changes: 18 additions & 21 deletions tests/midi-sequence.RPP
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<REAPER_PROJECT 0.1 "7.18/linux-x86_64" 1721774381
<REAPER_PROJECT 0.1 "7.18/linux-x86_64" 1721777320
<NOTES 0 2
>
RIPPLE 0
GROUPOVERRIDE 0 0 0
AUTOXFADE 129
AUTOXFADE 1
ENVATTACH 3
POOLEDENVATTACH 0
MIXERUIFLAGS 11 48
Expand Down Expand Up @@ -77,15 +77,15 @@
MASTER_FX 1
MASTER_SEL 0
<MASTERPLAYSPEEDENV
EGUID {89A1B9B5-D7D8-BFD8-2992-B0BAB4D3FE6B}
EGUID {E8FA64DF-A2AF-3558-B24E-6C62FDE87CE6}
ACT 0 -1
VIS 0 1 1
LANEHEIGHT 0 0
ARM 0
DEFSHAPE 0 -1 -1
>
<TEMPOENVEX
EGUID {B7502895-AB7D-7A00-D5E4-6C2C5FAF6961}
EGUID {06912506-8A9F-8418-E463-5B91B53ABBAC}
ACT 1 -1
VIS 1 0 1
LANEHEIGHT 0 0
Expand All @@ -94,7 +94,7 @@
>
<PROJBAY
>
<TRACK {885401A6-46FE-9E9A-E45A-B2FB36C5BB38}
<TRACK {F34DB8F3-9FD0-C2BC-BA6D-2D935E41FED7}
NAME test
PEAKCOL 16576
BEAT -1
Expand All @@ -108,14 +108,14 @@
BUSCOMP 0 0 0 0 0
SHOWINMIX 1 0.6667 0.5 1 0.5 0 0 0
FIXEDLANES 9 0 0 0 0
SEL 0
SEL 1
REC 0 0 1 0 0 0 0 0
VU 2
TRACKHEIGHT 0 0 0 0 0 0 0
INQ 0 0 0 0.5 100 0 0 100
NCHAN 2
FX 1
TRACKID {885401A6-46FE-9E9A-E45A-B2FB36C5BB38}
TRACKID {F34DB8F3-9FD0-C2BC-BA6D-2D935E41FED7}
PERF 0
MIDIOUT -1
MAINSEND 1 0
Expand All @@ -129,40 +129,37 @@
FADEOUT 1 0 0 1 0 0 0
MUTE 0 0
SEL 0
IGUID {030D36A8-1351-2D00-57DD-68C7E7A97B72}
IID 2
IGUID {CBDD15F9-076E-951C-7931-A4A0798B5A11}
IID 1
NAME 01-test-MIDI
VOLPAN 1 0 1 -1
SOFFS 0 0
PLAYRATE 1 1 0 -1 0 0.0025
CHANMODE 0
GUID {75F588D9-810F-75BE-7F4B-05F180F9FC7E}
GUID {E68DB955-2317-5AC4-3F14-8B77DC8000F8}
<SOURCE MIDI
HASDATA 1 960 QN
CCINTERP 32
POOLEDEVTS {46D2B7DB-5A97-016A-6AAC-72567E6E3B54}
POOLEDEVTS {33AD4A31-6FC8-383B-ABBC-D29A1E25176A}
E 0 90 3f 60
E 120 80 3f 00
E 240 90 40 60
E 120 80 40 00
e 240 90 40 60
e 120 80 40 00
E 3360 b0 7b 00
CCINTERP 32
CHASE_CC_TAKEOFFS 1
GUID {206DAB37-ED67-0ECE-D3E3-7C636DB2DC1B}
GUID {AA1FAB4F-5634-A656-78D8-8A30B8A15A4B}
IGNTEMPO 0 120 4 4
SRCCOLOR 1
VELLANE -1 100 0 0 1
CFGEDITVIEW -1794.35132 0.226823 61 12 0 -1 0 0 0 0.5
SRCCOLOR 0
VELLANE -1 9 0 0 1
CFGEDITVIEW 0 0.226823 24 12 0 -1 0 0 0 0.5
KEYSNAP 0
TRACKSEL 0
EVTFILTER 0 -1 -1 -1 -1 0 0 0 0 -1 -1 -1 -1 0 -1 0 -1 -1
CFGEDIT 1 1 0 1 0 0 1 1 1 1 1 0.125 121 425 1175 833 0 0 0 0 0 0 0 0 0 0.5 0 0 1 64
CFGEDIT 1 1 0 1 0 0 1 1 1 1 1 0.125 0 0 1398 1430 0 0 0 0 0 0 0 0 0 0.5 0 0 1 64
>
>
>
<EXTENSIONS
<BR_CURSOR_POS 15
0.00000000000000
>
>
>
4 changes: 3 additions & 1 deletion tests/midi-sequence.rks
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
o
test
&Return
0
l
im
b
so
&space
so
a
2l
k
Expand Down
19 changes: 10 additions & 9 deletions tests/test
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/bin/bash
ret=0
[ $# -eq 0 ] && timeout 6 ./reaper/reaper -new -nosplash &>/dev/null # still evaluating
if [ $# -eq 0 ]; then
timeout 6 ./reaper/reaper -new -nosplash &>/dev/null # still evaluating
tests="*.rks"
else
tests=$@
fi

for test in *.rks; do
for test in $tests; do
echo "Running $test"
expected=${test%.rks}.RPP
out=out.RPP

./reaper/reaper -saveas $out -new -nosplash 1>stdout 2>stderr &
./reaper/reaper -saveas $out -new -nosplash &>/dev/null &
pid=$(echo $!)
sleep 1
xdotool search --onlyvisible --all reaper windowfocus
Expand All @@ -18,6 +23,7 @@ for test in *.rks; do
else
xdotool type "$cmd"
fi
sleep .1
done <$test

xdotool type " ps"
Expand All @@ -27,13 +33,8 @@ for test in *.rks; do
./compare $expected $out
diff_ret=$(echo $?)
echo "Test exit code $diff_ret"
echo Stdout:
cat stdout
echo Stderr:
cat stderr

ret=$(( ret + diff_ret ))
# rm $out stdout stderr
rm $out
done

exit $ret

0 comments on commit 24c9556

Please sign in to comment.