Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Red bars in Windows #10

Open
usanyo opened this issue Mar 6, 2015 · 15 comments
Open

Red bars in Windows #10

usanyo opened this issue Mar 6, 2015 · 15 comments

Comments

@usanyo
Copy link

usanyo commented Mar 6, 2015

Hi,

I'm trying to use your plugin in Windows in Luna. It works well for passed Tests, but if there is a failed test, the C/C++ Unit tab stops working. I have to stop with the stop button.

@tcmak
Copy link
Owner

tcmak commented Mar 6, 2015

Let me get a Windows environment with Luna and see what happens. Will get back to you soon.

@usanyo
Copy link
Author

usanyo commented Mar 9, 2015

I use cpputest-3.6, and this is the std output:
..\main.cpp(33): error: Failure in TEST(FirstTestGroup, FirstTest)
CHECK(false) failed

.
Errors (1 failures, 1 tests, 1 ran, 1 checks, 0 ignored, 0 filtered out, 0 ms)

@usanyo
Copy link
Author

usanyo commented Mar 20, 2015

Which version of cpputest do you use?

@tcmak
Copy link
Owner

tcmak commented Mar 20, 2015

When I wrote this plugin, I am using CppUTest 1.0, 2, 2.1, and 2.3.

It may be easier if you tell me which which version you are using :)

@usanyo
Copy link
Author

usanyo commented Mar 20, 2015

I've wrote in the comment last before. I use CppUTest 3.6
And the output is the following, if there is a failure:

..\main.cpp(33): error: Failure in TEST(FirstTestGroup, FirstTest)
CHECK(false) failed

.
Errors (1 failures, 1 tests, 1 ran, 1 checks, 0 ignored, 0 filtered out, 0 ms)

I've checked your tests, and I saw that your program expect another output format. The problem is, that here is no 'ms' in the failed test case.

@tcmak
Copy link
Owner

tcmak commented Mar 20, 2015

ouch... I was quite overlooked earlier and overlooked. Hopefully I will fix it soon. I am sorry to keep you waiting.

@tcmak
Copy link
Owner

tcmak commented Jul 8, 2015

Hi, Sorry for the delay, I have check with the codebase. I am pretty sure that the tests have 'ms' in failed test cases.

But I found another issue that would hang the test runner. Can I know if your problem have anything going to stand output?

I probably need to change the way test result message is parsed. This would be a major change. Stay tuned.

@alexwahl
Copy link

Hi, i am faced with the same problem with cpputest 3.8. Is there a chance to get a newer version?

@usanyo
Copy link
Author

usanyo commented Jul 28, 2016

Hi, the problem is not the version. I changed the compiler to gcc (with minGW) and the problem has been solved.

@alexwahl
Copy link

alexwahl commented Jul 28, 2016

I got an exception like this when executing the testrunner:
Exception in thread "Thread-12" java.lang.NumberFormatException: For input string: "\test\Test_RegisterAccess.cpp" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.eclipse.cdt.testsrunner.internal.cpputest.CppUTestCaseFactory.getLineNumber(CppUTestCaseFactory.java:104) at org.eclipse.cdt.testsrunner.internal.cpputest.CppUTestCaseFactory.createFailedTestcase(CppUTestCaseFactory.java:77) at org.eclipse.cdt.testsrunner.internal.cpputest.CppUTestCaseFactory.create(CppUTestCaseFactory.java:30) at org.eclipse.cdt.testsrunner.internal.cpputest.TestIterator.fetchTest(TestIterator.java:36) at org.eclipse.cdt.testsrunner.internal.cpputest.CppUTestStdOutputParser.parse(CppUTestStdOutputParser.java:20) at org.eclipse.cdt.testsrunner.internal.cpputest.CppUTestRunnerProvider.run(CppUTestRunnerProvider.java:66) at org.eclipse.cdt.testsrunner.internal.model.TestingSession.run(TestingSession.java:192) at org.eclipse.cdt.testsrunner.internal.launcher.TestingProcessFactory$TestingSessionRunner.run(TestingProcessFactory.java:53) at java.lang.Thread.run(Unknown Source)

I am compiling with g++ (minGW) in version 4.9.3, what did you used before your switch to gcc? using another compiler should not change the output of the testrunner.
my testrunner output (if called from cmd) is :
C:\test\Test_RegisterAccess.cpp:54: error: Failure in TEST(Test_RegisterAccess_SetRegister, testcase_0xAA) expected <170> but was <171> difference starts at position 2 at: < 171 > ^

@alexwahl
Copy link

right now i think the problem is the leading C:\

@meghashama
Copy link

Hi, the problem is not the version. I changed the compiler to gcc (with minGW) and the problem has been solved.

This problem has solved in my case too, after i switched to mingw from cygwin. :)

@cs6502
Copy link

cs6502 commented Feb 24, 2021

Hi Alex, et al.
even this is years ago, you are right with the leading C:\ as issue for the test runner hang up. I got the same in Windows environment with minGW and once I cheated an output with /C/ instead of c:\ the test runner seams to work for failed tests too.
Because the cheat is no solution, have you found a workaround?

@alexwahl
Copy link

Hi Carsten,
I'm sorry i have no workaround, i do no longer use eclipse for testruns.

@cs6502
Copy link

cs6502 commented Mar 2, 2021

Thanks for the feedback Alex,
I have worked around the issue in CppUTest now: CppUTest allows per command line option to adapt the Output format to the needs of the Juno test runner. Because this very special and still under test I have not commited it yet to github.com/cpputest/cpputest. There is just my fork on github.com/cs6502/cpputest/tree/EclipseTestRunner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants