summaryrefslogtreecommitdiff
path: root/tests/README
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-04-08 13:13:13 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-04-08 13:13:13 +0000
commita18c8b7b0d397c120c0ff306a07fc45d9e4ba510 (patch)
treedb1b91740e6f38b1078c11674228d0c6b9f9df38 /tests/README
parent4ba8595d1eb3470c75adc41cd9c3a05690544a1d (diff)
test suite changes
Diffstat (limited to 'tests/README')
-rw-r--r--tests/README88
1 files changed, 52 insertions, 36 deletions
diff --git a/tests/README b/tests/README
index 570c70b..36b7bf4 100644
--- a/tests/README
+++ b/tests/README
@@ -1,12 +1,12 @@
This file describes the flex test suite.
-WHO SHOULD USE THE TEST SUITE?
+* WHO SHOULD USE THE TEST SUITE?
The test suite is intended to be used by flex developers, i.e., anyone hacking
the flex distribution. If you are simply installing flex, then you can ignore
this directory and its contents.
-STRUCTURE OF THE TEST SUITE
+* STRUCTURE OF THE TEST SUITE
The test suite consists of several directories, each containing a
scanner known to work with the most recent version of flex. In
@@ -17,46 +17,62 @@ generates an error message, then your modifications *may* have broken
a feature of flex. At a minimum, you'll want to investigate the
failure and determine if it's truly significant.
-HOW TO RUN THE TEST SUITE
+* HOW TO RUN THE TEST SUITE
To build and execute all tests:
$ cd tests/ # from the top level of the flex source tree
- $ make check
+ $ make test
To build and execute a single test:
$ cd tests/ # from the top level of the flex tree.
$ cd test-pthread-nr # for example
- $ make check
-
-HOW TO ADD A NEW TEST TO THE TEST SUITE
-
- - RUN the perl script `create-test.pl` found in this directory.
- If it works, skip the next step.
-
- - Copy the tests/TEMPLATE directory, then modify the skeleton scanner
- (and parser if necessary). If you are submitting a patch for
- inclusion in the flex distribution, then move the file "cvsignore"
- to .cvsignore in your new test-* subdirectory and add the name of
- your directory on a line by itself at the end of the newly created
- .cvsignore file. This will make it easier on the flex maintainer to
- include your new test in the cvs tree.
-
- - On success, your test should return zero.
-
- - On error, your test should return 1 (one) and print a message
- to stdout or stderr, which have been redirected to the file
- named, "OUTPUT", in your test's directory.
-
- - If your test is skipped (e.g., bison not found), then the Makefile
- rule should return 2 (two). See "test-bison-nr/Makefile.in" for details.
-
- - You must modify the last few lines of tests/configure.in
- by adding your new test directory, and the Makefile target.
- (This step is done automatically by `create-test.pl`.)
-
- - Each test assumes that the newly-built binary "flex" is in the
- directory above the tests directory.
-
- - Add a description of your new test to the end of the file `descriptions'.
+ $ make test
+
+* HOW TO ADD A NEW TEST TO THE TEST SUITE
+
+**- RUN the script `create-test` found in this directory with a single
+argument of the name of the test you want to create. If it fails with
+a message about a non-existent file `config.status', then run the
+configure script in the top-level directory and everything will be
+fine. If it fails to work for you other than this, report it as a
+bug.
+
+** Modify the files in the newly created directory so that they test
+whatever feature of flex you are interested in.
+
+** On success, your test should return zero.
+
+** On error, your test should return 1 (one) and print a message to
+stderr, which will have been redirected to the file named, "OUTPUT",
+in your test's directory.
+
+** If your test is skipped (e.g., because bison was not found), then
+ the test should return 2 (two). See "test-bison-nr/Makefile.am" for
+ an example.
+
+** You must modify the last few lines of the top-level configure.in by
+ adding the Makefile for your test directory. (This step is
+ done automatically by `create-test`.)
+
+** You must add the name of your test to the SUBDIRS variable in
+ tests/Makefile.am. (This is also done automatically for you by `create-test'.)
+
+** Add a description of your new test to the end of the file
+ `descriptions'. Remember to keep the description as brief as
+ possible, preferably to one line.
+
+** You will have to run the autogen.sh script in the top-level
+ directory as well as run the configure script in that
+ directory. (Note that running config.status may prove easier or
+ quicker.)
+
+** The easiest way for you to submit your new test to the flex
+ maintainers is by generating a patch. The flex maintainers only
+ need to have the Makefile.am, the flex input file, the test input
+ file (if there is one) and any other files necessary to compile the
+ test. You do not need to submit files generated by autoconf,
+ automake, configure etc. It would be helpful to include the file
+ .cvsignore which you will find in your test directory if you used
+ the `create-test' script.