Skip to content

Commit

Permalink
[aarch64] Do not hardcode lib dir. Contributes to JB#50027
Browse files Browse the repository at this point in the history
Cleanup spec.
  • Loading branch information
mlehtima committed May 29, 2020
1 parent 2502c51 commit 11b97ac
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
5 changes: 1 addition & 4 deletions rpm/nemo-qml-plugin-filemanager.spec
Expand Up @@ -2,9 +2,8 @@ Name: nemo-qml-plugin-filemanager
Summary: File manager plugin for Nemo Mobile
Version: 0.1.21
Release: 1
Group: System/Libraries
License: BSD
URL: https://git.merproject.org/mer-core/nemo-qml-plugin-filemanager
URL: https://git.sailfishos.org/mer-core/nemo-qml-plugin-filemanager
Source0: %{name}-%{version}.tar.bz2
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Expand All @@ -22,15 +21,13 @@ BuildRequires: pkgconfig(KF5Archive)

%package devel
Summary: Filemanager C++ library
Group: System/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
%{summary}.

%package tests
Summary: File manager plugin tests
Group: System/Libraries
Requires: %{name} = %{version}-%{release}

%description tests
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/auto.pro
Expand Up @@ -6,6 +6,6 @@ QML_FILES = tst_*.qml
OTHER_FILES += $${QML_FILES}

target.files = $${QML_FILES} folder hiddenfolder protectedfolder
target.path = /usr/lib/$${PACKAGENAME}-tests/auto
target.path = $$[QT_INSTALL_LIBS]/$${PACKAGENAME}-tests/auto

INSTALLS += target
2 changes: 1 addition & 1 deletion tests/tests.pro
Expand Up @@ -6,7 +6,7 @@ SUBDIRS = auto \

OTHER_FILES += tests.xml.template

system(sed -e s/@PACKAGENAME@/$${PACKAGENAME}/g tests.xml.template > tests.xml)
system(sed -e s/@PACKAGENAME@/$${PACKAGENAME}/g -e s/@LIBDIR@/$$[QT_INSTALL_LIBS]/g tests.xml.template > tests.xml)

xml.path = /usr/share/$${PACKAGENAME}-tests
xml.files = tests.xml
Expand Down
16 changes: 8 additions & 8 deletions tests/tests.xml.template
Expand Up @@ -3,36 +3,36 @@
<suite name="@PACKAGENAME@-tests" domain="Middleware">
<set name="@PACKAGENAME@-qml" feature="@PACKAGENAME@">
<case name="FileModel">
<step>cd /usr/lib/@PACKAGENAME@-tests/auto &amp;&amp; /usr/lib/qt5/bin/qmltestrunner -input tst_filemodel.qml</step>
<step>cd @LIBDIR@@PACKAGENAME@-tests/auto &amp;&amp; @LIBDIR@/qt5/bin/qmltestrunner -input tst_filemodel.qml</step>
</case>
<case name="FileEngine">
<step>cd /usr/lib/@PACKAGENAME@-tests/auto &amp;&amp; /usr/lib/qt5/bin/qmltestrunner -input tst_fileengine.qml</step>
<step>cd @LIBDIR@@PACKAGENAME@-tests/auto &amp;&amp; @LIBDIR@/qt5/bin/qmltestrunner -input tst_fileengine.qml</step>
</case>
</set>
<set name="@PACKAGENAME@-diskusage" description="ut_diskusage" feature="@PACKAGENAME@">
<case name="testSimple" description="Test basic functionality"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSimple</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSimple</step>
</case>
<case name="testSubtractApkdFromRoot" description="Test if subtracting :apkd: from / works"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSubtractApkdFromRoot</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSubtractApkdFromRoot</step>
</case>
<case name="testSubtractRPMFromRoot" description="Test if subtracting :rpm: from / works"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSubtractRPMFromRoot</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSubtractRPMFromRoot</step>
</case>
<case name="testSubtractSubdirectory" description="Test if subtracting a subdirectory works"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSubtractSubdirectory</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSubtractSubdirectory</step>
</case>
<case name="testSubtractNestedSubdirectory" description="Test if subtracting nested subdirectories works"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSubtractNestedSubdirectory</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSubtractNestedSubdirectory</step>
</case>
<case name="testSubtractNestedSubdirectoryMulti" description="Test if subtracting nested and sibling subdirectories works"
type="Functional" level="Component" timeout="600">
<step expected_result="0">/usr/lib/@PACKAGENAME@-tests/ut_diskusage testSubtractNestedSubdirectoryMulti</step>
<step expected_result="0">@LIBDIR@@PACKAGENAME@-tests/ut_diskusage testSubtractNestedSubdirectoryMulti</step>
</case>
</set>
</suite>
Expand Down
4 changes: 2 additions & 2 deletions tests/ut_diskusage/ut_diskusage.pro
Expand Up @@ -6,7 +6,7 @@ QT -= gui
TEMPLATE = app
TARGET = ut_diskusage

target.path = /usr/lib/$${PACKAGENAME}-tests
target.path = $$[QT_INSTALL_LIBS]/$${PACKAGENAME}-tests

contains(cov, true) {
message("Coverage options enabled")
Expand All @@ -19,7 +19,7 @@ DEFINES += UNIT_TEST
QMAKE_EXTRA_TARGETS = check

check.depends = $$TARGET
check.commands = LD_LIBRARY_PATH=../../lib ./$$TARGET
check.commands = LD_LIBRARY_PATH=../../../$$[QT_INSTALL_LIBS] ./$$TARGET

INCLUDEPATH += ../../src/plugin/

Expand Down

0 comments on commit 11b97ac

Please sign in to comment.