[Bug 1549] New: It must be easier to write tests

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Jun 10 08:28:07 CDT 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1549

           Summary: It must be easier to write tests
           Product: RTEMS
           Version: 4.10
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: build
        AssignedTo: ralf.corsepius at rtems.org
        ReportedBy: sebastian.huber at embedded-brains.de


Unit tests are a vital development tool.  It should be as easy as possible to
write tests and to execute them.

Currently we have to do several steps to write a test.

1. Create a new directory for the test.

2. Create a new Makefile.am.  This normally involves a lot of copy and paste
from an existing test.

3. Add a new init.c file.  Which may be enough for simple tests.

4. Add a test.doc file for the documentation.

5. Add a test.scn file with the output of the test.

6. Modify the top level Makefile.am.

7. Modify the top level configure.ac.

8. Run bootstrap.

9. Add a copy and paste .cvsignore.

10. Write a ChangeLog with several entries.

This is way to much work.  A lot of copy and paste is involved.  What do we
really need?

1. An extra directory for each test case is not needed.  We can use different
file prefixes for each test case.

2. Not necessary if we don't have an extra directory.

3. This is the core.

4. The *.doc files are pretty useless in the current format.  We should define
guidelines how do to document tests.  We should write them in a machine and
human readable form.  I propose Doxygen.  If someone does not like Doxygen it
is trivial to write a parser that transforms the Doxygen comments into
something else.

5. These files are useless and hard to maintain.  The test output should
clearly state if a test failed or passed or whatever.  The test output should
be in a standard format to allow programs to determine the test outcome easily.

6. We need this.

7. We likely don't have to modify the configure.ac.

8. We need this.

9. We likely don't have to modify the .cvsignore.

10. The ChangeLog entry is now much easier.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the rtems-bugs mailing list