mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Added semi-automatic test scripts
This commit is contained in:
parent
63a3ad5e90
commit
5e70bc7bd7
21
sound/tests/output/audiere_source_test.out
Normal file
21
sound/tests/output/audiere_source_test.out
Normal file
@ -0,0 +1,21 @@
|
||||
Reading cow.raw first
|
||||
Size: 37502
|
||||
Done
|
||||
|
||||
Loading cow.wav by filename:
|
||||
Source size: 37502
|
||||
rate=11025
|
||||
channels=1
|
||||
bits=16
|
||||
Reading entire buffer into memory
|
||||
Comparing...
|
||||
Done
|
||||
|
||||
Loading cow.wav by stream:
|
||||
Source size: 37502
|
||||
rate=11025
|
||||
channels=1
|
||||
bits=16
|
||||
Reading entire buffer into memory
|
||||
Comparing...
|
||||
Done
|
12
sound/tests/output/ffmpeg_source_test.out
Normal file
12
sound/tests/output/ffmpeg_source_test.out
Normal file
@ -0,0 +1,12 @@
|
||||
Reading cow.raw first
|
||||
Size: 37502
|
||||
Done
|
||||
|
||||
Loading cow.wav by filename:
|
||||
rate=11025
|
||||
channels=1
|
||||
bits=16
|
||||
Reading entire buffer into memory
|
||||
Actually read: 37502
|
||||
Comparing...
|
||||
Done
|
3
sound/tests/output/openal_audiere_test.out
Normal file
3
sound/tests/output/openal_audiere_test.out
Normal file
@ -0,0 +1,3 @@
|
||||
Playing cow.wav
|
||||
Playing owl.ogg
|
||||
Playing cow.wav (from stream)
|
5
sound/tests/output/openal_output_test.out
Normal file
5
sound/tests/output/openal_output_test.out
Normal file
@ -0,0 +1,5 @@
|
||||
Loading cow.raw
|
||||
rate=11025
|
||||
channels=1
|
||||
bits=16
|
||||
Playing
|
18
sound/tests/test.sh
Executable file
18
sound/tests/test.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
make || exit
|
||||
|
||||
mkdir -p output
|
||||
|
||||
PROGS=*_test
|
||||
|
||||
for a in $PROGS; do
|
||||
if [ -f "output/$a.out" ]; then
|
||||
echo "Running $a:"
|
||||
$a | diff output/$a.out -
|
||||
else
|
||||
echo "Creating $a.out"
|
||||
$a > "output/$a.out"
|
||||
git add "output/$a.out"
|
||||
fi
|
||||
done
|
9
stream/tests/output/audiere_client_test.out
Normal file
9
stream/tests/output/audiere_client_test.out
Normal file
@ -0,0 +1,9 @@
|
||||
pos=0
|
||||
2 bytes: he
|
||||
pos=2
|
||||
pos=4
|
||||
3 bytes: o w
|
||||
pos=6
|
||||
pos=7
|
||||
last 4 bytes: orld
|
||||
entire stream: hello world
|
22
stream/tests/output/buffer_filter_test.out
Normal file
22
stream/tests/output/buffer_filter_test.out
Normal file
@ -0,0 +1,22 @@
|
||||
Size: 11
|
||||
Pos: 0
|
||||
Seeking...
|
||||
Pos: 3
|
||||
Reading: 4
|
||||
Four bytes: lo w
|
||||
Eof: 0
|
||||
Pos: 7
|
||||
Seeking again...
|
||||
Pos: 11
|
||||
Eof: 1
|
||||
Seek to 6
|
||||
Eof: 0
|
||||
Pos: 6
|
||||
Over-reading: 5
|
||||
Result: world
|
||||
Eof: 1
|
||||
Pos: 11
|
||||
Finally, reading the entire string: 11
|
||||
Result: hello world
|
||||
Eof: 1
|
||||
Pos: 11
|
3
stream/tests/output/file_server_test.out
Normal file
3
stream/tests/output/file_server_test.out
Normal file
@ -0,0 +1,3 @@
|
||||
pos=0 eof=0
|
||||
First 20 bytes: #include "../servers
|
||||
pos=20 eof=0
|
23
stream/tests/output/memory_server_test.out
Normal file
23
stream/tests/output/memory_server_test.out
Normal file
@ -0,0 +1,23 @@
|
||||
Size: 12
|
||||
Pos: 0
|
||||
Seeking...
|
||||
Pos: 3
|
||||
Reading: 4
|
||||
Four bytes: lo w
|
||||
Eof: 0
|
||||
Pos: 7
|
||||
Seeking again...
|
||||
Pos: 12
|
||||
Eof: 1
|
||||
Seek to 6
|
||||
Eof: 0
|
||||
Pos: 6
|
||||
Over-reading: 6
|
||||
Result: world
|
||||
Eof: 1
|
||||
Pos: 12
|
||||
Finally, reading the entire string: 11
|
||||
Result: hello world
|
||||
Eof: 0
|
||||
Pos: 11
|
||||
Entire stream from pointer: hello world
|
5
stream/tests/output/ogre_client_test.out
Normal file
5
stream/tests/output/ogre_client_test.out
Normal file
@ -0,0 +1,5 @@
|
||||
Name: hello
|
||||
As string: hello world
|
||||
pos=11 eof=1
|
||||
pos=0 eof=0
|
||||
pos=3 eof=0
|
36
stream/tests/output/slice_filter_test.out
Normal file
36
stream/tests/output/slice_filter_test.out
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
Slice 1:
|
||||
--------
|
||||
Size: 6
|
||||
Pos: 0
|
||||
Seeking...
|
||||
Reading 6 bytes
|
||||
Result: hello
|
||||
Pos: 6
|
||||
Eof: 1
|
||||
Seeking:
|
||||
Pos: 2
|
||||
Eof: 0
|
||||
Reading 4 bytes
|
||||
Result: llo
|
||||
Pos: 6
|
||||
Eof: 1
|
||||
Entire stream as pointer: hello
|
||||
|
||||
Slice 2:
|
||||
--------
|
||||
Size: 6
|
||||
Pos: 0
|
||||
Seeking...
|
||||
Reading 6 bytes
|
||||
Result: world
|
||||
Pos: 6
|
||||
Eof: 1
|
||||
Seeking:
|
||||
Pos: 2
|
||||
Eof: 0
|
||||
Reading 4 bytes
|
||||
Result: rld
|
||||
Pos: 6
|
||||
Eof: 1
|
||||
Entire stream as pointer: world
|
18
stream/tests/test.sh
Executable file
18
stream/tests/test.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
make || exit
|
||||
|
||||
mkdir -p output
|
||||
|
||||
PROGS=*_test
|
||||
|
||||
for a in $PROGS; do
|
||||
if [ -f "output/$a.out" ]; then
|
||||
echo "Running $a:"
|
||||
$a | diff output/$a.out -
|
||||
else
|
||||
echo "Creating $a.out"
|
||||
$a > "output/$a.out"
|
||||
git add "output/$a.out"
|
||||
fi
|
||||
done
|
13
testall.sh
Executable file
13
testall.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
function run()
|
||||
{
|
||||
cd "$1/tests/"
|
||||
./test.sh
|
||||
cd ../../
|
||||
}
|
||||
|
||||
run stream
|
||||
run vfs
|
||||
run sound
|
||||
run .
|
1
tests/output/ogrevfs_audiere_openal_test.out
Normal file
1
tests/output/ogrevfs_audiere_openal_test.out
Normal file
@ -0,0 +1 @@
|
||||
Playing 'owl.ogg' from 'sound.zip'
|
18
tests/test.sh
Executable file
18
tests/test.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
make || exit
|
||||
|
||||
mkdir -p output
|
||||
|
||||
PROGS=*_test
|
||||
|
||||
for a in $PROGS; do
|
||||
if [ -f "output/$a.out" ]; then
|
||||
echo "Running $a:"
|
||||
$a | diff output/$a.out -
|
||||
else
|
||||
echo "Creating $a.out"
|
||||
$a > "output/$a.out"
|
||||
git add "output/$a.out"
|
||||
fi
|
||||
done
|
31
vfs/tests/output/dummy_test.out
Normal file
31
vfs/tests/output/dummy_test.out
Normal file
@ -0,0 +1,31 @@
|
||||
Listing all files:
|
||||
name: file1
|
||||
basename: file1
|
||||
isDir: 0
|
||||
size: 1
|
||||
time: 0
|
||||
name: dir/file2
|
||||
basename: file2
|
||||
isDir: 0
|
||||
size: 2
|
||||
time: 0
|
||||
|
||||
Stat for single files:
|
||||
name: file1
|
||||
basename: file1
|
||||
isDir: 0
|
||||
size: 1
|
||||
time: 0
|
||||
|
||||
name: dir/file2
|
||||
basename: file2
|
||||
isDir: 0
|
||||
size: 2
|
||||
time: 0
|
||||
|
||||
name: dir
|
||||
basename: dir
|
||||
isDir: 1
|
||||
size: 0
|
||||
time: 0
|
||||
filesize: 11
|
12
vfs/tests/output/ogre_client_test.out
Normal file
12
vfs/tests/output/ogre_client_test.out
Normal file
@ -0,0 +1,12 @@
|
||||
Case: 1
|
||||
Name: dummy
|
||||
Type: Mangle
|
||||
All files:
|
||||
file1
|
||||
dir/file2
|
||||
Non-recursive:
|
||||
file1
|
||||
Dirs:
|
||||
dir
|
||||
filesize: 11
|
||||
contents: hello world
|
20
vfs/tests/output/ogre_resource_test.out
Normal file
20
vfs/tests/output/ogre_resource_test.out
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
File: Makefile
|
||||
Size: 814
|
||||
First line: GCC=g++ -I../
|
||||
|
||||
File: ogre_resource_test.cpp
|
||||
Size: 1437
|
||||
First line: #include <iostream>
|
||||
|
||||
File: bleh
|
||||
Does not exist
|
||||
|
||||
All source files:
|
||||
physfs_server_test.cpp
|
||||
dummy_test.cpp
|
||||
ogre_resource_test.cpp
|
||||
server_common.cpp
|
||||
dummy_vfs.cpp
|
||||
ogre_client_test.cpp
|
||||
ogre_server_test.cpp
|
11
vfs/tests/output/ogre_server_test.out
Normal file
11
vfs/tests/output/ogre_server_test.out
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
File: Makefile
|
||||
Size: 814
|
||||
First 12 bytes: GCC=g++ -I..
|
||||
|
||||
File: testfile.txt
|
||||
Size: 13
|
||||
First 12 bytes: hello world!
|
||||
|
||||
File: blah_bleh
|
||||
File doesn't exist
|
11
vfs/tests/output/physfs_server_test.out
Normal file
11
vfs/tests/output/physfs_server_test.out
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
File: Makefile
|
||||
Size: 814
|
||||
First 12 bytes: GCC=g++ -I..
|
||||
|
||||
File: testfile.txt
|
||||
Size: 13
|
||||
First 12 bytes: hello world!
|
||||
|
||||
File: blah_bleh
|
||||
File doesn't exist
|
18
vfs/tests/test.sh
Executable file
18
vfs/tests/test.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
make || exit
|
||||
|
||||
mkdir -p output
|
||||
|
||||
PROGS=*_test
|
||||
|
||||
for a in $PROGS; do
|
||||
if [ -f "output/$a.out" ]; then
|
||||
echo "Running $a:"
|
||||
$a | diff output/$a.out -
|
||||
else
|
||||
echo "Creating $a.out"
|
||||
$a > "output/$a.out"
|
||||
git add "output/$a.out"
|
||||
fi
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user