Commit 120b3b54 authored by Martin Kampas's avatar Martin Kampas

[ssu] Extract libsandboxhook.so from tests package. Contributes to JB#38303

So that independed tools can use it without the need to install -tests
package (brings a lot of dependencies).
parent fddd5822
......@@ -31,6 +31,7 @@ Requires: ssu-network-proxy
%{_libdir}/zypp/plugins/urlresolver/*
%{_bindir}/ssu
%{_libdir}/libssu.so.*
%{_libdir}/ssu/libsandboxhook.so
%dir %{_sysconfdir}/zypp/credentials.d
# ssu itself does not use the package-update triggers, but provides
# them for the vendor data packages to use
......
SSU_SANDBOX_PATH = /usr/lib/ssu/libsandboxhook.so
DEFINES += SSU_SANDBOX_PATH="'\"$${SSU_SANDBOX_PATH}\"'"
TARGET = sandboxhook
include(../testlibrary.pri)
include(../ssu_common.pri)
include(sandboxhook_dependencies.pri)
TEMPLATE = lib
TARGET = sandboxhook
CONFIG += unversioned_libname
SOURCES = sandboxhook.cpp
DESTDIR = $$DESTDIR_LIB
target.path = /usr/lib/ssu
INSTALLS += target
include(../libssu/libssu.pri)
......@@ -7,11 +7,12 @@ ssuconfhack {
SUBDIRS += ssuconfperm
}
SUBDIRS += tests tools
SUBDIRS += sandboxhook tests tools
ssucli.depends = libssu
ssuurlresolver.depends = libssu
tests.depends = libssu
sandboxhook.depends = libssu
tests.depends = libssu sandboxhook
ssuks.depends = libssu
ssud.depends = libssu
ssuslipstream.depends = libssu
......
......@@ -3,7 +3,6 @@ CONFIG += ordered coverage debug
SUBDIRS = \
testutils \
formatoutput \
testutils/sandboxhook.pro \
ut_coreconfig \
ut_deviceinfo \
ut_featuremodel \
......
......@@ -30,7 +30,7 @@ void SsuCliTest::init()
qDebug() << "Using in-tree sandbox";
setenv("LD_PRELOAD", getenv("SSU_SANDBOX_PATH"), 1);
} else
setenv("LD_PRELOAD", qPrintable(QString("%1/libsandboxhook.so").arg(TESTS_PATH)), 1);
setenv("LD_PRELOAD", SSU_SANDBOX_PATH, 1);
m_bus = new QProcess(this);
m_bus->start("dbus-daemon",
......
include(../../libssu/libssu.pri)
include(../../sandboxhook/sandboxhook.pri)
include(../testutils/testutils.pri)
......@@ -32,7 +32,7 @@ void SsuUrlResolverTest::initTestCase()
qDebug() << "Using in-tree sandbox";
setenv("LD_PRELOAD", getenv("SSU_SANDBOX_PATH"), 1);
} else
setenv("LD_PRELOAD", qPrintable(QString("%1/libsandboxhook.so").arg(TESTS_PATH)), 1);
setenv("LD_PRELOAD", SSU_SANDBOX_PATH, 1);
}
void SsuUrlResolverTest::cleanupTestCase()
......
include(../../libssu/libssu.pri)
include(../../sandboxhook/sandboxhook.pri)
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