Skip to content

Commit 85c1b73

Browse files
authored
lit tests: Drop support for gdb < 8 and dependency on distutils pip package (#4681)
Fixes #4671.
1 parent 0ece34f commit 85c1b73

File tree

8 files changed

+7
-27
lines changed

8 files changed

+7
-27
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ commonSteps: &commonSteps
4242
fi
4343
# Install lit
4444
python3 --version
45-
python3 -m pip install --user setuptools wheel
4645
python3 -m pip install --user lit
4746
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
4847
# Download & extract host LDC if HOST_LDC_VERSION is set

.cirrus.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
common_steps_template: &COMMON_STEPS_TEMPLATE
55
install_lit_script: |
66
# Install lit
7-
rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED # required for Ubuntu 23.04
8-
python3 -m pip install --user setuptools wheel
7+
rm -f /usr/lib/python3.12/EXTERNALLY-MANAGED # required for Ubuntu 24.04
98
python3 -m pip install --user lit
109
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
1110
clone_submodules_script: |

.github/actions/1-setup/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ runs:
122122
set -euxo pipefail
123123
python3 --version
124124
if [[ '${{ runner.os }}-${{ inputs.arch }}' == 'macOS-arm64' ]]; then
125-
brew install lit python-setuptools
125+
brew install lit
126126
else
127-
python3 -m pip install --user setuptools wheel
128127
python3 -m pip install --user lit
129128
fi
130129
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1

.github/workflows/supported_llvm_versions.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ jobs:
5858
run: |
5959
set -euxo pipefail
6060
if [[ '${{ matrix.os }}' == 'macos-14' ]]; then
61-
brew install lit python-setuptools
61+
brew install lit
6262
else
63-
python3 -m pip install --user setuptools wheel
6463
python3 -m pip install --user lit
6564
fi
6665
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1

tests/debuginfo/classtypes_gdb.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This test fails due to newer version of GDB, see https://github.com/ldc-developers/ldc/issues/4389
44
// XFAIL: FreeBSD
55

6-
// RUN: %ldc %_gdb_dflags -g -of=%t %s
6+
// RUN: %ldc -g -of=%t %s
77
// RUN: sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," %s >%t.gdb
88
// RUN: gdb %t --batch -x %t.gdb >%t.out 2>&1
99
// RUN: FileCheck %s -check-prefix=CHECK < %t.out

tests/debuginfo/nested_gdb.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// REQUIRES: gdb
2-
// RUN: %ldc %_gdb_dflags -g -of=%t %s
2+
// RUN: %ldc -g -of=%t %s
33
// RUN: sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," %s >%t.gdb
44
// RUN: gdb %t --batch -x %t.gdb >%t.out 2>&1
55
// RUN: FileCheck %s -check-prefix=CHECK < %t.out

tests/debuginfo/print_gdb.d

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// REQUIRES: atleast_gdb80
2-
1+
// REQUIRES: gdb
32
// This test fails due to newer version of GDB, see https://github.com/ldc-developers/ldc/issues/4389
43
// XFAIL: FreeBSD
54

6-
// RUN: %ldc %_gdb_dflags -I%S -g -of=%t %s %S/inputs/import_a.d %S/inputs/import_b.d
5+
// RUN: %ldc -I%S -g -of=%t %s %S/inputs/import_a.d %S/inputs/import_b.d
76
// RUN: sed -e "/^\\/\\/ GDB:/!d" -e "s,// GDB:,," %s >%t.gdb
87
// RUN: env LANG=C gdb %t --batch -x %t.gdb >%t.out 2>&1
98
// RUN: FileCheck %s -check-prefix=CHECK < %t.out

tests/lit.site.cfg.in

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import string
77
import re
88
import subprocess
99
import glob
10-
from distutils.version import LooseVersion
1110

1211
# Cmake Boolean options
1312
ON = True
@@ -203,20 +202,6 @@ if (platform.system() == 'Windows') and os.path.isfile( cdb ):
203202
# Check whether GDB is present
204203
if (platform.system() != 'Windows') and lit.util.which('gdb', config.environment['PATH']):
205204
config.available_features.add('gdb')
206-
gdb_dflags = ''
207-
command = ['gdb', '--version']
208-
p = subprocess.Popen(command, stdout=subprocess.PIPE,
209-
stderr=subprocess.PIPE, universal_newlines=True)
210-
text = p.stdout.readline()
211-
m = re.compile('[^0-9]*([0-9]+[0-9.]*).*').match(text)
212-
if m is not None:
213-
gdb_version = m.group(1)
214-
if LooseVersion(gdb_version) < LooseVersion('7.8'):
215-
gdb_dflags = '-dwarf-version=2'
216-
elif LooseVersion(gdb_version) >= LooseVersion('8.0'):
217-
config.available_features.add('atleast_gdb80')
218-
219-
config.substitutions.append( ('%_gdb_dflags', gdb_dflags) )
220205

221206
if 'LD_LIBRARY_PATH' in os.environ:
222207
libs = []

0 commit comments

Comments
 (0)