autoconf \
automake \
build-essential \
+ dbus \
debhelper \
devscripts \
docbook-xsl \
libz-dev \
locales-all \
rapidjson-dev \
+ ruby-dbus \
xsltproc
RUN mkdir -p /usr/src/app
# Build the latest openSUSE Leap image
FROM opensuse/leap
-RUN zypper --non-interactive in --no-recommends \
+# we need to install Ruby first to define the %{rb_ver} RPM macro
+# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run
+# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache
+# why we need "zypper clean -a" at the end
+RUN zypper --non-interactive in --no-recommends --force-resolution ruby && zypper clean -a
+
+RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
+ zypper --non-interactive in --no-recommends \
autoconf \
automake \
dbus-1-devel \
pam-devel \
rapidjson-devel \
rpm-build \
+ "rubygem($RUBY_VERSION:ruby-dbus)" \
which
RUN mkdir -p /usr/src/app
# Build the latest openSUSE Tumbleweed image
FROM opensuse/tumbleweed
-RUN zypper --non-interactive in --no-recommends \
+# we need to install Ruby first to define the %{rb_ver} RPM macro
+# see https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#run
+# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#/build-cache
+# why we need "zypper clean -a" at the end
+RUN zypper --non-interactive in --no-recommends --force-resolution ruby && zypper clean -a
+
+RUN RUBY_VERSION=ruby:`rpm --eval '%{rb_ver}'` && \
+ zypper --non-interactive in --no-recommends \
autoconf \
automake \
dbus-1-devel \
pam-devel \
rapidjson-devel \
rpm-build \
+ "rubygem($RUBY_VERSION:ruby-dbus)" \
which
RUN mkdir -p /usr/src/app
autoconf \
automake \
build-essential \
+ dbus \
debhelper \
devscripts \
docbook-xsl \
libxml2-dev \
libz-dev \
rapidjson-dev \
+ ruby-dbus \
xsltproc
RUN mkdir -p /usr/src/app
testsuite-real/Makefile
testsuite-cmp/Makefile
zypp-plugin/Makefile
+ zypp-plugin/testsuite/Makefile
package/snapper.spec:snapper.spec.in
dists/debian/snapper-Debian.dsc.in:dists/debian/snapper-Debian.dsc.in.in
dists/debian/snapper-xUbuntu.dsc.in:dists/debian/snapper-xUbuntu.dsc.in.in
+SUBDIRS = testsuite
+
if HAVE_ZYPP
plugindir = /usr/lib/zypp/plugins/commit
../dbus/libdbus.la \
-lboost_regex
-endif
\ No newline at end of file
+endif
--- /dev/null
+*.log
+*.trs
+test-suite.log
--- /dev/null
+if HAVE_ZYPP
+
+check_SCRIPTS = test1
+noinst_SCRIPTS = mock-snapperd
+
+TESTS = $(check_SCRIPTS)
+
+EXTRA_DIST = $(check_SCRIPTS) $(noinst_SCRIPTS)
+endif
}
setup() {
+ MOCKDEP=(ruby -rdbus -e 1)
+ if ! "${MOCKDEP[@]}"; then
+ echo "Mock snapperd cannot be run, skipping test"
+ echo "('${MOCKDEP[@]}' failed)"
+ exit 77
+ fi
$MYDIR/mock-snapperd &
sleep 1
PID=$!