[llvm-commits] [zorg] r152851 - /zorg/trunk/lnt/lnt/tests/nt.py

Daniel Dunbar daniel at zuster.org
Thu Mar 15 14:41:30 PDT 2012


Author: ddunbar
Date: Thu Mar 15 16:41:30 2012
New Revision: 152851

URL: http://llvm.org/viewvc/llvm-project?rev=152851&view=rev
Log:
[LNT] lnt.tests.nt: Don't require the nickname, use the machine name.

Modified:
    zorg/trunk/lnt/lnt/tests/nt.py

Modified: zorg/trunk/lnt/lnt/tests/nt.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/tests/nt.py?rev=152851&r1=152850&r2=152851&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/tests/nt.py (original)
+++ zorg/trunk/lnt/lnt/tests/nt.py Thu Mar 15 16:41:30 2012
@@ -1,5 +1,6 @@
 import csv
 import os
+import platform
 import re
 import shutil
 import subprocess
@@ -1045,11 +1046,13 @@
         parser.add_option_group(group)
 
         (opts, args) = parser.parse_args(args)
-        if len(args) != 1:
+        if len(args) == 0:
+            nick = platform.uname()[1]
+        elif len(args) == 1:
+            nick, = args
+        else:
             parser.error("invalid number of arguments")
 
-        nick, = args
-
         # The --without--llvm option is the default if no LLVM paths are given.
         if opts.llvm_src_root is None and opts.llvm_obj_root is None:
             opts.without_llvm = True





More information about the llvm-commits mailing list