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

Posibility to inject addional nunit command line arguments #30

Open
vitia opened this issue May 29, 2016 · 3 comments
Open

Posibility to inject addional nunit command line arguments #30

vitia opened this issue May 29, 2016 · 3 comments

Comments

@vitia
Copy link

vitia commented May 29, 2016

NUnit adds/removes command line arguments and not all of them are supported by plugin.
https://github.com/nunit/docs/wiki/Console-Command-Line
I'm interested in "--agents" and "--labels".
However instead of adding support for this specific argument I think It would be useful to have possibility to modify command line right before project.exec and inject any argument.

@gluck
Copy link
Contributor

gluck commented May 30, 2016

Hi, I've got mixed feeling about allowing generics params because:

  • it prevents the plugin from enhancing the params (e.g. escaping the params properly)
  • it prevents other plugins (e.g. opencover) from getting knowledge about these params (currently opencover plugin only requires the full nunit command line so it'd be fine though)
  • it makes the build less explicit:

extraArgs = "--labels=On --agents=4"

vs

labels = 'on'
agents = 4

I know it's a bit of extra work for each params, but I think that's what makes the difference between this plugin and a plain Exec task 😃

@vitia
Copy link
Author

vitia commented May 30, 2016

I think it is obvious that extra args is "use on your own risk" feature :)
I like the way it is implemented in gradle-msbuild-plugin https://github.com/Ullink/gradle-msbuild-plugin/blob/master/src/main/groovy/com/ullink/Msbuild.groovy#L193

        commandLineArgs += extMap.collect { k, v ->
            v ? "/$k:$v" : "/$k"
        }

@gluck
Copy link
Contributor

gluck commented May 30, 2016

This way could can be a good compromise, where we'll end up with:

ext.labels = 'On'
ext.agents = 4

Note that ext shouldn't be used, as it causes incompatibilities with other plugins cf Itiviti/gradle-msbuild-plugin#53
But the same syntax (with another name/map) would be fine for me.

Thx !

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

No branches or pull requests

2 participants