mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Wire up the (available) tests.
This commit is contained in:
72
mkninja.sh
72
mkninja.sh
@@ -36,7 +36,7 @@ rule test
|
|||||||
description = TEST \$in
|
description = TEST \$in
|
||||||
|
|
||||||
rule encodedecode
|
rule encodedecode
|
||||||
command = sh scripts/encodedecodetest.sh \$format > \$out
|
command = sh scripts/encodedecodetest.sh \$format \$configs > \$out
|
||||||
description = ENCODEDECODE \$format
|
description = ENCODEDECODE \$format
|
||||||
|
|
||||||
rule strip
|
rule strip
|
||||||
@@ -262,9 +262,11 @@ runtest() {
|
|||||||
encodedecodetest() {
|
encodedecodetest() {
|
||||||
local format
|
local format
|
||||||
format=$1
|
format=$1
|
||||||
|
shift
|
||||||
|
|
||||||
echo "build $OBJDIR/$format.encodedecode.stamp : encodedecode | fluxengine scripts/encodedecodetest.sh"
|
echo "build $OBJDIR/$format.encodedecode.stamp : encodedecode | fluxengine scripts/encodedecodetest.sh $*"
|
||||||
echo " format=$format"
|
echo " format=$format"
|
||||||
|
echo " configs=$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildlibrary libagg.a \
|
buildlibrary libagg.a \
|
||||||
@@ -386,8 +388,13 @@ buildlibrary libbackend.a \
|
|||||||
lib/utils.cc \
|
lib/utils.cc \
|
||||||
lib/writer.cc \
|
lib/writer.cc \
|
||||||
|
|
||||||
RWFORMATS="\
|
FORMATS="\
|
||||||
|
acornadfs \
|
||||||
|
acorndfs \
|
||||||
|
aeslanier \
|
||||||
amiga \
|
amiga \
|
||||||
|
ampro \
|
||||||
|
apple2 \
|
||||||
atarist360 \
|
atarist360 \
|
||||||
atarist370 \
|
atarist370 \
|
||||||
atarist400 \
|
atarist400 \
|
||||||
@@ -400,49 +407,41 @@ RWFORMATS="\
|
|||||||
brother240 \
|
brother240 \
|
||||||
commodore1541 \
|
commodore1541 \
|
||||||
commodore1581 \
|
commodore1581 \
|
||||||
|
eco1 \
|
||||||
|
f85 \
|
||||||
|
fb100 \
|
||||||
|
hplif770 \
|
||||||
|
ibm \
|
||||||
ibm1200_525 \
|
ibm1200_525 \
|
||||||
ibm1440 \
|
ibm1440 \
|
||||||
ibm180_525 \
|
ibm180_525 \
|
||||||
ibm360_525 \
|
ibm360_525 \
|
||||||
ibm720 \
|
ibm720 \
|
||||||
ibm720_525 \
|
ibm720_525 \
|
||||||
mac800 \
|
|
||||||
northstar87 \
|
|
||||||
northstar175 \
|
|
||||||
northstar350 \
|
|
||||||
tids990 \
|
|
||||||
"
|
|
||||||
|
|
||||||
ROFORMATS="\
|
|
||||||
acornadfs \
|
|
||||||
acorndfs \
|
|
||||||
aeslanier \
|
|
||||||
ampro \
|
|
||||||
apple2 \
|
|
||||||
eco1 \
|
|
||||||
f85 \
|
|
||||||
fb100 \
|
|
||||||
hplif770 \
|
|
||||||
ibm \
|
|
||||||
mac400 \
|
mac400 \
|
||||||
|
mac800 \
|
||||||
micropolis \
|
micropolis \
|
||||||
mx \
|
mx \
|
||||||
|
northstar175 \
|
||||||
|
northstar350 \
|
||||||
|
northstar87 \
|
||||||
|
tids990 \
|
||||||
victor9k \
|
victor9k \
|
||||||
zilogmcz \
|
zilogmcz \
|
||||||
"
|
"
|
||||||
|
|
||||||
for pb in $RWFORMATS $ROFORMATS; do
|
for pb in $FORMATS; do
|
||||||
buildencodedproto $OBJDIR/proto/libconfig.def ConfigProto \
|
buildencodedproto $OBJDIR/proto/libconfig.def ConfigProto \
|
||||||
formats_${pb}_pb src/formats/$pb.textpb $OBJDIR/proto/src/formats/$pb.cc
|
formats_${pb}_pb src/formats/$pb.textpb $OBJDIR/proto/src/formats/$pb.cc
|
||||||
done
|
done
|
||||||
|
|
||||||
buildmktable formats $OBJDIR/formats.cc $RWFORMATS $ROFORMATS
|
buildmktable formats $OBJDIR/formats.cc $FORMATS
|
||||||
|
|
||||||
buildlibrary libfrontend.a \
|
buildlibrary libfrontend.a \
|
||||||
-I$OBJDIR/proto \
|
-I$OBJDIR/proto \
|
||||||
-d $OBJDIR/proto/libconfig.def \
|
-d $OBJDIR/proto/libconfig.def \
|
||||||
-d $OBJDIR/proto/libdata.def \
|
-d $OBJDIR/proto/libdata.def \
|
||||||
$(for a in $RWFORMATS $ROFORMATS; do echo $OBJDIR/proto/src/formats/$a.cc; done) \
|
$(for a in $FORMATS; do echo $OBJDIR/proto/src/formats/$a.cc; done) \
|
||||||
$OBJDIR/formats.cc \
|
$OBJDIR/formats.cc \
|
||||||
src/fe-analysedriveresponse.cc \
|
src/fe-analysedriveresponse.cc \
|
||||||
src/fe-analyselayout.cc \
|
src/fe-analyselayout.cc \
|
||||||
@@ -507,9 +506,28 @@ runtest proto-test -I$OBJDIR/proto \
|
|||||||
tests/proto.cc \
|
tests/proto.cc \
|
||||||
$OBJDIR/proto/tests/testproto.cc
|
$OBJDIR/proto/tests/testproto.cc
|
||||||
|
|
||||||
for f in $RWFORMATS; do
|
encodedecodetest amiga
|
||||||
encodedecodetest $f
|
encodedecodetest atarist360
|
||||||
done
|
encodedecodetest atarist370
|
||||||
|
encodedecodetest atarist400
|
||||||
|
encodedecodetest atarist410
|
||||||
|
encodedecodetest atarist720
|
||||||
|
encodedecodetest atarist740
|
||||||
|
encodedecodetest atarist800
|
||||||
|
encodedecodetest atarist820
|
||||||
|
encodedecodetest brother120
|
||||||
|
encodedecodetest brother240
|
||||||
|
encodedecodetest ibm1200_525
|
||||||
|
encodedecodetest ibm1440
|
||||||
|
encodedecodetest ibm180_525
|
||||||
|
encodedecodetest ibm360_525
|
||||||
|
encodedecodetest ibm720
|
||||||
|
encodedecodetest ibm720_525
|
||||||
|
encodedecodetest tids990
|
||||||
|
encodedecodetest commodore1581
|
||||||
|
encodedecodetest commodore1541 scripts/commodore1541_test.textpb
|
||||||
|
encodedecodetest mac400 scripts/mac400_test.textpb
|
||||||
|
encodedecodetest mac800 scripts/mac800_test.textpb
|
||||||
|
|
||||||
# vim: sw=4 ts=4 et
|
# vim: sw=4 ts=4 et
|
||||||
|
|
||||||
|
|||||||
8
scripts/commodore1541_test.textpb
Normal file
8
scripts/commodore1541_test.textpb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
image_reader {
|
||||||
|
d64 {}
|
||||||
|
}
|
||||||
|
|
||||||
|
image_writer {
|
||||||
|
d64 {}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -5,13 +5,14 @@ srcfile=$tmp.src.img
|
|||||||
fluxfile=$tmp.flux
|
fluxfile=$tmp.flux
|
||||||
destfile=$tmp.dest.img
|
destfile=$tmp.dest.img
|
||||||
format=$1
|
format=$1
|
||||||
|
shift
|
||||||
|
|
||||||
trap "rm -f $srcfile $fluxfile $destfile" EXIT
|
trap "rm -f $srcfile $fluxfile $destfile" EXIT
|
||||||
|
|
||||||
dd if=/dev/urandom of=$srcfile bs=1M count=2 2>1
|
dd if=/dev/urandom of=$srcfile bs=1M count=2 2>1
|
||||||
|
|
||||||
./fluxengine write $format -i $srcfile -d $fluxfile
|
./fluxengine write $format -i $srcfile -d $fluxfile "$@"
|
||||||
./fluxengine read $format -s $fluxfile -o $destfile
|
./fluxengine read $format -s $fluxfile -o $destfile "$@"
|
||||||
if [ ! -s $destfile ]; then
|
if [ ! -s $destfile ]; then
|
||||||
echo "Zero length output file!" >&2
|
echo "Zero length output file!" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
70
scripts/mac400_test.textpb
Normal file
70
scripts/mac400_test.textpb
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
image_reader {
|
||||||
|
img {
|
||||||
|
tracks: 80
|
||||||
|
sides: 1
|
||||||
|
trackdata {
|
||||||
|
sector_size: 524
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 0
|
||||||
|
up_to_track: 15
|
||||||
|
sectors: 12
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 16
|
||||||
|
up_to_track: 31
|
||||||
|
sectors: 11
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 32
|
||||||
|
up_to_track: 47
|
||||||
|
sectors: 10
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 48
|
||||||
|
up_to_track: 63
|
||||||
|
sectors: 9
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 64
|
||||||
|
up_to_track: 79
|
||||||
|
sectors: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image_writer {
|
||||||
|
img {
|
||||||
|
tracks: 80
|
||||||
|
sides: 1
|
||||||
|
trackdata {
|
||||||
|
sector_size: 524
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 0
|
||||||
|
up_to_track: 15
|
||||||
|
sectors: 12
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 16
|
||||||
|
up_to_track: 31
|
||||||
|
sectors: 11
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 32
|
||||||
|
up_to_track: 47
|
||||||
|
sectors: 10
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 48
|
||||||
|
up_to_track: 63
|
||||||
|
sectors: 9
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 64
|
||||||
|
up_to_track: 79
|
||||||
|
sectors: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
70
scripts/mac800_test.textpb
Normal file
70
scripts/mac800_test.textpb
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
image_reader {
|
||||||
|
img {
|
||||||
|
tracks: 80
|
||||||
|
sides: 2
|
||||||
|
trackdata {
|
||||||
|
sector_size: 524
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 0
|
||||||
|
up_to_track: 15
|
||||||
|
sectors: 12
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 16
|
||||||
|
up_to_track: 31
|
||||||
|
sectors: 11
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 32
|
||||||
|
up_to_track: 47
|
||||||
|
sectors: 10
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 48
|
||||||
|
up_to_track: 63
|
||||||
|
sectors: 9
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 64
|
||||||
|
up_to_track: 79
|
||||||
|
sectors: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
image_writer {
|
||||||
|
img {
|
||||||
|
tracks: 80
|
||||||
|
sides: 2
|
||||||
|
trackdata {
|
||||||
|
sector_size: 524
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 0
|
||||||
|
up_to_track: 15
|
||||||
|
sectors: 12
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 16
|
||||||
|
up_to_track: 31
|
||||||
|
sectors: 11
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 32
|
||||||
|
up_to_track: 47
|
||||||
|
sectors: 10
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 48
|
||||||
|
up_to_track: 63
|
||||||
|
sectors: 9
|
||||||
|
}
|
||||||
|
trackdata {
|
||||||
|
track: 64
|
||||||
|
up_to_track: 79
|
||||||
|
sectors: 8
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user