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).
This commit is contained in:
Peter Scheibel 2015-10-26 11:58:52 -07:00
parent cc0ee3dc29
commit 6a16040462

View File

@ -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