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

Allow passing output dir as environment variable #8

Closed
erez-rabih opened this issue Jan 24, 2016 · 3 comments
Closed

Allow passing output dir as environment variable #8

erez-rabih opened this issue Jan 24, 2016 · 3 comments

Comments

@erez-rabih
Copy link

The change is small - just need to check if a pre-defined environment variable (JUNIT_OUTPUT_DIR) is set here: https://github.com/ruedigergad/test2junit/blob/master/src/test2junit/core.clj#L29
before going to the default hardcoded value.

I run tests via jenkins so I can't pass the output dir into project.clj

@ruedigergad
Copy link
Owner

Hi,

thanks for your feedback.

I just added more options for setting the output directory.
Now, it is possible to use the environment variable:
TEST2JUNIT_OUTPUT_DIR
and the Java system property:
test2junit.output.dir
to set the output directory.

The order in which these are considered is (from top to down):
(or
(System/getenv "TEST2JUNIT_OUTPUT_DIR")
(System/getProperty "test2junit.output.dir")
(:test2junit-output-dir project)
"test2junit")

I pushed a new version 1.2.0 to Clojars.
I hope that you find this change useful.

I briefly tested the change here in fish, but I am leaving this issue open for now, just in case something does not work as expected.
Please close the issue if you see that things work for you as intended.

Cheers,

Ruediger

@erez-rabih
Copy link
Author

@ruedigergad Thanks for the fast reply.
I will give it a test and post my feedback.

@erez-rabih
Copy link
Author

I tried supplying the environment variable TEST2JUNIT_OUTPUT_DIR and it looks like everything works as expected.
I didn't try the java system property but I'm closing this issue anyway.
Thanks for the help!

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

2 participants