Commit 9ce75343 authored by Simon McVittie's avatar Simon McVittie

tests: Work when compiling for i386 on amd64

Signed-off-by: Simon McVittie's avatarSimon McVittie <smcv@collabora.com>
parent 6b78a90d
......@@ -343,8 +343,11 @@ AM_TESTS_ENVIRONMENT = export CAPSULE_CAPTURE_LIBS_TOOL="$(abs_b
export CAPSULE_CFLAGS="-I$(abs_top_srcdir) -I$(abs_top_builddir)"; \
export CAPSULE_LIBS="$(abs_top_builddir)/libcapsule.la"; \
export CAPSULE_SYMBOLS_TOOL="$(abs_builddir)/capsule-symbols";\
export CAPSULE_TESTS_GNU_BUILD="${build}"; \
export CAPSULE_TESTS_GNU_HOST="${host}"; \
export CAPSULE_TESTS_UNINSTALLED=1; \
export CAPSULE_VERSION_TOOL="$(abs_builddir)/capsule-version";\
export CC="${CC}"; \
export G_TEST_SRCDIR="$(abs_srcdir)"; \
export G_TEST_BUILDDIR="$(abs_builddir)";\
export G_DEBUG=gc-friendly; \
......
......@@ -51,6 +51,16 @@ my @sonames = qw(libEGL.so.1 libGL.so.1 libGLESv2.so.2 libGLX.so.0
libxcb-dri2.so.0 libxcb-glx.so.0 libxcb-present.so.0 libxcb-sync.so.1
libxcb.so.1);
my @configure_arguments = ();
if (length $ENV{CAPSULE_TESTS_GNU_BUILD}) {
push @configure_arguments, '--build', $ENV{CAPSULE_TESTS_GNU_BUILD};
}
if (length $ENV{CAPSULE_TESTS_GNU_HOST}) {
push @configure_arguments, '--host', $ENV{CAPSULE_TESTS_GNU_HOST};
}
# Don't require running capsule-version - just use the major versions
sub use_major_version {
my $soname = shift;
......@@ -73,6 +83,7 @@ run_ok([$CAPSULE_INIT_PROJECT_TOOL,
run_ok([
'sh', '-euc', 'cd "$1"; shift; ./configure "$@"',
'sh', "$test_tempdir/libEGL-proxy",
@configure_arguments,
], '>&2');
run_ok(['make', '-C', "$test_tempdir/libEGL-proxy", 'V=1'], '>&2');
......
......@@ -44,6 +44,16 @@ if (length $ENV{CAPSULE_TESTS_UNINSTALLED}) {
push @libcapsule_environment, "LD_LIBRARY_PATH=$ENV{G_TEST_BUILDDIR}/.libs";
}
my @configure_arguments = ();
if (length $ENV{CAPSULE_TESTS_GNU_BUILD}) {
push @configure_arguments, '--build', $ENV{CAPSULE_TESTS_GNU_BUILD};
}
if (length $ENV{CAPSULE_TESTS_GNU_HOST}) {
push @configure_arguments, '--host', $ENV{CAPSULE_TESTS_GNU_HOST};
}
run_ok([$CAPSULE_INIT_PROJECT_TOOL,
'--search-tree=/',
'--runtime-tree=/run/host',
......@@ -52,6 +62,7 @@ run_ok([$CAPSULE_INIT_PROJECT_TOOL,
run_ok([
'sh', '-euc', 'cd "$1"; shift; ./configure "$@"',
'sh', "$test_tempdir/libz-proxy",
@configure_arguments,
'--with-search-tree=/',
'--with-runtime-tree=/host',
], '>&2');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment