Skip to content

Commit 13e82ab

Browse files
committed
Made the test architecture independent
1 parent 76fabbd commit 13e82ab

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

bolt/test/lit.cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
import lit.util
1111

1212
from lit.llvm import llvm_config
13-
from lit.llvm.subst import ToolSubst
14-
from lit.llvm.subst import FindTool
13+
from lit.llvm.subst import FindTool, ToolSubst
1514

1615
# Configuration file for the 'lit' test runner.
1716

@@ -138,6 +137,7 @@
138137
unresolved="fatal",
139138
extra_args=[link_fdata_cmd],
140139
),
140+
ToolSubst("process-debug-line", unresolved="fatal"),
141141
ToolSubst("merge-fdata", unresolved="fatal"),
142142
ToolSubst("llvm-readobj", unresolved="fatal"),
143143
ToolSubst("llvm-dwp", unresolved="fatal"),

bolt/test/X86/multi-cu-debug-line.test renamed to bolt/test/multi-cu-debug-line.test

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
## Test that BOLT correctly handles debug line information for functions
22
## that belong to multiple compilation units (e.g., inline functions in
33
## common header files). The test covers two scenarios:
4-
## 1. Normal processing: .debug_line section shows lines for the function
4+
## 1. Normal processing: .debug_line section shows lines for the function
55
## in all CUs where it was compiled, with no duplicate rows within CUs
6-
## 2. Functions not processed: When BOLT doesn't process functions (using
6+
## 2. Functions not processed: When BOLT doesn't process functions (using
77
## --funcs with nonexistent function), original debug info is preserved
88

99
# REQUIRES: system-linux
1010

1111
## Compile test files with debug info
12-
# RUN: %clang %cflags -O0 -g %S/../Inputs/multi-cu-file1.c %S/../Inputs/multi-cu-file2.c \
13-
# RUN: -I%S/../Inputs -o %t.exe -Wl,-q
12+
# RUN: %clang %cflags -O0 -g %S/Inputs/multi-cu-file1.c %S/Inputs/multi-cu-file2.c \
13+
# RUN: -I%S/Inputs -o %t.exe -Wl,-q
1414

1515
## Test 1: Normal BOLT processing (functions are processed/optimized)
1616
# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections
@@ -26,7 +26,7 @@
2626
# BASIC: name: "{{.*}}multi-cu-file2.c"
2727

2828
## Use our helper script to create a normalized table without addresses
29-
# RUN: %S/../Inputs/process-debug-line.sh %t.debug-line.txt > %t.normalized-debug-line.txt
29+
# RUN: process-debug-line %t.debug-line.txt > %t.normalized-debug-line.txt
3030
# RUN: FileCheck %s --check-prefix=NORMALIZED --input-file %t.normalized-debug-line.txt
3131

3232
## Check that we have line entries for the inline function (lines 5, 6, 7) from multi-cu-common.h
@@ -72,7 +72,7 @@
7272
# PRESERVED-BASIC: name: "{{.*}}multi-cu-file2.c"
7373

7474
## Create normalized output for the not-emitted case
75-
# RUN: %S/../Inputs/process-debug-line.sh %t.not-emitted.debug-line.txt > %t.not-emitted.normalized.txt
75+
# RUN: process-debug-line %t.not-emitted.debug-line.txt > %t.not-emitted.normalized.txt
7676
# RUN: FileCheck %s --check-prefix=PRESERVED-NORMALIZED --input-file %t.not-emitted.normalized.txt
7777

7878
## Check that we have line entries for the inline function (lines 5, 6, 7) from multi-cu-common.h
@@ -105,4 +105,4 @@
105105
# PRESERVED-FILE2: multi-cu-file2.c {{[0-9]+}} {{[0-9]+}} multi-cu-file2.c
106106

107107
## Note: We do not check for duplicates in Test 2 since we are preserving original debug info as-is
108-
## and the original may contain patterns that would be flagged as duplicates by our normalization
108+
## and the original may contain patterns that would be flagged as duplicates by our normalization
File renamed without changes.

0 commit comments

Comments
 (0)