[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (91ba9f3a8b5a71914d928aad1e545a154c3678f5)
The branch, master has been updated
via 91ba9f3a8b5a71914d928aad1e545a154c3678f5 (commit)
via 802576013b5d780cd87caafa31c694279ee2dc4f (commit)
from 6d03d0539e0afd51383f11fd6b06ec7ced0fbf12 (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
=========
tests/README.txt | 56 +++++++++++++++++++++++++++++++++++++++++----------
tests/run_tests.sh | 16 +++++++++++++-
2 files changed, 59 insertions(+), 13 deletions(-)
=================
Commit Messages
=================
commit 802576013b5d780cd87caafa31c694279ee2dc4f
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>
Update the documentation to more closely match reality.
:100644 100644 dd7750f... 8f2a5fb... M tests/README.txt
:100755 100755 5320c54... 44bdcc7... M tests/run_tests.sh
=========
Changes
=========
commit 802576013b5d780cd87caafa31c694279ee2dc4f
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>
Update the documentation to more closely match reality.
diff --git a/tests/README.txt b/tests/README.txt
index dd7750f..8f2a5fb 100644
--- a/tests/README.txt
+++ b/tests/README.txt
@@ -1,9 +1,41 @@
-FIXME -- this is not really updated yet. It is more or less verbatim
-from gerbv and needs updating for pcb.
-
Please read this file before making any modifications to the test suite.
+**********************************************************************
+**********************************************************************
+* Overview
+**********************************************************************
+**********************************************************************
+
+The test suite is based on a shell script, 'run_tests.sh', which
+calls pcb to export various test case layouts to different output
+formats. The tests to be run are defined in the file 'tests.list'.
+The 'tests.list' file defines the export command line options passed
+to pcb, the name of the input .pcb file, and the names and file types
+for the expected output files.
+
+After a particular test is run, the output files are compared against
+a set of "golden" files which are in the golden/ subdirectory.
+ALL CHANGES TO THE GOLDEN FILES MUST BE HAND VERIFIED. This point
+can not be emphasized too much.
+
+While this testsuite is clearly not comprehensive (the GUI is totally
+left out of the testing for example), it is still better than nothing
+and can help detect newly introduced bugs.
+
+**********************************************************************
+**********************************************************************
+* Running an existing test
+**********************************************************************
+**********************************************************************
+
+To run all of the tests defined in tests.list run:
+
+ ./run_tests.sh
+
+To only run a specific test or tests, then simply list them by name
+on the command line like:
+ ./run_tests.sh test_one test_two ...
**********************************************************************
**********************************************************************
@@ -13,12 +45,14 @@ Please read this file before making any modifications to the test suite.
./run_tests.sh --regen <testname>
-will regenerate the golden file for <testname>. I suggest saving
-off a copy and using ImageMagick to look for the differences visually.
-The run_tests.sh script has examples of comparing .png files. Make
-sure the changes are only the expected ones and then check the new
-files back into cvs. Do not blindly update these files as that defeats
-the purpose of the tests.
+will regenerate the golden file for <testname>. If you are generating
+ASCII output such as BOMs or RS-274X files, then use the diff(3) program
+to examine all differences. If you are generating a graphics file
+such as a PNG, then I suggest saving off a copy and using ImageMagick
+to look for the differences visually. The run_tests.sh script has
+examples of comparing .png files. Make sure the changes are only
+the expected ones and then check the new files back into git. Do
+not blindly update these files as that defeats the purpose of the tests.
**********************************************************************
**********************************************************************
@@ -62,11 +96,11 @@ Update Makefile.am's
----------------------------------------------------------------------
Update inputs/Makefile.am and golden/Makefile.am to include your new
-files.
+files. If you added new Makefile.am's then be sure to also update
+configure.ac at the top level of the source tree.
----------------------------------------------------------------------
Add the new files to git
----------------------------------------------------------------------
-FIXME -- fill in this section
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 5320c54..44bdcc7 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -33,9 +33,11 @@ This causes the testsuite to skip all tests and report no errors.
This is used for certain debugging *only*. The primary use is to
allow testing of the 'distcheck' target without including the effects
of the testsuite. The reason this is useful is that due to minor differences
-in cairo versions and perhaps roundoff in different CPU's, the testsuite
+in library versions and perhaps roundoff in different CPU's, the testsuite
may falsely report failures on some systems. These reported failures
prevent using 'distcheck' for verifying the rest of the build system.
+These comments only apply to the tests which try to compare image files
+like PNG files.
EOF
@@ -62,7 +64,8 @@ The resulting output files are examined in various ways to make sure
they are correct. The exact details of how they are compared varies.
For example, the PNG outputs are compared using tools from the ImageMagick
suite while the ASCII centroid and bill of materials files are normalized
-with awk and then compared with the standard diff utility.
+with awk and then compared with the standard diff utility. The normalization
+removes things like a comment line which contains the creation date.
OPTIONS
@@ -266,6 +269,12 @@ fi
# utility functions for comparison
#
+# Usage:
+# compare_check "test_name" "file1" "file2"
+#
+# Makes sure that file1 and file2 both exist. If not, mark the current
+# test as skipped and give an error message
+#
compare_check() {
fn="$1"
f1="$2"
@@ -290,6 +299,9 @@ compare_check() {
# ASCII file comparison routines
#
+# Usage:
+# run_diff "file1" "file2"
+#
run_diff() {
f1="$1"
f2="$2"
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs