1

I am using Eclipse to develop some projects and implement unit test by using google test. everything was fine this morning. I can build project and run unit tests. however, after i commit the local changes and then pull the codes from repository using git tortoise, the unit tests stopped working any more. I still can build the project.

I got msg:

Unknown error during parsing Google Test module output: unexpected test module output

this is the msg in the console window:

The target endianness is set automatically (currently little endian)
[New Thread 4496.0x520]

and the project would stop running before we even step into the main function in the unit test. Since, the compiler gave me so little info, i wonder if any one here might have a clue.

  • I doubt it's a compiler error :-/ ... Seems to refer to JUnit output compatibility issues. Which plugin is used in eclipse to run your tests actually? – πάντα ῥεῖ May 14 '14 at 16:24
  • i dont think so. everything is fine when building the project. the problem comes up when running unit test. FYI, i have two projects. one for development. The other for unit test. –  May 14 '14 at 16:26
  • Yeah, I've seen _'would stop running before we even step into the main function'_ – πάντα ῥεῖ May 14 '14 at 16:27
  • using gcc in eclipse now. doing unit test through google test runner. –  May 14 '14 at 16:28
  • _'doing unit test through google test runner'_ OK, but which eclipse plugin is used to parse the test outputs? How did you setup running the Unit Test project? May be this illustrates what I meant: http://stackoverflow.com/questions/16741400/eclipse-cdt-plugin-for-running-tests-and-browsing-report – πάντα ῥεῖ May 14 '14 at 16:31
  • did the same thing as the steps in the answer of that post –  May 14 '14 at 16:39
  • still having the error, though –  May 14 '14 at 16:58

2 Answers2

1

I ran into the error msg "...:unexpected test module output" when I added a main function and DID NOT exclude it from test build (and apparently g++ linker did not complain about same symbol error, you should be able to see it from the build msg for test build).

I excluded my app main from test build (right click on your app main, go to Resources Configuration, then Exclude from Build..., and finally check your test build and click OK), the test ran without any problem.

ewayzhan
  • 11
  • 1
0

It can be a little irrelevant already, but I had the same problem, then I noticed wrong C++ Aplication value for my GoogleTest Configuration, changed it and now everything is fine.

I had the option for Debug config there. (Run -> Run Configurations... -> C/C++ Aplication). Eclipse changed it itself somehow.

Denis
  • 719
  • 2
  • 8
  • 23