Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
plfiorini committed Apr 28, 2018
2 parents 8d52a97 + 8c87e69 commit 4c45147
Show file tree
Hide file tree
Showing 8 changed files with 2,222 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ set -e

source /usr/local/share/liri-travis/functions

# Install dependencies
travis_start "install_packages"
msg "Install packages..."
sudo apt-get install -y \
libumockdev-dev
travis_end "install_packages"

# Install artifacts
travis_start "artifacts"
msg "Install artifacts..."
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Qt-style API to use udev.

Qt >= 5.8.0 with at least the following modules is required:

* [qtbase](http://code.qt.io/cgit/qt/qtbase.git)
* [qtbase](http://code.qt.io/cgit/qt/qtbase.git)

And the following modules:

Expand All @@ -22,7 +22,11 @@ And the following modules:

The following modules and their dependencies are required:

* [udev](http://www.freedesktop.org/software/systemd/libudev/)
* [udev](http://www.freedesktop.org/software/systemd/libudev/)

For autotests you need:

* [umockdev](https://github.com/martinpitt/umockdev/)

## Installation

Expand Down
21 changes: 21 additions & 0 deletions qbs/modules/umockdev/umockdev.qbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import qbs 1.0
import qbs.Probes

Module {
readonly property bool found: probe.found
readonly property string packageVersion: probe.modversion

Depends { name: "cpp" }

cpp.defines: probe.defines == undefined ? [] : probe.defines
cpp.commonCompilerFlags: probe.compilerFlags == undefined ? [] : probe.compilerFlags
cpp.includePaths: probe.includePaths == undefined ? [] : probe.includePaths
cpp.libraryPaths: probe.libraryPaths == undefined ? [] : probe.libraryPaths
cpp.dynamicLibraries: probe.libraries == undefined ? [] : probe.libraries
cpp.linkerFlags: probe.linkerFlags == undefined ? [] : probe.linkerFlags

Probes.PkgConfigProbe {
id: probe
name: "umockdev-1.0"
}
}
4 changes: 3 additions & 1 deletion qtudev.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ Project {

minimumQbsVersion: "1.9.0"

qbsSearchPaths: ["qbs"]

references: [
"src/deployment.qbs",
"src/udev/udev.qbs",
//"tests/auto/auto.qbs",
"tests/auto/auto.qbs",
]
}
13 changes: 3 additions & 10 deletions tests/auto/auto.qbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import qbs 1.0
import qbs.FileInfo

Project {
name: "Autotests"
Expand All @@ -8,23 +9,15 @@ Project {
]

AutotestRunner {
Depends { name: "Qt5UDev" }
Depends { name: "lirideployment" }

builtByDefault: project.autotestEnabled
name: "qtudev-autotest"
arguments: project.autotestArguments
wrapper: project.autotestWrapper
environment: {
var env = base;
var found = false;
for (var i in env) {
if (env[i].startsWith("XDG_RUNTIME_DIR=")) {
found = true;
break;
}
}
if (!found)
env.push("XDG_RUNTIME_DIR=/tmp");
env.push("LD_LIBRARY_PATH=" + FileInfo.joinPaths(qbs.installRoot, qbs.installPrefix, lirideployment.libDir));
return env;
}
}
Expand Down
Loading

0 comments on commit 4c45147

Please sign in to comment.