]> granicus.if.org Git - llvm/commitdiff
Revert "lit.py: Add new %{shared_output(LABEL)} substitution"
authorJordan Rose <jordan_rose@apple.com>
Sat, 14 Oct 2017 04:01:27 +0000 (04:01 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 14 Oct 2017 04:01:27 +0000 (04:01 +0000)
This reverts r315697 and my ill-fated attempts to fix it on Windows.
I'll try again when I get access to a Windows machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315793 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/lit.rst
docs/TestingGuide.rst
utils/lit/lit/TestRunner.py
utils/lit/lit/run.py
utils/lit/tests/Inputs/shared-output/lit.cfg [deleted file]
utils/lit/tests/Inputs/shared-output/primary.txt [deleted file]
utils/lit/tests/Inputs/shared-output/secondary.txt [deleted file]
utils/lit/tests/Inputs/shared-output/sub/sub.txt [deleted file]
utils/lit/tests/shared-output.py [deleted file]

index 57d804478fc07b708d5fdf2248fc156f1f5fd21f..fbe1a9ab1843f950fd61efe4b20da40862f4e6f7 100644 (file)
@@ -395,18 +395,17 @@ PRE-DEFINED SUBSTITUTIONS
 :program:`lit` provides various patterns that can be used with the RUN command.
 These are defined in TestRunner.py. The base set of substitutions are:
 
- ======================= ==============
-  Macro                   Substitution
- ======================= ==============
- %s                      source path (path to the file currently being run)
- %S                      source dir (directory of the file currently being run)
- %p                      same as %S
- %{pathsep}              path separator
- %t                      temporary file name unique to the test
- %T                      temporary directory unique to the test
- %{shared_output(LABEL)} temporary file name, identified by "LABEL", shared across all tests
- %%                      %
- ======================= ==============
+ ========== ==============
+  Macro      Substitution
+ ========== ==============
+ %s         source path (path to the file currently being run)
+ %S         source dir (directory of the file currently being run)
+ %p         same as %S
+ %{pathsep} path separator
+ %t         temporary file name unique to the test
+ %T         temporary directory unique to the test
+ %%         %
+ ========== ==============
 
 Other substitutions are provided that are variations on this base set and
 further substitution patterns can be defined by each test module. See the
index cd1f00b20f9fbd15ea2686227b46bfc0c3e29e07..a27da0de4d0e29de083c2bb470aaa7aedc841c0a 100644 (file)
@@ -464,12 +464,6 @@ RUN lines:
 
    Example: ``/home/user/llvm.build/test/MC/ELF/Output``
 
-``%{shared_output(LABEL)}``
-   File path to a temporary file name shared across all tests, identified by
-   LABEL. This is useful as a cache for generated resources.
-
-   Example: ``/home/user/llvm.build/test/Output/Shared/LABEL.tmp``
-
 ``%{pathsep}``
 
    Expands to the path separator, i.e. ``:`` (or ``;`` on Windows).
index 6680bd0312c14032d9f83e3aa38cc57c789a1a88..b874f9ee61b68e7db9df0a8aed4f06ad9692ebb3 100644 (file)
@@ -829,9 +829,6 @@ def getDefaultSubstitutions(test, tmpDir, tmpBase, normalize_slashes=False):
     sourcepath = test.getSourcePath()
     sourcedir = os.path.dirname(sourcepath)
 
-    sharedOutputDir = os.path.join(test.suite.exec_root, 'Output', 'Shared')
-    sharedOutputDir += os.path.sep
-
     # Normalize slashes, if requested.
     if normalize_slashes:
         sourcepath = sourcepath.replace('\\', '/')
@@ -852,8 +849,6 @@ def getDefaultSubstitutions(test, tmpDir, tmpBase, normalize_slashes=False):
                           ('%t', tmpName),
                           ('%basename_t', baseName),
                           ('%T', tmpDir),
-                          ('%{shared_output\(([-+=._a-zA-Z0-9]+)\)}',
-                           '%s\\1.tmp' % (sharedOutputDir,)),
                           ('#_MARKER_#', '%')])
 
     # "%/[STpst]" should be normalized.
index 92dfed97d7591ebfb5c3ee3ab8698506c393f554..a4a21234fa3b5d6ffa016b0039a6a79a16eb3ad7 100644 (file)
@@ -1,5 +1,4 @@
 import os
-import shutil
 import sys
 import threading
 import time
@@ -137,13 +136,6 @@ class Run(object):
                 return True
             win32api.SetConsoleCtrlHandler(console_ctrl_handler, True)
 
-        # Make fresh shared output directories.
-        suites = set(test.suite for test in self.tests)
-        for suite in suites:
-            shared_dir = os.path.join(suite.exec_root, 'Output', 'Shared')
-            shutil.rmtree(shared_dir, ignore_errors=True)
-            lit.util.mkdir_p(shared_dir)
-
         # Save the display object on the runner so that we can update it from
         # our task completion callback.
         self.display = display
diff --git a/utils/lit/tests/Inputs/shared-output/lit.cfg b/utils/lit/tests/Inputs/shared-output/lit.cfg
deleted file mode 100644 (file)
index 121bff7..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-import lit.formats
-config.name = 'shared-output'
-config.suffixes = ['.txt']
-config.test_format = lit.formats.ShTest()
-config.test_source_root = os.path.dirname(os.path.realpath(__file__))
diff --git a/utils/lit/tests/Inputs/shared-output/primary.txt b/utils/lit/tests/Inputs/shared-output/primary.txt
deleted file mode 100644 (file)
index 7da1dee..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-RUN: echo "primary" >> %{shared_output(SHARED)}
-RUN: echo "other" >> %{shared_output(OTHER)}
diff --git a/utils/lit/tests/Inputs/shared-output/secondary.txt b/utils/lit/tests/Inputs/shared-output/secondary.txt
deleted file mode 100644 (file)
index c706a59..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RUN: echo "secondary" >> %{shared_output(SHARED)}
diff --git a/utils/lit/tests/Inputs/shared-output/sub/sub.txt b/utils/lit/tests/Inputs/shared-output/sub/sub.txt
deleted file mode 100644 (file)
index 4418b34..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RUN: echo "sub" >> %{shared_output(SHARED)}
diff --git a/utils/lit/tests/shared-output.py b/utils/lit/tests/shared-output.py
deleted file mode 100644 (file)
index 616f857..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-# XFAIL: windows
-# Still need to work out some path issues
-
-# RUN: rm -rf %t && mkdir -p %t
-# RUN: echo 'lit_config.load_config(config, os.path.join(r"%{inputs}", "shared-output", "lit.cfg"))' > %t/lit.site.cfg
-# RUN: %{lit} %t
-# RUN: FileCheck %s < %t/Output/Shared/SHARED.tmp
-# RUN: FileCheck -check-prefix=NEGATIVE %s < %t/Output/Shared/SHARED.tmp
-# RUN: FileCheck -check-prefix=OTHER %s <  %t/Output/Shared/OTHER.tmp
-
-# CHECK-DAG: primary
-# CHECK-DAG: secondary
-# CHECK-DAG: sub
-
-# NEGATIVE-NOT: other
-# OTHER: other