Log4cxx
  1. Log4cxx
  2. LOGCXX-54

Eliminate use of boost-regex in unit tests

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.10.0
    • Component/s: None
    • Labels:
      None

      Description

      The unit tests in 0.9.7 used boost Regular Expressions (http://www.boost.org) to eliminate variable parts (dates, thread ids, etc) of generated log files. While this was efficient and parallels the use of jakarta-oro in log4j, it substantially increased the complexity of configuring a system to run the unit tests. If this approach had been continued, it would be highly unlikely to run the unit tests on Gump since getting boost-regex to build on Gump would require substantial effort to add the boost specific build tools (bjam) to the tools supported by Gump.

      The approach to eliminate the dependency on boost-regex is to use APR's apr_proc_create to execute sed assumed to be in the path. Currently ControlFilter (which checked that each log line matched at least one of a set of regular expressions) is effectively a no-op, however since each file appears to be compared against a witness file, the added check with a ControlFilter may be unnecessary.

      The initial commit will build, run but fails some tests, I'll fix that on a different platform.

        Activity

        Hide
        Curt Arnold added a comment -

        Unit tests now spawn "sed" to normalize generated log files before comparison.

        Show
        Curt Arnold added a comment - Unit tests now spawn "sed" to normalize generated log files before comparison.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development