[LNT] r216290 - Make sure lit tests pass on non-Darwin systems

Yi Kong Yi.Kong at arm.com
Fri Aug 22 14:48:41 PDT 2014


Author: kongyi
Date: Fri Aug 22 16:48:41 2014
New Revision: 216290

URL: http://llvm.org/viewvc/llvm-project?rev=216290&view=rev
Log:
Make sure lit tests pass on non-Darwin systems

lit tests always fail on non-Darwin systems because --use-isolation uses
utilities that are only available on OS X.

This patch moves the test to an Darwin-only test case, so that unit tests can
be ran by Linux buildbots.

Added:
    lnt/trunk/tests/runtest/nt-darwin.py
Modified:
    lnt/trunk/tests/lit.cfg
    lnt/trunk/tests/runtest/nt.py

Modified: lnt/trunk/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lit.cfg?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- lnt/trunk/tests/lit.cfg (original)
+++ lnt/trunk/tests/lit.cfg Fri Aug 22 16:48:41 2014
@@ -41,6 +41,8 @@ if lit_config.params.get('long', None):
 if lit_config.params.get('postgres', None):
     config.available_features.add('postgres')
 
+config.available_features.add(platform.system())
+
 # Enable coverage.py reporting, assuming the coverage module has been installed
 # and sitecustomize.py in the virtualenv has been modified appropriately.
 if lit_config.params.get('check-coverage', None):

Added: lnt/trunk/tests/runtest/nt-darwin.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/nt-darwin.py?rev=216290&view=auto
==============================================================================
--- lnt/trunk/tests/runtest/nt-darwin.py (added)
+++ lnt/trunk/tests/runtest/nt-darwin.py Fri Aug 22 16:48:41 2014
@@ -0,0 +1,13 @@
+# Darwin specific testing for the 'lnt runtest nt' module.
+
+# Run with sandboxing enabled.
+# RUN: lnt runtest nt \
+# RUN:   --sandbox %t.SANDBOX \
+# RUN:   --test-suite %S/Inputs/test-suite \
+# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
+# RUN:   --no-timestamp --use-isolation > %t.log 2> %t.err
+# RUN: FileCheck --check-prefix CHECK-SANDBOX < %t.err %s
+#
+# CHECK-SANDBOX: creating sandbox profile
+
+# REQUIRES: Darwin

Modified: lnt/trunk/tests/runtest/nt.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/nt.py?rev=216290&r1=216289&r2=216290&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/nt.py (original)
+++ lnt/trunk/tests/runtest/nt.py Fri Aug 22 16:48:41 2014
@@ -55,16 +55,6 @@
 # RUN:   --no-auto-name foo > %t.log 2> %t.err
 # RUN: FileCheck --check-prefix CHECK-AUTONAME < %t.err %s
 # CHECK-AUTONAME: using nickname: 'foo'
-#
-# Run with sandboxing enabled.
-# RUN: lnt runtest nt \
-# RUN:   --sandbox %t.SANDBOX \
-# RUN:   --test-suite %S/Inputs/test-suite \
-# RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
-# RUN:   --no-timestamp --use-isolation > %t.log 2> %t.err
-# RUN: FileCheck --check-prefix CHECK-SANDBOX < %t.err %s
-#
-# CHECK-SANDBOX: creating sandbox profile
 
 # Run without LLVM.
 # RUN: lnt runtest nt \





More information about the llvm-commits mailing list