Skip to content

Commit dd405f1

Browse files
committed
Revert D83834 "Add test utility 'extract'"
This reverts commit d054c7e. There are discussions about the utility name, its functionality and user interface. Revert before we reach consensus.
1 parent 740a164 commit dd405f1

File tree

17 files changed

+36
-276
lines changed

17 files changed

+36
-276
lines changed

lld/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ configure_lit_site_cfg(
2525
set(LLD_TEST_DEPS lld)
2626
if (NOT LLD_BUILT_STANDALONE)
2727
list(APPEND LLD_TEST_DEPS
28-
FileCheck count extract llc llvm-ar llvm-as llvm-bcanalyzer llvm-config llvm-cvtres
28+
FileCheck count llc llvm-ar llvm-as llvm-bcanalyzer llvm-config llvm-cvtres
2929
llvm-dis llvm-dwarfdump llvm-lib llvm-lipo llvm-mc llvm-nm llvm-objcopy
3030
llvm-objdump llvm-pdbutil llvm-readelf llvm-readobj llvm-strip not obj2yaml
3131
opt yaml2obj

lld/test/ELF/linkerscript/noload.s

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# REQUIRES: x86
2-
# RUN: extract asm %s -o %t.s && extract lds %s -o %t.lds
3-
# RUN: llvm-mc -filetype=obj -triple=x86_64 %t.s -o %t.o
4-
# RUN: ld.lld -o %t --script %t.lds %t.o
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3+
# RUN: echo "SECTIONS { \
4+
# RUN: .data_noload_a (NOLOAD) : { *(.data_noload_a) } \
5+
# RUN: .data_noload_b (0x10000) (NOLOAD) : { *(.data_noload_b) } \
6+
# RUN: .no_input_sec_noload (NOLOAD) : { . += 1; } \
7+
# RUN: .text (0x20000) : { *(.text) } };" > %t.script
8+
# RUN: ld.lld -o %t --script %t.script %t.o
59
# RUN: llvm-readelf -S -l %t | FileCheck %s
610

711
# CHECK: Name Type Address Off Size
@@ -12,7 +16,6 @@
1216
# CHECK: Type Offset VirtAddr PhysAddr
1317
# CHECK-NEXT: LOAD 0x001000 0x0000000000020000 0x0000000000020000
1418

15-
#--- asm
1619
.section .text,"ax",@progbits
1720
nop
1821

@@ -21,11 +24,3 @@
2124

2225
.section .data_noload_b,"aw",@progbits
2326
.zero 4096
24-
25-
#--- lds
26-
SECTIONS {
27-
.data_noload_a (NOLOAD) : { *(.data_noload_a) }
28-
.data_noload_b (0x10000) (NOLOAD) : { *(.data_noload_b) }
29-
.no_input_sec_noload (NOLOAD) : { . += 1; }
30-
.text (0x20000) : { *(.text) }
31-
}

lld/test/lit.cfg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
llvm_config.use_lld()
4040

4141
tool_patterns = [
42-
'extract', 'llc', 'llvm-as', 'llvm-mc', 'llvm-nm', 'llvm-objdump',
43-
'llvm-pdbutil', 'llvm-dwarfdump', 'llvm-readelf', 'llvm-readobj',
44-
'obj2yaml', 'yaml2obj', 'opt', 'llvm-dis']
42+
'llc', 'llvm-as', 'llvm-mc', 'llvm-nm', 'llvm-objdump', 'llvm-pdbutil',
43+
'llvm-dwarfdump', 'llvm-readelf', 'llvm-readobj', 'obj2yaml', 'yaml2obj',
44+
'opt', 'llvm-dis']
4545

4646
llvm_config.add_tool_substitutions(tool_patterns)
4747

@@ -87,7 +87,7 @@
8787
# Indirectly check if the mt.exe Microsoft utility exists by searching for
8888
# cvtres, which always accompanies it. Alternatively, check if we can use
8989
# libxml2 to merge manifests.
90-
if (lit.util.which('cvtres', config.environment['PATH']) or
90+
if (lit.util.which('cvtres', config.environment['PATH']) or
9191
config.llvm_libxml2_enabled):
9292
config.available_features.add('manifest_tool')
9393

llvm/docs/TestingGuide.rst

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -271,27 +271,8 @@ adding your code there instead of creating a new file.
271271
Extra files
272272
-----------
273273

274-
If your test requires extra files besides the file containing the ``RUN:`` lines
275-
and the extra files are small, consider specifying them in the same file and
276-
using ``extract`` to extract them. For example,
277-
278-
.. code-block:: llvm
279-
280-
; RUN: extract b %s -o %tb.ll
281-
; RUN: extract a %s | llvm-link - %tb.ll -S | FileCheck %s
282-
283-
; CHECK: ...
284-
285-
;--- a
286-
...
287-
;--- b
288-
...
289-
290-
The parts are separated by the regex ``^(.|//)--- <part>``. By default the
291-
extracted content has leading empty lines to preserve line numbers. Specify
292-
``--no-leading-lines`` to drop leading lines.
293-
294-
If the extra files are large, the idiomatic place to put them is in a subdirectory ``Inputs``.
274+
If your test requires extra files besides the file containing the ``RUN:``
275+
lines, the idiomatic place to put them is in a subdirectory ``Inputs``.
295276
You can then refer to the extra files as ``%S/Inputs/foo.bar``.
296277

297278
For example, consider ``test/Linker/ident.ll``. The directory structure is

llvm/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ set(LLVM_TEST_DEPENDS
5252
UnitTests
5353
bugpoint
5454
count
55-
extract
5655
llc
5756
lli
5857
lli-child-target

llvm/test/lit.cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def get_asan_rtlib():
130130
config.llvm_locstats_used = os.path.exists(llvm_locstats_tool)
131131

132132
tools = [
133-
ToolSubst('%extract', FindTool('extract')),
134133
ToolSubst('%lli', FindTool('lli'), post='.', extra_args=lli_args),
135134
ToolSubst('%llc_dwarf', FindTool('llc'), extra_args=llc_args),
136135
ToolSubst('%go', config.go_executable, unresolved='ignore'),

llvm/test/tools/extract/Inputs/basic-aa.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

llvm/test/tools/extract/Inputs/basic-bb.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

llvm/test/tools/extract/basic.test

Lines changed: 0 additions & 32 deletions
This file was deleted.

llvm/test/tools/extract/help.test

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)