runningtests.html   [plain text]


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>Running Tests</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
REL="HOME"
TITLE="DejaGnu"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="A first remote test"
HREF="x319.html"><LINK
REL="NEXT"
TITLE="Runtest"
HREF="runtest.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DejaGnu: The GNU Testing Framework</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x319.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="runtest.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="RUNNINGTESTS"
>Running Tests</A
></H1
><P
>There are two ways to execute a test suite. The most
    common way is when there is existing support in the
    <TT
CLASS="FILENAME"
>Makefile</TT
>. This support consists of a
    <I
CLASS="EMPHASIS"
>check</I
> target. The other way is to execute the
    <B
CLASS="COMMAND"
>runtest</B
> program directly. To run
    <B
CLASS="COMMAND"
>runtest</B
> directcly from the command line requires
    either all the correct options, or the <A
HREF="customizing.html#LOCAL"
>Local Config File</A
> must be setup
    correctly.</P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="MAKECHECK"
>Make check</A
></H1
><P
>To run tests from an existing collection, first use
      <B
CLASS="COMMAND"
>configure</B
> as usual to set up the
      build directory. Then try typing:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>      make check
      </PRE
></TD
></TR
></TABLE
><P
>If the <I
CLASS="EMPHASIS"
>check</I
> target exists, it
      usually saves you some trouble. For instance, it can set up any
      auxiliary programs or other files needed by the tests. The most
      common file the check builds is the
      <I
CLASS="EMPHASIS"
>site.exp</I
>. The site.exp file contains
      various variables that DejaGnu used to dertermine the
      configuration of the program being tested. This is mostly for
      supporting remote testing.</P
><P
>The <I
CLASS="EMPHASIS"
>check</I
> target is supported by GNU
      <SPAN
CLASS="PRODUCTNAME"
>Automake</SPAN
>. To have DejaGnu support added to your
      generated <TT
CLASS="FILENAME"
>Makefile.in</TT
>, just add the keyword
      dejagnu to the AUTOMAKE_OPTIONS variable in your
      <TT
CLASS="FILENAME"
>Makefile.am</TT
> file.</P
><P
>Once you have run <I
CLASS="EMPHASIS"
>make check</I
> to build
      any auxiliary files, you can invoke the test driver
      <B
CLASS="COMMAND"
>runtest</B
> directly to repeat the tests.
      You will also have to execute <B
CLASS="COMMAND"
>runtest</B
>
      directly for test collections with no
      <I
CLASS="EMPHASIS"
>check</I
> target in the
      <TT
CLASS="FILENAME"
>Makefile</TT
>.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x319.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="runtest.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>A first remote test</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Runtest</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>