Commit e5b748c5 authored by pvuorela's avatar pvuorela

Merge branch 'jb38303' into 'master'

Extract libsandboxhook.so from tests package and fix documentation a little

See merge request !11
parents fddd5822 e16cd298
......@@ -41,13 +41,15 @@ public:
* Check if a given model is available in the deviceinfo database, either directly,
* or as variant. If no model is provided as argument the autodetected or previously
* set model is used.
*
* @attention This function temporarily changes the detected model, and
* therefore should not be used in a multithreaded environment, unless you
* like funny results.
*/
bool contains(const QString &model = QString());
/**
* Try to find the device family for the system this is running on. This function
* temporarily changes the detected model, and therefore should not be used in a
* multithreaded environment, unless you like funny results.
* Try to find the device family for the system this is running on.
*/
Q_INVOKABLE QString deviceFamily();
......
......@@ -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