[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (fe147037b0c73f9b82e85a17aa0dea70ef0a0c07)



The branch, master has been updated
       via  fe147037b0c73f9b82e85a17aa0dea70ef0a0c07 (commit)
       via  fce747a7e33e8923959034238d0ec0abbf6b68f4 (commit)
      from  c563086581240c5a569de5e68b9f7e9fdcf1ddd3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 Makefile.am                                     |    2 +-
 configure.ac                                    |   29 ++++++++++++++-
 tests/golden/Makefile.am                        |    3 +-
 tests/golden/{hid_bom2 => hid_png1}/Makefile.am |    3 +-
 tests/golden/hid_png1/gerber_oneline.png        |  Bin 0 -> 218 bytes
 tests/run_tests.sh                              |   44 ++++++++++++-----------
 tests/tests.list                                |   32 ++++++++++++++--
 7 files changed, 82 insertions(+), 31 deletions(-)
 copy tests/golden/{hid_bom2 => hid_png1}/Makefile.am (56%)
 create mode 100644 tests/golden/hid_png1/gerber_oneline.png


=================
 Commit Messages
=================

commit fe147037b0c73f9b82e85a17aa0dea70ef0a0c07
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Top level configure stuff for the testsuite.
    
    Add top level configure stuff missed in the previous few commits
    for the testsuite.

:100644 100644 f722455... 5beb0ce... M	Makefile.am
:100644 100644 529728b... 0efe7da... M	configure.ac

commit fce747a7e33e8923959034238d0ec0abbf6b68f4
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Teach the testsuite how to compare image files.
    
    Teach testsuite how to compare image files and add a very basic
    test on the PNG HID.

:100644 100644 54de48d... 1c7afa2... M	tests/golden/Makefile.am
:000000 100644 0000000... 8ef143b... A	tests/golden/hid_png1/Makefile.am
:000000 100644 0000000... be346ad... A	tests/golden/hid_png1/gerber_oneline.png
:100755 100755 fd96f11... 811113f... M	tests/run_tests.sh
:100644 100644 d4ca7fd... 8949763... M	tests/tests.list

=========
 Changes
=========

commit fe147037b0c73f9b82e85a17aa0dea70ef0a0c07
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Top level configure stuff for the testsuite.
    
    Add top level configure stuff missed in the previous few commits
    for the testsuite.

diff --git a/Makefile.am b/Makefile.am
index f722455..5beb0ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
 ##
 ## Top level automake file for PCB
 
-DIRS=		win32 intl src data lib newlib example tools tutorial README_FILES po
+DIRS=		win32 intl src data lib newlib example tools tutorial README_FILES po tests
 SUBDIRS=	${DIRS} @DOC@
 DIST_SUBDIRS=	${DIRS} doc
 
diff --git a/configure.ac b/configure.ac
index 529728b..0efe7da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -570,12 +570,24 @@ else
     AC_MSG_RESULT([yes])
     have_magick=yes
 fi
-AM_CONDITIONAL(HAVE_MAGICK, test x$have_magick = xyes)
+
+have_test_tools=yes
+
+test $have_magick = yes || have_test_tools=no
 
 # the RS274-X export HID is partially checked by looking at the result with
 # gerbv
 AC_PATH_PROG(GERBV, gerbv, notfound)
-AM_CONDITIONAL(MISSING_GERBV, test x$GERBV = xnotfound)
+test $GERBV != notfound || have_test_tools=no
+
+
+AM_CONDITIONAL(HAVE_TEST_TOOLS, test x$have_test_tools = xyes)
+AC_MSG_CHECKING([if all the requried testsuite tools were found])
+if test x$have_test_tools = xyes ; then
+	AC_MSG_RESULT([yes])
+else
+	AC_MSG_RESULT([no -- the testsuite will be disabled])
+fi
 
 
 #
@@ -1052,6 +1064,19 @@ if test -d $srcdir/tutorial; then
    AC_CONFIG_FILES(tutorial/Makefile)
 fi
 
+dnl testsuite
+AC_CONFIG_FILES(tests/inputs/Makefile)
+AC_CONFIG_FILES(tests/golden/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_bom1/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_bom2/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_bom3/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_bom4/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_gerber1/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_gerber2/Makefile)
+AC_CONFIG_FILES(tests/golden/hid_png1/Makefile)
+AC_CONFIG_FILES(tests/Makefile)
+
+dnl win32 build scripts
 AC_CONFIG_FILES(win32/Makefile)
 
 AC_OUTPUT

commit fce747a7e33e8923959034238d0ec0abbf6b68f4
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Teach the testsuite how to compare image files.
    
    Teach testsuite how to compare image files and add a very basic
    test on the PNG HID.

diff --git a/tests/golden/Makefile.am b/tests/golden/Makefile.am
index 54de48d..1c7afa2 100644
--- a/tests/golden/Makefile.am
+++ b/tests/golden/Makefile.am
@@ -6,5 +6,6 @@ SUBDIRS=	\
 	hid_bom3 \
 	hid_bom4 \
 	hid_gerber1 \
-	hid_gerber2
+	hid_gerber2 \
+	hid_png1
 
diff --git a/tests/golden/hid_png1/Makefile.am b/tests/golden/hid_png1/Makefile.am
new file mode 100644
index 0000000..8ef143b
--- /dev/null
+++ b/tests/golden/hid_png1/Makefile.am
@@ -0,0 +1,4 @@
+## -*- makefile -*-
+
+EXTRA_DIST= \
+	gerber_oneline.png
diff --git a/tests/golden/hid_png1/gerber_oneline.png b/tests/golden/hid_png1/gerber_oneline.png
new file mode 100644
index 0000000..be346ad
Binary files /dev/null and b/tests/golden/hid_png1/gerber_oneline.png differ
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index fd96f11..811113f 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -378,27 +378,7 @@ compare_rs274x() {
     debug "${GERBV} ${GERBV_DEFAULT_FLAGS} --output=${png2} ${f2}"
     ${GERBV} ${GERBV_DEFAULT_FLAGS} --output=${png2} ${f2}
 
-    # now see if the png files are the same
-    debug "${IM_COMPARE} -metric MAE ${png1} ${png2}  null:"
-    same=`${IM_COMPARE} -metric MAE ${png1} ${png2}  null: 2>&1 | \
-          ${AWK} '{if($1 == 0){print "yes"} else {print "no"}}'`
-    debug "compare_rs274x():  same = $same"
-
-    if test "$same" != yes ; then
-	test_failed=yes
-	echo "FAILED:  See ${errdir}"
-	mkdir -p ${errdir}
-	${IM_COMPARE} ${png1} ${png2} ${errdir}/compare.png
-	${IM_COMPOSITE} ${png1} ${png2} -compose difference ${errdir}/composite.png
-	${IM_CONVERT} ${png1} ${png2} -compose difference -composite  -colorspace gray   ${errdir}/gray.png
-	cat > ${errdir}/animate.sh << EOF
-#!/bin/sh
-${IM_CONVERT} -label "%f" ${png1} ${png2} miff:- | \
-${IM_MONTAGE} - -geometry +0+0 -tile 1x1 miff:- | \
-${IM_ANIMATE} -delay 0.5 -loop 0 -
-EOF
-	chmod a+x ${errdir}/animate.sh
-    fi
+    compare_image ${png1} ${png2}
 
 }
 
@@ -415,6 +395,28 @@ compare_image() {
     f1="$1"
     f2="$2"
     compare_check "compare_image" "$f1" "$f2" || return 1
+
+    # now see if the image files are the same
+    debug "${IM_COMPARE} -metric MAE ${f1} ${f2}  null:"
+    same=`${IM_COMPARE} -metric MAE ${f1} ${f2}  null: 2>&1 | \
+          ${AWK} '{if($1 == 0){print "yes"} else {print "no"}}'`
+    debug "compare_image():  same = $same"
+
+    if test "$same" != yes ; then
+	test_failed=yes
+	echo "FAILED:  See ${errdir}"
+	mkdir -p ${errdir}
+	${IM_COMPARE} ${f1} ${f2} ${errdir}/compare.png
+	${IM_COMPOSITE} ${f1} ${f2} -compose difference ${errdir}/composite.png
+	${IM_CONVERT} ${f1} ${f2} -compose difference -composite  -colorspace gray   ${errdir}/gray.png
+	cat > ${errdir}/animate.sh << EOF
+#!/bin/sh
+${IM_CONVERT} -label "%f" ${f1} ${f2} miff:- | \
+${IM_MONTAGE} - -geometry +0+0 -tile 1x1 miff:- | \
+${IM_ANIMATE} -delay 0.5 -loop 0 -
+EOF
+	chmod a+x ${errdir}/animate.sh
+    fi
 }
 
 ##########################################################################
diff --git a/tests/tests.list b/tests/tests.list
index d4ca7fd..8949763 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -93,10 +93,7 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | |  bom:bom_general.bom xy:bom_ge
 ######################################################################
 #
 # options:
-#  --bomfile <string>             BOM output file
-#  --xyfile <string>              XY output file
-#  --xy-in-mm                     XY dimensions in mm instead of mils
-#
+#  --gerberfile <string>          Basename for output file
 #
 # Produces RS274-X (a.k.a. gerber) photo plot files and Excellon drill files
 #
@@ -106,3 +103,30 @@ hid_gerber2 | gerber_oneline.pcb | gerber | --gerberfile out | | gbx:out.back.gb
 #
 
 
+######################################################################
+# ---------------------------------------------
+# PNG export HID
+# ---------------------------------------------
+######################################################################
+#
+# options:
+#   --outfile <string>             Graphics output file
+#   --dpi <num>                    Scale factor (pixels/inch). 0 to scale to fix specified size
+#   --x-max <num>                  Maximum width (pixels).  0 to not constrain.
+#   --y-max <num>                  Maximum height (pixels).  0 to not constrain.
+#   --xy-max <num>                 Maximum width and height (pixels).  0 to not constrain.
+#   --as-shown                     Export layers as shown on screen
+#   --monochrome                   Convert to monochrome
+#   --only-visible                 Limit the bounds of the PNG file to the visible items
+#   --use-alpha                    Make the background and any holes transparent
+#   --format <GIF|JPEG|PNG>        Graphics file format
+#   --photo-mode                   Photo-realistic mode
+#   --photo-flip-x                 Show reverse side of the board, left-right flip
+#   --photo-flip-y                 Show reverse side of the board, up-down flip
+#
+# Produces GIF/JPEG/PNG (image) files
+#
+hid_png1 | gerber_oneline.pcb | png | | | png:gerber_oneline.png
+#
+
+




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs