Write output into specific directory#194
Conversation
runningcode
left a comment
There was a problem hiding this comment.
nice! just some small nits!
dfe8995 to
5c33c9e
Compare
| validateOptionsUsed(config = config, flank = base.flankVersion.get()) | ||
| val configName = name.toLowerCase() | ||
| val useDefaultDir = config.localResultsDir.isPresent.not() && configName.isNotBlank() | ||
| val setUpWorkingDir: JavaExec.() -> Unit = { if (useDefaultDir) workingDir(project.layout.buildDirectory.dir("fladle/$configName")) } |
There was a problem hiding this comment.
woah is this a function declared in line? never seen that before, but since we have control of the FlankJavaExec task, can we just define the function in there?
otherwise, i think this makes sense. we'll need some tests for this though since i'm getting quite confused with all the conditional logic :)
There was a problem hiding this comment.
Hm...sure I can rewrite it, my intention was, a function that is used to set up working dir is created for each configuration (wraps some params in the scope)
There was a problem hiding this comment.
otherwise, i think this makes sense. we'll need some tests for this though since i'm getting quite confused with all the conditional logic :)
That could be hard (at least for me). I don't know how to programmatically verify if working directory is correctly set. Another approach would be to invoke runFlank[config] -PdumpShards and check if json is saved into correct dir but that would require CI to be authenticated...
|
@runningcode I simplified logic a bit and moved set up dir function into |
|
Buildscan url for run 345638774 |
Fixes #148
If no
localResultsDirset fladle will configure tasks (for each configuration) with a working directory specific to each configuration.This allows delegating the creation of the results directory to the flank.