From ee37e3e22012ecee8b3d1d243378ce19a03689e3 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Sun, 6 May 2001 16:22:20 +0000 Subject: * debian/rules: Install all the doc formats. * redhat/dejagnu.spec: Install all the doc formats. * Clean.tcl: Also nuke all Emacs backup files. * Makefile.am: Fix dependencies on tarball target. Add new target to build Debian packages. Add $(includedir) to install-data-local target so dejagnu.h gets installed in the right place. * doc/Makefile.am: Make all paths absolute, cause some versions of the db2* tools are braindead. * doc/overview.sgml: Update version numbers and log. * doc/user.sgml: Add mention of dejagnu.h header file. * doc/ref.sgml: Add chapter on dejagnu.h header file for unit testing. * config/default.exp: New file for default config settings for simple native testsuites that don't need anything else. * lib/dejagnu.exp: Add $text\r\n to all strings, to make sure we only get one line at a time. * testsuite/libdejagnu: New directory for dejagnu library test cases. * testsuite/libdejagnu/unit.cc: Test case for dejagnu.h. * testsuite/libdejagnu/tunit.exp: Test driver for dejagnu.h. * testsuite/libdejagnu/Makefile.am: New makefile to build the test case. * testsuite/libdejagnu/Makefile.in: Generated. * testsuite/Makefile.am: Add libdejagnu to SUBDIRS. Replace the site.exp rule, cause we don't want the $tool setting, so we run all the test suites. Don't pass the tool name for "make check". * configure.in: Add testsuite/libdejagnu/Makefile to AC_OUTPUT. --- doc/Makefile.am | 33 ++++++++++---- doc/Makefile.in | 40 ++++++++++------ doc/ref.sgml | 139 +++++++++++++++++++++++++++++++++++++------------------- doc/user.sgml | 6 +-- 4 files changed, 146 insertions(+), 72 deletions(-) (limited to 'doc') diff --git a/doc/Makefile.am b/doc/Makefile.am index 9aa89b3..2815347 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,33 +7,46 @@ man_MANS = runtest.1 # now, don't install the old texinfo document from version 1.3 # info_TEXINFOS = dejagnu.texi DOCBOOK = @DOCBOOK@ -TARGETS = overview.html overview.rtf overview.ps # overview.pdf overview.dvi +TARGETS = overview.html overview.ps overview.pdf overview.rtf docs: $(TARGETS) %.ps: %.dvi - dvips -o $@ $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + dvips -o $@ $*.dvi %.pdf: %.sgml - $(DOCBOOK)/db2pdf $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2pdf $${dir}/$*.sgml %.dvi: %.sgml - $(DOCBOOK)/db2dvi $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2dvi $${dir}/$*.sgml %.rtf: %.sgml - $(DOCBOOK)/db2rtf -o $@ $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + touch $@; \ + $(DOCBOOK)/db2rtf -o $@ $${dir}/$*.sgml %.gif: %.fig convert -transparency white $< $@ # .fig -> .gif %.epsi: %.eps - ps2epsi $< # .eps -> .epsi + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + ps2epsi $${dir}/$*.sgml # .eps -> .epsi %.eps: %.fig fig2dev -L ps -m 0.7 -p dummy $< > $@ # .fig -> .eps/portrait %.html: %.sgml - $(DOCBOOK)/db2html $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2html $${dir}/$*.sgml # now for some extra dependencies that the automatic rules will not # catch: @@ -41,15 +54,15 @@ docs: $(TARGETS) html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml clean realclean distclean: - rm -fr $(TARGETS) DBHTOHTML* overview.junk overview.{aux,dvi,log} + rm -fr $(TARGETS) DBHTOHTML* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex} install-doc: $(TARGETS) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html $(DESTDIR)$(pkgdatadir)/html/stylesheet-images $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html $(INSTALL_DATA) overview/stylesheet-images/*.png $(DESTDIR)$(pkgdatadir)/html/stylesheet-images - $(INSTALL_DATA) overview.rtf $(DESTDIR)$(pkgdatadir)/dejagnu.ps + $(INSTALL_DATA) overview.rtf $(DESTDIR)$(pkgdatadir)/dejagnu.rtf $(INSTALL_DATA) overview.ps $(DESTDIR)$(pkgdatadir)/dejagnu.ps $(INSTALL_DATA) overview.pdf $(DESTDIR)$(pkgdatadir)/dejagnu.pdf - $(INSTALL_DATA) runtest.1 $(mandir)/man1/ + $(INSTALL_DATA) $(srcdir)/runtest.1 $(mandir)/man1/ diff --git a/doc/Makefile.in b/doc/Makefile.in index a9a4def..82830a5 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -62,6 +62,7 @@ POST_UNINSTALL = : BOARDS = @BOARDS@ CC = @CC@ CONFIG = @CONFIG@ +CXX = @CXX@ EXEEXT = @EXEEXT@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -75,19 +76,19 @@ man_MANS = runtest.1 # now, don't install the old texinfo document from version 1.3 # info_TEXINFOS = dejagnu.texi DOCBOOK = @DOCBOOK@ -TARGETS = overview.html overview.rtf overview.ps # overview.pdf overview.dvi +TARGETS = overview.html overview.ps overview.pdf overview.rtf mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff -DIST_COMMON = README Makefile.am Makefile.in configure configure.in +DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: @@ -154,7 +155,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -226,28 +227,41 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean docs: $(TARGETS) %.ps: %.dvi - dvips -o $@ $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + dvips -o $@ $*.dvi %.pdf: %.sgml - $(DOCBOOK)/db2pdf $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2pdf $${dir}/$*.sgml %.dvi: %.sgml - $(DOCBOOK)/db2dvi $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2dvi $${dir}/$*.sgml %.rtf: %.sgml - $(DOCBOOK)/db2rtf -o $@ $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + touch $@; \ + $(DOCBOOK)/db2rtf -o $@ $${dir}/$*.sgml %.gif: %.fig convert -transparency white $< $@ # .fig -> .gif %.epsi: %.eps - ps2epsi $< # .eps -> .epsi + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + ps2epsi $${dir}/$*.sgml # .eps -> .epsi %.eps: %.fig fig2dev -L ps -m 0.7 -p dummy $< > $@ # .fig -> .eps/portrait %.html: %.sgml - $(DOCBOOK)/db2html $< + src=$(srcdir); \ + dir=`(cd $${src}; pwd)`; \ + $(DOCBOOK)/db2html $${dir}/$*.sgml # now for some extra dependencies that the automatic rules will not # catch: @@ -255,16 +269,16 @@ docs: $(TARGETS) html rtf overview.pdf overview.ps overview.dvi overview.rtf overview.html: overview.sgml ref.sgml user.sgml clean realclean distclean: - rm -fr $(TARGETS) DBHTOHTML* overview.junk overview.{aux,dvi,log} + rm -fr $(TARGETS) DBHTOHTML* overview.junk overview overview.{aux,dvi,log,ps,pdf,tex} install-doc: $(TARGETS) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html $(DESTDIR)$(pkgdatadir)/html/stylesheet-images $(INSTALL_DATA) overview/*.html $(DESTDIR)$(pkgdatadir)/html $(INSTALL_DATA) overview/stylesheet-images/*.png $(DESTDIR)$(pkgdatadir)/html/stylesheet-images - $(INSTALL_DATA) overview.rtf $(DESTDIR)$(pkgdatadir)/dejagnu.ps + $(INSTALL_DATA) overview.rtf $(DESTDIR)$(pkgdatadir)/dejagnu.rtf $(INSTALL_DATA) overview.ps $(DESTDIR)$(pkgdatadir)/dejagnu.ps $(INSTALL_DATA) overview.pdf $(DESTDIR)$(pkgdatadir)/dejagnu.pdf - $(INSTALL_DATA) runtest.1 $(mandir)/man1/ + $(INSTALL_DATA) $(srcdir)/runtest.1 $(mandir)/man1/ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/doc/ref.sgml b/doc/ref.sgml index f8f0ea7..a24ca13 100644 --- a/doc/ref.sgml +++ b/doc/ref.sgml @@ -4259,95 +4259,144 @@ - - Unit Testing + + Unit Testing API - - Unit Testing API - - For unit testing, you can use the dejagnu.h header file. - - + C Unit Testing API - For C code, there is a C API. - - - Pass Method + All of the functions that take a + msg parameter use a C char * that is + the message to be dislayed. There currently is no support for + variable length arguments. + + + + Pass Function This prints a message for a successful test - completion. - msg. This is a C char * string that - is the message to be dislayed. + completion. pass msg - + - - C++ Unit Testing API + + Fail Function + + This prints a message for an unsuccessful test + completion. + + + fail + msg + + + + + + Untested Function - + This prints a message for an test case that isn't run + for some technical reason. + + + untested + msg + + + + + Unresolved Function + + This prints a message for an test case that is run, + but there is no clear result. These output states require a + human to look over the results to determine what happened. + + + + unresolved + msg + + + + + Totals Function + + This prints out the total numbers of all the test + state outputs. + + + totals + + + + + + + + C++ Unit Testing API + + All of the methods that take a + msg parameter use a C char * + or STL string, that is the message to be + dislayed. There currently is no support for variable + length arguments. + + Pass Method This prints a message for a successful test - completion. - msg. This is a C char * string that - is the message to be dislayed. + completion. TestState::pass msg - - + + - + Fail Method This prints a message for an unsuccessful test - completion. - msg. This is a C char * string that - is the message to be dislayed. + completion. TestState::fail msg - - + + - + Untested Method This prints a message for an test case that isn't run - for some technical reason. - msg. This is a C char * string that - is the message to be dislayed. + for some technical reason. TestState::untested msg - - + + - + Unresolved Method This prints a message for an test case that is run, but there is no clear result. These output states require a human to look over the results to determine what happened. - msg. This is a C char * string that - is the message to be dislayed. + TestState::unresolved msg - - + + - + Totals Method This prints out the total numbers of all the test @@ -4357,11 +4406,9 @@ TestState::totals - - - + - + diff --git a/doc/user.sgml b/doc/user.sgml index 16f2160..3ba26ad 100644 --- a/doc/user.sgml +++ b/doc/user.sgml @@ -2374,10 +2374,10 @@ libraries. In this case, each file is linked with a test case in C or C++, and each function or class and method is tested in series, with the test case having to check private data or - global variable to see if the function or method worked. + global variables to see if the function or method worked. - This works particularly well for testing API and a level - where it is easier to debug them, than by need to trace through + This works particularly well for testing APIs and at level + where it is easier to debug them, than by needing to trace through the entire appication. Also if there is a specification for the API to be tested, the testcase can also function as a compliance test. -- cgit v1.2.3