Skip to content

Commit

Permalink
fix test using crypt
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Aug 1, 2021
1 parent aad77c2 commit f4c195f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion tests/integration/nonpy_rpath/extensions/testcrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
#include <crypt.h>

std::string crypt_something() {
return std::string(crypt("will error out", NULL));
char const* result = crypt("will error out", "\0");
if (result == NULL) {
return std::string("*");
}
return std::string(result);
}
4 changes: 1 addition & 3 deletions tests/integration/test_manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def test_nonpy_rpath(self, any_manylinux_container, docker_python, io_folder):
f'auditwheel repair --plat {policy} --only-plat -w /io /io/{orig_wheel}'
docker_exec(
manylinux_ctr,
["bash", "-c", "LD_LIBRARY_PATH=/usr/local/lib " + repair_command]
["bash", "-c", repair_command]
)
filenames = os.listdir(io_folder)
assert len(filenames) == 2
Expand All @@ -605,8 +605,6 @@ def test_nonpy_rpath(self, any_manylinux_container, docker_python, io_folder):

# Test the resulting wheel outside the manylinux container
docker_exec(docker_python, "pip install /io/" + repaired_wheel)
if 'musllinux' in tag:
pytest.xfail("libcrypt segfaults")
docker_exec(
docker_python,
["python", "-c",
Expand Down

0 comments on commit f4c195f

Please sign in to comment.