Gentoo Archives: gentoo-commits

From: "Jonathan Callen (abcd)" <abcd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/schroot/files: schroot-1.4.0-tests.patch
Date: Sun, 31 Jan 2010 22:40:15
Message-Id: E1NbiSi-0003f9-Ri@stork.gentoo.org
1 abcd 10/01/31 22:40:12
2
3 Added: schroot-1.4.0-tests.patch
4 Log:
5 Bump schroot
6 (Portage version: -svn/cvs/Linux i686)
7
8 Revision Changes Path
9 1.1 dev-util/schroot/files/schroot-1.4.0-tests.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/files/schroot-1.4.0-tests.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/schroot/files/schroot-1.4.0-tests.patch?rev=1.1&content-type=text/plain
13
14 Index: schroot-1.4.0-tests.patch
15 ===================================================================
16 Split out the root-only tests from the tests that can run as a non-root user.
17
18 --- schroot-1.4.0.orig/configure.ac
19 +++ schroot-1.4.0/configure.ac
20 @@ -254,6 +254,19 @@ AC_ARG_WITH([bash-completion-dir], [AS_H
21 AC_MSG_RESULT([$bashcompletiondir])
22 AC_SUBST([bashcompletiondir])
23
24 +AC_MSG_CHECKING([whether to enable root-only unit tests])
25 +AC_ARG_ENABLE([root-tests], [AS_HELP_STRING([--with-root-tests], [Enable root-only tests])],
26 + [ case "${enableval}" in
27 + yes) enable_root_tests="yes" ;;
28 + no) enable_root_tests="no" ;;
29 + *) AC_MSG_RESULT([unknown])
30 + AC_MSG_ERROR([bad value ${enableval} for --enable-root-tests]) ;;
31 + esac],
32 + [ enable_root_tests="yes" ])
33 +AC_MSG_RESULT([$enable_root_tests])
34 +AM_CONDITIONAL([USE_ROOT_TESTS], [test "$enable_root_tests" = "yes"])
35 +AC_SUBST([enable_root_tests])
36 +
37 # Checks for programs.
38 AC_PROG_CXX
39 AC_LANG([C++])
40 --- schroot-1.4.0.orig/test/Makefile.am
41 +++ schroot-1.4.0/test/Makefile.am
42 @@ -24,17 +24,24 @@ include $(top_srcdir)/scripts/global.mk
43 LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin
44
45 if USE_UNIT_TESTS
46 -noinst_LTLIBRARIES = libtest.la
47 +check_LTLIBRARIES = libtest.la
48
49 -noinst_PROGRAMS = \
50 - sbuild-chroot \
51 +ROOT_TESTS =
52 +
53 +if USE_ROOT_TESTS
54 +ROOT_TESTS += \
55 sbuild-chroot-plain \
56 sbuild-chroot-file \
57 sbuild-chroot-directory \
58 sbuild-chroot-block-device \
59 sbuild-chroot-loopback \
60 sbuild-chroot-lvm-snapshot \
61 - sbuild-chroot-config \
62 + sbuild-chroot-config
63 +endif
64 +
65 +check_PROGRAMS = \
66 + sbuild-chroot \
67 + $(ROOT_TESTS) \
68 sbuild-environment \
69 sbuild-keyfile \
70 sbuild-lock \
71 @@ -51,13 +58,7 @@ noinst_PROGRAMS = \
72 # randomly on slow or heavily-loaded systems.
73 TESTS = setup-test-data \
74 sbuild-chroot \
75 - sbuild-chroot-plain \
76 - sbuild-chroot-file \
77 - sbuild-chroot-directory \
78 - sbuild-chroot-block-device \
79 - sbuild-chroot-loopback \
80 - sbuild-chroot-lvm-snapshot \
81 - sbuild-chroot-config \
82 + $(ROOT_TESTS) \
83 sbuild-environment \
84 sbuild-keyfile \
85 sbuild-log \
86 --- schroot-1.4.0.orig/test/setup-test-data
87 +++ schroot-1.4.0/test/setup-test-data
88 @@ -4,4 +4,8 @@
89 rm -rf testdata
90 mkdir testdata
91 cp -r ${srcdir}/*.ex* testdata
92 +if test `id -u` -ne 0; then
93 +echo "You are not root, only doing partial setup"
94 +else
95 chown -R root:root testdata
96 +fi