Skip to content

CxxTest failing on GitHub macOS builders #160

@rboston628

Description

@rboston628

When running on GitHub's macOS runners, the following error is now being generated:

cxxtestgen --error-printer -o tests/tests.cpp tests/*.h
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:43: SyntaxWarning: invalid escape sequence '\s'
  lineCont_re = re.compile('(.*)\\\s*$')
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:130: SyntaxWarning: invalid escape sequence '\s'
  classdef = '(?:::\s*)?(?:\w+\s*::\s*)*\w+'
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:131: SyntaxWarning: invalid escape sequence '\s'
  baseclassdef = '(?:public|private|protected)\s+%s' % (classdef,)
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:134: SyntaxWarning: invalid escape sequence '\s'
  testsuite = '(?:(?:::)?\s*CxxTest\s*::\s*)?TestSuite'
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:39: SyntaxWarning: "is" with 'int' literal. Did you mean "=="?
  if len(suites) is 0 and not options.root:
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxxtest_parser.py:236: SyntaxWarning: "is not" with 'int' literal. Did you mean "!="?
  if len(suite['tests']) is not 0:
/opt/homebrew/lib/python3.12/site-packages/cxxtest/cxx_parser.py:2090: SyntaxWarning: "is" with 'str' literal. Did you mean "=="?
  if p.type is "":
g++ --std=c++14 -o tests/tests.out tests/tests.cpp -Isrc -Wuninitialized -Weffc++ --pedantic-errors
tests/tests.cpp:9:10: fatal error: 'cxxtest/TestListener.h' file not found
#include <cxxtest/TestListener.h>

The cxxtest package is being downloaded with:

brew install cxxtest

on macos-latest

The filetests/tests.cpp was generated using cxxtestgen as shown above. The several syntax warnings about the use of is in python are probably unrelated. The issue seems to be that the TestListener.h file is no longer being found inside the homebrew package.

The same workflow setup has run with no issues before now, as recently as two weeks ago (say April 12). It's worth noting the tests compile and run on my local laptop (macOS 12.4 with Apple clang version 14.0.0), and that the tests pass on the linux runners using latest gcc and gcc9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions