Skip to content

Commit

Permalink
Fix tests for debug symbol builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Aug 26, 2023
1 parent b242279 commit 9d9c6d7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_verify_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def validate_shebang(path):
build
/ "lib"
/ f"python{minor_version}"
/ f"config-{minor_version}-{get_triplet()}"
/ f"config-{minor_version}d-{get_triplet()}"
/ "python-config.py"
)
assert path.exists()
Expand Down Expand Up @@ -498,6 +498,12 @@ def test_moving_pip_installed_c_extentions(pipexec, build, minor_version):
@pytest.mark.skip_unless_on_linux
@pytest.mark.parametrize("cryptography_version", ["40.0.1", "39.0.2"])
def test_cryptography_rpath(pipexec, build, minor_version, cryptography_version):
def find_library(path, search):
for root, dirs, files in os.walk(path):
for fname in files:
if fname.startswith(search) and fname.endswith(".so"):
return fname

env = os.environ.copy()
env["RELENV_BUILDENV"] = "yes"
p = subprocess.run(
Expand All @@ -521,7 +527,7 @@ def test_cryptography_rpath(pipexec, build, minor_version, cryptography_version)
/ "bindings"
)
if cryptography_version == "39.0.2":
osslinked = "_openssl.abi3.so"
osslinked = find_library(bindings, "_openssl")
else:
osslinked = "_rust.abi3.so"
p = subprocess.run(
Expand Down

0 comments on commit 9d9c6d7

Please sign in to comment.