[PATCH weston v6 0/4] Refactored simple unit/integration test framework and corresponding test program.

Jon A. Cruz jonc at osg.samsung.com
Thu Jul 2 23:36:43 PDT 2015


Here is yet another re-worked version of the patch adding unit testing
framework and corresponding separation. This drops the higher-level waycheck
program and focuses on the first two steps of adding zunitc and converting
the config-parser test.

Changes since v5:
- Reduced to just the core framework and a test converted to it.
- Added explicit configuration option for junit/libxml2 use.
- Refactored to minimize forward declarations.
- Added zuctest to 'make check'
- Hooked doxygen generation into build as 'make doc'
- Removed non-fatal ZUC_EXPECT_* macros
- Added ZUC_ASSERTG_* macros to allow use of goto for cleanup.

Changes since v4:
- Changed junit reporter to use libxml2 for writing XML istead of doing so
  directly.

Changes since v3:
- Cleaned up formatting of return types linebreaks and other misc style
  issues.
- Many fixes from review comments on prior versions.
- Clarified test macro parameter names.
- Added test macros for NULL/non-NULL and C-style string comparison.
- Extended fixture construction to facilitate layering Weston-specific
  fixtures.
- Track formats supported by wl_shm.
- Added convenience routines to capture running program name.
- Updated fixture construction, including being able to specify the Wayland
  instance to connect to.
- Reduced Doxygen config files to non-defaults only.
- Relocated Doxygen specific input files to match Wayland structure.


Jon A. Cruz (4):
  Added simple unit/integration test framework and corresponding    
    test program.
  Enables output in the JUnit XML format.
  Converted the config parser test to the new framework.
  Adding doxygen setup and info for the testing framework.

 .gitignore                            |    4 +
 Makefile.am                           |   93 +-
 configure.ac                          |   46 +
 doc/doxygen/devtools.dox              |   51 ++
 doc/doxygen/tooldev.doxygen.in        |   11 +
 doc/doxygen/tools.dox                 |   31 +
 doc/doxygen/tools.doxygen.in          |   10 +
 doc/doxygen/tools_arch_new.gv         |   85 ++
 doc/doxygen/tools_arch_old.gv         |   53 ++
 tests/config-parser-test.c            |  371 ++++++--
 tools/zunitc/doc/zunitc.dox           |  145 +++
 tools/zunitc/inc/zunitc/zunitc.h      |  696 +++++++++++++++
 tools/zunitc/inc/zunitc/zunitc_impl.h |  105 +++
 tools/zunitc/src/main.c               |   58 ++
 tools/zunitc/src/zuc_base_logger.c    |  404 +++++++++
 tools/zunitc/src/zuc_base_logger.h    |   38 +
 tools/zunitc/src/zuc_collector.c      |  427 +++++++++
 tools/zunitc/src/zuc_collector.h      |   58 ++
 tools/zunitc/src/zuc_context.h        |   58 ++
 tools/zunitc/src/zuc_event.h          |   86 ++
 tools/zunitc/src/zuc_event_listener.h |  174 ++++
 tools/zunitc/src/zuc_junit_reporter.c |  488 ++++++++++
 tools/zunitc/src/zuc_junit_reporter.h |   38 +
 tools/zunitc/src/zuc_types.h          |   80 ++
 tools/zunitc/src/zunitc_impl.c        | 1589 +++++++++++++++++++++++++++++++++
 tools/zunitc/test/fixtures_test.c     |  106 +++
 tools/zunitc/test/zunitc_test.c       |  464 ++++++++++
 27 files changed, 5706 insertions(+), 63 deletions(-)
 create mode 100644 doc/doxygen/devtools.dox
 create mode 100644 doc/doxygen/tooldev.doxygen.in
 create mode 100644 doc/doxygen/tools.dox
 create mode 100644 doc/doxygen/tools.doxygen.in
 create mode 100644 doc/doxygen/tools_arch_new.gv
 create mode 100644 doc/doxygen/tools_arch_old.gv
 create mode 100644 tools/zunitc/doc/zunitc.dox
 create mode 100644 tools/zunitc/inc/zunitc/zunitc.h
 create mode 100644 tools/zunitc/inc/zunitc/zunitc_impl.h
 create mode 100644 tools/zunitc/src/main.c
 create mode 100644 tools/zunitc/src/zuc_base_logger.c
 create mode 100644 tools/zunitc/src/zuc_base_logger.h
 create mode 100644 tools/zunitc/src/zuc_collector.c
 create mode 100644 tools/zunitc/src/zuc_collector.h
 create mode 100644 tools/zunitc/src/zuc_context.h
 create mode 100644 tools/zunitc/src/zuc_event.h
 create mode 100644 tools/zunitc/src/zuc_event_listener.h
 create mode 100644 tools/zunitc/src/zuc_junit_reporter.c
 create mode 100644 tools/zunitc/src/zuc_junit_reporter.h
 create mode 100644 tools/zunitc/src/zuc_types.h
 create mode 100644 tools/zunitc/src/zunitc_impl.c
 create mode 100644 tools/zunitc/test/fixtures_test.c
 create mode 100644 tools/zunitc/test/zunitc_test.c

-- 
2.1.0



More information about the wayland-devel mailing list