Skip to content
Snippets Groups Projects
Commit dc9c1836 authored by Simon McVittie's avatar Simon McVittie
Browse files

Find root directory relative to CapsuleTest.pm


This ensures that it works for tests in a deeper subdirectory.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent f61d0b67
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -56,8 +56,9 @@ installed-tests.
=cut
# G_TEST_* convention stolen from GLib, even though we aren't using GTest
my (undef, $here, undef) = File::Spec->splitpath($INC{'CapsuleTest.pm'});
our $srcdir = $ENV{G_TEST_SRCDIR};
$srcdir = abs_path($FindBin::Bin."/..") unless defined $srcdir;
$srcdir = abs_path("$here/..") unless defined $srcdir;
=item $builddir
......@@ -68,7 +69,7 @@ installed-tests.
=cut
our $builddir = $ENV{G_TEST_BUILDDIR};
$builddir = abs_path($FindBin::Bin."/..") unless defined $builddir;
$builddir = abs_path("$here/..") unless defined $builddir;
diag "Source or installation directory: $srcdir";
diag "Build or installation directory: $builddir";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment