Skip to content

Commit 9b5162d

Browse files
committed
Improve the test distributors
1. Use "with" when opening files. 2. Add module docstrings.
1 parent 33dbf55 commit 9b5162d

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

llvm/test/ThinLTO/X86/dtlto/dtlto.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ RUN: opt t2.ll -o t2.o
1414
RUN: mkdir %t/out && cd %t/out
1515

1616
# Define a substitution to share the common DTLTO arguments.
17-
DEFINE: %{command} =llvm-lto2 run ../t1.bc ../t2.bc -o t.o \
18-
DEFINE: -dtlto \
19-
DEFINE: -dtlto-remote-opt-tool=dummy \
20-
DEFINE: -dtlto-distributor=%python \
21-
DEFINE: -thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \
22-
DEFINE: -thinlto-distributor-arg=../t1.o \
23-
DEFINE: -thinlto-distributor-arg=../t2.o \
24-
DEFINE: -r=../t1.bc,t1,px \
25-
DEFINE: -r=../t2.bc,t2,px
17+
DEFINE: %{command} = llvm-lto2 run ../t1.bc ../t2.bc -o t.o \
18+
DEFINE: -dtlto \
19+
DEFINE: -dtlto-remote-opt-tool=dummy \
20+
DEFINE: -dtlto-distributor=%python \
21+
DEFINE: -thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \
22+
DEFINE: -thinlto-distributor-arg=../t1.o \
23+
DEFINE: -thinlto-distributor-arg=../t2.o \
24+
DEFINE: -r=../t1.bc,t1,px \
25+
DEFINE: -r=../t2.bc,t2,px
2626

2727
# Perform DTLTO. mock.py does not do any compilation, instead it simply writes
2828
# the contents of the object files supplied on the command line into the

llvm/test/ThinLTO/X86/dtlto/imports.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ RUN: opt -thinlto-bc 1.ll -o 1.bc -O2
88

99
# Define a substitution to share the common DTLTO arguments. Note that the use
1010
# of validate.py will cause a failure as it does not create output files.
11-
DEFINE: %{command} =llvm-lto2 run \
12-
DEFINE: 0.bc 1.bc -o t.o \
11+
DEFINE: %{command} = llvm-lto2 run 0.bc 1.bc -o t.o \
1312
DEFINE: -dtlto \
1413
DEFINE: -dtlto-remote-opt-tool=dummy \
1514
DEFINE: -dtlto-distributor=%python \

llvm/test/ThinLTO/X86/dtlto/summary.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN: opt t1.ll -o t1.o
1212
RUN: opt t2.ll -o t2.o
1313

1414
# Define a substitution to share the common arguments.
15-
DEFINE: %{command} =llvm-lto2 run t1.bc t2.bc -o t.o \
15+
DEFINE: %{command} = llvm-lto2 run t1.bc t2.bc -o t.o \
1616
DEFINE: -r=t1.bc,t1,px \
1717
DEFINE: -r=t2.bc,t2,px \
1818
DEFINE: -r=t2.bc,t1 \

llvm/test/ThinLTO/X86/dtlto/triple.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ RUN: opt t2.ll -o t2.o
1313
# Perform DTLTO. mock.py does not do any compilation, instead it emits the
1414
# object files supplied using -thinlto-distributor-arg in job order.
1515
RUN: not llvm-lto2 run t1.bc t2.bc -o t.o -save-temps \
16-
RUN: -dtlto \
17-
RUN: -dtlto-remote-opt-tool=dummy \
18-
RUN: -dtlto-distributor=%python \
19-
RUN: -thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \
20-
RUN: -thinlto-distributor-arg=t1.o \
21-
RUN: -thinlto-distributor-arg=t2.o \
22-
RUN: -r=t1.bc,t1,px \
23-
RUN: -r=t2.bc,t2,px 2>&1 | FileCheck %s
16+
RUN: -dtlto \
17+
RUN: -dtlto-remote-opt-tool=dummy \
18+
RUN: -dtlto-distributor=%python \
19+
RUN: -thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \
20+
RUN: -thinlto-distributor-arg=t1.o \
21+
RUN: -thinlto-distributor-arg=t2.o \
22+
RUN: -r=t1.bc,t1,px \
23+
RUN: -r=t2.bc,t2,px 2>&1 | FileCheck %s
2424

2525
# This check ensures that we have failed for the expected reason.
2626
CHECK: failed: DTLTO backend compilation: all triples must be consistent

0 commit comments

Comments
 (0)