Modify the default report folder of pitest target/pit-reports/YYYYMMDDHHMI - pitest

is it possible to rename the report default folder ?
I don't want to have "YYYYMMDDHHMI", I'm trying to rename it to something simple and constant. Thanks

This is controlled by the timestampedReports parameter. If you set it to false pitest will use a constant location.

Related

How can a Bazel `repository_rule` adjust a `label_flag` (or a `config_setting` more generally)?

I can create a label_flag in Bazel to allow command line flags to in turn be matched with a config_setting in a Bazel BUILD file.
However, I'd like to not hard-code the default value of the label_flag, and instead compute a good default based on the system when evaluating a repository_rule (or some other part of the WORKSPACE file).
The best (but awful) way I've come up with to do this is to have the default value loaded from a .bzl file that is generated using the template function on the repository_ctx.
I feel like generating a new file by doing textual substitutions probably isn't the right way to do this, but I can't find anything else. Ideas? help?
Generating a bzl file using the repository rule that inspects the host system is the only way to achieve what you need right now. So you're holding it "right" :)

How do I find a particular sub directory using Ant and then use it to create a symlink?

I need to create a symlink to a sub-directory using Ant. The issue is that I don't know where the target sub-directory is.
To create a symlink with ant I do this:
<symlink link="${parent.dir}/FOO/linkname" resource="${parent.dir}/BAR/target"/>
But I don't know what BAR is called in advance so I need to do a search for "target" under parent.dir and then pass the one result into the resource.
Is this possible using fileset? Or another way?
It might be possible to use a fileset but that might give you several symlinks or none.
A much better approach is to define the path to BAR in a property. If there is a dynamic part in this path, change the code so that Ant evaluates the dynamic part and everyone else uses Ant's value.
The typical example here is that the path contains a version or timestamp. Define those in your build file so you can use them everywhere. If a Java process needs the values, pass them to the process as a system property (-D...).

Set [Embed] attribute value dynamically

I am new to Action script.
Is there any possibility to set the source attribute value dynamically at run time?
for e.g
in the code
Embed(source="assets/images/image.pdf",mimeType="application/octet-stream");
I need to set
source="set pdf file name using a variable or reading from config xml"
Please provide some example snippets or links for reference
Thanks in advance.
Thanks
SRR
Maybe Conditional Compilation will get you some way to achieving what you want.

how to pass in ant.build.clonevm?

I'd like to pass properties(-Dname=val) down to junit&java tasks from the Ant command line. The problem is the -3rd party- build file doesn't pass those properties down.
I was thinking ant.build.clonevm could help, but the manual says
Note that this has to be a system property, so it cannot be specified
on the Ant command line.
So, can I use this for the above purpose, and how? If not, any other alternatives?
Thanks for any hints.
Use the ANT_OPTS environment variable instead.
set ANT_OPTS=-Dxxx=value
xxx is your property

How to add a set path only for that batch file executing?

Basically, I know I can go through my control panel and modify the path variable. But, I'm wondering if there is a way to through batch programming have a temporary path included? That way it is only used during that batch file execution. I don't want to have people go in and modify their path variables just to use my batch file.
Just like any other environment variable, with SET:
SET PATH=%PATH%;c:\whatever\else
If you want to have a little safety check built in first, check to see if the new path exists first:
IF EXIST c:\whatever\else SET PATH=%PATH%;c:\whatever\else
If you want that to be local to that batch file, use setlocal:
setlocal
set PATH=...
set OTHERTHING=...
#REM Rest of your script
Read the docs carefully for setlocal/endlocal , and have a look at the other references on that site - Functions is pretty interesting too and the syntax is tricky.
The Syntax page should get you started with the basics.
There is an important detail:
set PATH="C:\linutils;C:\wingit\bin;%PATH%"
does not work, while
set PATH=C:\linutils;C:\wingit\bin;%PATH%
works. The difference is the quotes!
UPD also see the comment by venimus
That's right, but it doesn't change it permanently, but just for current command prompt.
If you wanna to change it permanently you have to use for example this:
setx ENV_VAR_NAME "DESIRED_PATH" /m
This will change it permanently and yes, you can overwrite it in another batch script.

Resources