mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-23 21:22:24 +02:00
sch2fig/test/: tools for comparison with reference results
This commit is contained in:
parent
c2e1d60e2e
commit
ab612b4eb2
24
sch2fig/test/README
Normal file
24
sch2fig/test/README
Normal file
@ -0,0 +1,24 @@
|
||||
Setup
|
||||
-----
|
||||
|
||||
git clone https://neo900.org/git/ee.git neo900-ee
|
||||
cd neo900-ee
|
||||
git reset --hard 57eebdcf573311c049bc57527bc03a517aff0fef
|
||||
|
||||
cd ..
|
||||
|
||||
git clone git://projects.qi-hardware.com/kicad-libs.git
|
||||
cd kicad-libs
|
||||
git reset --hard 143fa7fe10cabbfe1cb12d010c7426d482d7e6f4
|
||||
|
||||
cd ..
|
||||
|
||||
./genpng ref
|
||||
|
||||
|
||||
Run test
|
||||
--------
|
||||
|
||||
./genpng
|
||||
./comp
|
||||
qiv -t _diff*.png
|
15
sch2fig/test/comp
Executable file
15
sch2fig/test/comp
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
diffs=0
|
||||
rm -f _diff*png
|
||||
for n in out*.png; do
|
||||
ref=ref${n#out}
|
||||
diff=_diff${n#out}
|
||||
if ! compare -metric AE $ref $n - >/dev/null; then
|
||||
diffs=`expr $diffs + 1`
|
||||
compare -metric AE $ref $n $diff
|
||||
fi
|
||||
done
|
||||
echo
|
||||
[ $diffs = 0 ] && exit 0
|
||||
echo "$diffs difference(s)" 1>&2
|
||||
exit 1
|
32
sch2fig/test/genpng
Executable file
32
sch2fig/test/genpng
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: $0 [[dir] prefix]" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
[ "$3" ] && usage
|
||||
[ "${1#-}" != "$1" ] && usage
|
||||
|
||||
dir=.
|
||||
if [ "$2" ]; then
|
||||
dir=$1
|
||||
shift
|
||||
fi
|
||||
prefix=${1:-out}
|
||||
|
||||
sheet=1
|
||||
while [ $sheet -le 37 ]; do
|
||||
echo -n .
|
||||
sn=`printf '%02d' $sheet`
|
||||
file=$dir/$prefix$sn.png
|
||||
$dir/../sch2fig -DSHEET=$sn -t $dir/frame.fig \
|
||||
$dir/neo900-ee/hw/neo900.lib \
|
||||
$dir/kicad-libs/components/powered.lib \
|
||||
$dir/neo900-ee/hw/neo900_SS_$sheet.sch |
|
||||
fig2dev -L png -m 2 >$file
|
||||
sheet=`expr $sheet + 1`
|
||||
done
|
||||
echo
|
Loading…
Reference in New Issue
Block a user