summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2015-10-26 11:58:52 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2015-10-26 11:58:52 -0700
commit6a16040462b49acb356236a5f8114b055d680851 (patch)
tree3e0a8b5b8a0c0e198f65f9aa1e092b27969dc6e5 /lib
parentcc0ee3dc29516d6ceb49c4144fa3cb75d0120b0d (diff)
downloadspack-6a16040462b49acb356236a5f8114b055d680851.tar.gz
spack-6a16040462b49acb356236a5f8114b055d680851.tar.bz2
spack-6a16040462b49acb356236a5f8114b055d680851.tar.xz
spack-6a16040462b49acb356236a5f8114b055d680851.zip
Automatically create a 'test-output' directory in the current directory if no
output path is specified. Test output files are placed in this directory. Furthermore the filenames now have the prefix "test" (but otherwise are the string representation of the spec ID as before).
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/test-install.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/spack/spack/cmd/test-install.py b/lib/spack/spack/cmd/test-install.py
index d916519227..76602474a4 100644
--- a/lib/spack/spack/cmd/test-install.py
+++ b/lib/spack/spack/cmd/test-install.py
@@ -173,7 +173,10 @@ def test_install(parser, args):
if not args.output:
bId = BuildId(topSpec)
- outputFpath = join_path(os.getcwd(), "{0}.xml".format(bId.stringId()))
+ outputDir = join_path(os.getcwd(), "test-output")
+ if not os.path.exists(outputDir):
+ os.mkdir(outputDir)
+ outputFpath = join_path(outputDir, "test-{0}.xml".format(bId.stringId()))
else:
outputFpath = args.output