]> git.pld-linux.org Git - packages/criu.git/commitdiff
add tests bcond (requires root) auto/th/criu-2.5-1
authorElan Ruusamäe <glen@delfi.ee>
Sun, 21 Aug 2016 08:45:00 +0000 (11:45 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 21 Aug 2016 08:45:55 +0000 (11:45 +0300)
at least one test did:

mount: only root can use "--options" option
subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups.lock', './zdtm_mount_cgroups']' returned non-zero exit st atus 1

criu.spec
tests.patch [new file with mode: 0644]

index 07cae5429094d2a12706f503a85aff853577af8d..987cc781825cbf7acc0b46861f9b7dac413f1f8b 100644 (file)
--- a/criu.spec
+++ b/criu.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with    tests           # build and run tests (requires root)
+
 Summary:       Checkpoint/restore functionality for Linux in userspace
 Summary(pl.UTF-8):     Funkcja checkpoint/restore w przestrzeni użytkownika dla Linuksa
 Name:          criu
@@ -8,6 +12,7 @@ Group:         Applications/System
 Source0:       http://download.openvz.org/criu/%{name}-%{version}.tar.bz2
 # Source0-md5: 5d5115454d110adb744e885d82d2c1f6
 Patch0:                %{name}-python.patch
+Patch1:                tests.patch
 URL:           http://criu.org/
 BuildRequires: asciidoc
 BuildRequires: libcap-devel
@@ -95,6 +100,7 @@ Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %{__sed} -i -e 's#-O2 -g#$(OPT)#g' Makefile
 
@@ -113,6 +119,10 @@ Pythonowy interfejs do CRIU. Ten pakiet zawiera także narzędzie crit.
        V=1
 %{__make}
 
+%if %{with tests}
+%{__make} test
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
diff --git a/tests.patch b/tests.patch
new file mode 100644 (file)
index 0000000..4643b02
--- /dev/null
@@ -0,0 +1,13 @@
+--- criu-2.5/test/zdtm/static/Makefile~        2016-08-21 11:41:39.000000000 +0300
++++ criu-2.5/test/zdtm/static/Makefile 2016-08-21 11:41:42.142986535 +0300
+@@ -402,6 +402,10 @@
+ stopped02:    override CFLAGS += -DZDTM_STOPPED_TKILL
+ stopped12:    override CFLAGS += -DZDTM_STOPPED_KILL -DZDTM_STOPPED_TKILL
++# grantpt, etc troubles
++tty%: override CFLAGS += -Wno-error=implicit-function-declaration -Wno-error=int-conversion
++pty%: override CFLAGS += -Wno-error=implicit-function-declaration -Wno-error=int-conversion
++
+ $(LIB):       force
+       $(Q) $(MAKE) -C $(LIBDIR)
This page took 0.091062 seconds and 4 git commands to generate.