[LNT] r248470 - Avoid leaving temporary files in the source when running unit tests.

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 00:37:32 PDT 2015


Author: kbeyls
Date: Thu Sep 24 02:37:30 2015
New Revision: 248470

URL: http://llvm.org/viewvc/llvm-project?rev=248470&view=rev
Log:
Avoid leaving temporary files in the source when running unit tests.

Modified:
    lnt/trunk/tests/lit.cfg
    lnt/trunk/tests/runtest/rerun.py

Modified: lnt/trunk/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lit.cfg?rev=248470&r1=248469&r2=248470&view=diff
==============================================================================
--- lnt/trunk/tests/lit.cfg (original)
+++ lnt/trunk/tests/lit.cfg Thu Sep 24 02:37:30 2015
@@ -23,7 +23,7 @@ config.excludes = ['__init__.py', 'Input
 
 # test_source_root: The root path where tests are located.
 config.test_source_root = os.path.dirname(__file__)
-config.test_exec_root = config.test_source_root
+config.test_exec_root = 'test_run_tmp'
 
 config.target_triple = None
 
@@ -36,6 +36,7 @@ config.substitutions.append(('%src_root'
 config.substitutions.append(('%{src_root}', src_root))
 config.substitutions.append(('%{shared_inputs}', os.path.join(
             src_root, 'tests', 'SharedInputs')))
+config.substitutions.append(('%{test_exec_root}', config.test_exec_root))
 
 if lit_config.params.get('long', None):
     config.available_features.add('long')

Modified: lnt/trunk/tests/runtest/rerun.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/rerun.py?rev=248470&r1=248469&r2=248470&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/rerun.py (original)
+++ lnt/trunk/tests/runtest/rerun.py Thu Sep 24 02:37:30 2015
@@ -1,11 +1,14 @@
 # Testing for the rerun feature of LNT nt.
-# This test runs two stub test suites. The scond one has different values for
+# This test runs two stub test suites. The second one has different values for
 # some of the test, so they should be marked as regressions, and reruns should
 # be triggered.
 
-# RUN: rsync -av --exclude .svn %S/Inputs/rerun_server_instance/ %S/Output/server
+# RUN: mkdir -p %{test_exec_root}/runtest/server_instance
+# RUN: rsync -av --exclude .svn %S/Inputs/rerun_server_instance/ \
+# RUN:   %{test_exec_root}/runtest/rerun_server_instance
 # RUN: rm -f CHECK-STDOUT CHECK-STDOUT2 CHECK-STDERR CHECK-STDERR2
-# RUN: %S/Inputs/runtest_server_wrapper.sh %S/Output/server nt \
+# RUN: %S/Inputs/runtest_server_wrapper.sh \
+# RUN:   %{test_exec_root}/runtest/rerun_server_instance nt \
 # RUN:   --sandbox %t.SANDBOX \
 # RUN:   --test-suite %S/Inputs/rerun-test-suite1 \
 # RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
@@ -29,11 +32,13 @@
 # CHECK-STDERR: submitting result to
 # CHECK-STDERR: note: Rerunning 0 of 69 benchmarks.
 
-# RUN: %S/Inputs/runtest_server_wrapper.sh %S/Output/server nt \
+# RUN: %S/Inputs/runtest_server_wrapper.sh \
+# RUN:   %{test_exec_root}/runtest/rerun_server_instance nt \
 # RUN:   --sandbox %t.SANDBOX2 \
 # RUN:   --test-suite %S/Inputs/rerun-test-suite2 \
 # RUN:   --cc %{shared_inputs}/FakeCompilers/clang-r154331 \
-# RUN:   --no-timestamp --rerun --run-order 4 --verbose > %t.2.log 2> %t.2.err || cat %t.2.err
+# RUN:   --no-timestamp --rerun --run-order 4 --verbose \
+# RUN:   > %t.2.log 2> %t.2.err || cat %t.2.err
 # RUN: echo "Run 2"
 # RUN: FileCheck --check-prefix CHECK-STDOUT2 < %t.2.log %s
 # RUN: FileCheck --check-prefix CHECK-STDERR2 < %t.2.err %s




More information about the llvm-commits mailing list