Merge pull request #125959 from mdevlamynck/fix-test-graphene

graphene: fix nixos test
master
Jan Tojnar 2021-06-07 02:10:03 +02:00 committed by GitHub
commit 1470b9bc18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View File

@ -23,7 +23,7 @@ index b9a2fb5..4b8629f 100644
+ value: '',
+ description: 'Installation directory for binary files in tests')
diff --git a/tests/meson.build b/tests/meson.build
index 77281f5..c4c7fac 100644
index 77281f5..7522456 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -21,8 +21,17 @@ unit_tests = [
@ -71,7 +71,12 @@ index 77281f5..c4c7fac 100644
),
env: ['MUTEST_OUTPUT=tap'],
protocol: 'tap',
@@ -70,13 +79,13 @@ if build_gir and host_system == 'linux' and not meson.is_cross_build()
@@ -66,17 +75,18 @@ endif
if build_gir and host_system == 'linux' and not meson.is_cross_build()
foreach unit: ['introspection.py']
wrapper = '@0@.test'.format(unit)
+ install_data(unit, install_dir: test_bindir)
custom_target(wrapper,
output: wrapper,
command: [
gen_installed_test,

View File

@ -12,6 +12,7 @@
, docbook_xsl
, docbook_xml_dtd_43
, gobject-introspection
, makeWrapper
}:
stdenv.mkDerivation rec {
@ -41,6 +42,7 @@ stdenv.mkDerivation rec {
pkg-config
gobject-introspection
python3
makeWrapper
];
buildInputs = [
@ -62,6 +64,12 @@ stdenv.mkDerivation rec {
postPatch = ''
patchShebangs tests/gen-installed-test.py
PATH=${python3.withPackages (pp: [ pp.pygobject3 pp.tappy ])}/bin:$PATH patchShebangs tests/introspection.py
'';
postFixup = ''
wrapProgram "${placeholder "installedTests"}/libexec/installed-tests/graphene-1.0/introspection.py" \
--prefix GI_TYPELIB_PATH : "$out/lib/girepository-1.0"
'';
passthru = {