[LNT] r180567 - [lnt] Add --no-timestamp option for 'lnt runtest compile'.
Daniel Dunbar
daniel at zuster.org
Thu Apr 25 12:07:49 PDT 2013
Author: ddunbar
Date: Thu Apr 25 14:07:49 2013
New Revision: 180567
URL: http://llvm.org/viewvc/llvm-project?rev=180567&view=rev
Log:
[lnt] Add --no-timestamp option for 'lnt runtest compile'.
- Patch by Chris Matthews.
Modified:
lnt/trunk/lnt/tests/compile.py
Modified: lnt/trunk/lnt/tests/compile.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/compile.py?rev=180567&r1=180566&r2=180567&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/compile.py (original)
+++ lnt/trunk/lnt/tests/compile.py Thu Apr 25 14:07:49 2013
@@ -661,6 +661,9 @@ class CompileTest(builtintest.BuiltinTes
type=str, default=None, metavar="PATH")
group = OptionGroup(parser, "Test Options")
+ group.add_option("", "--no-timestamp", dest="timestamp_build",
+ help="Don't timestamp build directory (for testing)",
+ action="store_false", default=True)
group.add_option("", "--cc", dest="cc", type='str',
help="Path to the compiler under test",
action="store", default=None)
@@ -780,9 +783,12 @@ class CompileTest(builtintest.BuiltinTes
print >>sys.stderr, "%s: creating sandbox: %r" % (
timestamp(), opts.sandbox_path)
os.mkdir(opts.sandbox_path)
- g_output_dir = os.path.join(os.path.abspath(opts.sandbox_path),
- "test-%s" % (
- timestamp().replace(' ','_').replace(':','-'),))
+ if opts.timestamp_build:
+ report_name = "test-%s" % (timestamp().replace(' ','_').replace(':','-'))
+ else:
+ report_name = "build"
+ g_output_dir = os.path.join(os.path.abspath(opts.sandbox_path),report_name)
+
try:
os.mkdir(g_output_dir)
except OSError,e:
More information about the llvm-commits
mailing list