Write junit-report to reports directory to allow installation from read-only spack#20158
Write junit-report to reports directory to allow installation from read-only spack#20158haampie merged 2 commits intospack:developfrom
Conversation
|
@tgamblin since we were discussing |
|
One problem is that this does not work when running tests, because I'm thinking it could make sense to change the default config when running tests s.t. all paths point to $tempdir/..., would that be an idea @alalazo? |
Add the patch for spack/spack#20158 Add a config.yaml file
lib/spack/spack/cmd/install.py
Outdated
| basename = fmt.format(x=spec, hash=spec.dag_hash()) | ||
| dirname = fs.os.path.join(spack.paths.var_path, 'junit-report') | ||
| dirname = spack.config.get( | ||
| 'config:misc_cache', spack.paths.var_path) |
There was a problem hiding this comment.
I'm not sure we want to clear this every time we clear the misc cache. Reports are really less transient than what we usually put in there.
Can you make it so that these have their own directory within ~/.spack? I'd recommend putting them in ~/.spack/reports/junit, and adding ~/.spack/reports to spack.paths.
There was a problem hiding this comment.
@tgamblin makes sense, done! The only downside is that this directory location (~/.spack/reports/junit) is now no longer configurable, right? But perhaps that is not required anyway.
|
Are we actually fine with the tests writing to ~/.spack? Because I think that's what happens right now. |
|
Yeah, let's leave that outside the scope of this PR. |
Together with #20137 this lets me use spack instances on read-only filesystems. It seemed like
misc_cachewas fine to use here, but I can also introduce a separate config entry.