Skip to content

Commit 501b6ca

Browse files
committed
refactor: rework test_manylinux.py to handle musllinux
This avoid duplicating integration tests. Tests that are generic are going in the Anylinux class. Tests specific to manylinux are going in the Manylinux class. Tests specific to musllinux are going in the Musllinux class.
1 parent a2c6557 commit 501b6ca

5 files changed

Lines changed: 593 additions & 547 deletions

File tree

tests/integration/internal_rpath/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
.PHONY: all clean
2+
13
all: lib-src/b/libb.so lib-src/a/liba.so
24

5+
clean:
6+
-rm -f lib-src/b/libb.so lib-src/a/liba.so
37

48
lib-src/b/libb.so: lib-src/b/b.c
59
gcc -fPIC -shared -o lib-src/b/libb.so lib-src/b/b.c
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
.PHONY: all clean
2+
13
all: lib-src/b/libb.so lib-src/a/liba.so
24

5+
clean:
6+
-rm -f lib-src/b/libb.so lib-src/a/liba.so
37

48
lib-src/b/libb.so: lib-src/b/b.c
59
gcc -fPIC -shared -o lib-src/b/libb.so lib-src/b/b.c
610

711

812
lib-src/a/liba.so: lib-src/b/libb.so lib-src/a/a.c
9-
gcc -fPIC -shared -o lib-src/a/liba.so -Ilib-src/b -Llib-src/b -lb lib-src/a/a.c
13+
gcc -fPIC -shared -o lib-src/a/liba.so -Ilib-src/b lib-src/a/a.c -Llib-src/b -lb

tests/integration/nonpy_rpath/extensions/testcrypt.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
#include <crypt.h>
33

44
std::string crypt_something() {
5-
return std::string(crypt("will error out", NULL));
5+
char const* result = crypt("will error out", "\0");
6+
if (result == NULL) {
7+
return std::string("*");
8+
}
9+
return std::string(result);
610
}

0 commit comments

Comments
 (0)