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

Option '-n' not working #469

Closed
hhinke opened this issue Jul 23, 2015 · 3 comments
Closed

Option '-n' not working #469

hhinke opened this issue Jul 23, 2015 · 3 comments

Comments

@hhinke
Copy link

hhinke commented Jul 23, 2015

Documentation says that if option -n is omitted the name for the test run is the same of the executable.

That's not working for JUnit reporter.
The name of the testsuite (attribute name of tag on generated JUnit XML), by default, is "all tests" and when -n option is used it remains "all tests".

@jfemia
Copy link

jfemia commented Jul 27, 2015

I noticed this too - it's hard-coded.

I made the following quick change to work around the issue (which may not be the best way but it solved my problem).

@@ -5582,5 +5582,5 @@
             Totals totals;

-            context.testGroupStarting( "all tests", 1, 1 ); // deprecated?
+            context.testGroupStarting( context.config()->name(), 1, 1 ); // deprecated?

             TestSpec testSpec = m_config->testSpec();
@@ -5613,5 +5613,5 @@
                 m_reporter->skipTest( *it );

-            context.testGroupEnded( "all tests", totals, 1, 1 );
+            context.testGroupEnded( context.config()->name(), totals, 1, 1 );
             return totals;
         }

@hhinke
Copy link
Author

hhinke commented Jul 27, 2015

I don't know what can be better than this solution, but worked well. Now the testsuite name is correctly set! thanks

@philsquared
Copy link
Collaborator

Not sure what I was thinking when I put that "all tests" in there - perhaps it was a placeholder.
In any event I see no reason why it should not be as you suggest, @jfemia, so I've changed it to that now (will push later - you'll see a commit notification here).

philsquared added a commit that referenced this issue Aug 3, 2015
@horenmar horenmar added the Resolved - pending review Issue waiting for feedback from the original author label Jan 14, 2017
@horenmar horenmar removed the Resolved - pending review Issue waiting for feedback from the original author label Jan 26, 2017
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

4 participants