1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

rename sch2fig to eeshow

This commit is contained in:
Werner Almesberger
2016-08-02 11:00:08 -03:00
parent 590724e3bb
commit a941a5f246
42 changed files with 5910 additions and 0 deletions

24
eeshow/test/README Normal file
View 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

29
eeshow/test/comp Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/sh
usage()
{
echo "usage: $0 [dir]" 1>&2
exit 1
}
[ "$2" ] && usage
[ "${1#-}" != "$1" ] && usage
dir=${1:-.}
diffs=0
rm -f $dir/_diff*png
for n in $dir/out*.png; do
out=`basename "$n"`
ref=$dir/ref${out#out}
diff=$dir/_diff${out#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

37
eeshow/test/genpng Executable file
View File

@@ -0,0 +1,37 @@
#!/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 38 ]; do
echo -n .
sn=`printf '%02d' $sheet`
file=$dir/$prefix$sn.png
if [ $sheet = 1 ]; then
in=$dir/neo900-ee/hw/neo900.sch
else
in=$dir/neo900-ee/hw/neo900_SS_`expr $sheet - 1`.sch
fi
file=$dir/$prefix$sn.png
$dir/../eeshow $dir/neo900-ee/hw/neo900.lib \
$dir/kicad-libs/components/powered.lib "$in" \
-- fig -t $dir/frame.fig SHEET=$sn |
fig2dev -L png -m 2 >$file
sheet=`expr $sheet + 1`
done
echo