diff options
Diffstat (limited to 'dev-util/schroot/files')
-rw-r--r-- | dev-util/schroot/files/schroot-1.6.3-tests.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/dev-util/schroot/files/schroot-1.6.3-tests.patch b/dev-util/schroot/files/schroot-1.6.3-tests.patch new file mode 100644 index 000000000000..e58b6bae32ba --- /dev/null +++ b/dev-util/schroot/files/schroot-1.6.3-tests.patch @@ -0,0 +1,86 @@ +diff -purN schroot-1.6.3.orig/configure.ac schroot-1.6.3/configure.ac +--- schroot-1.6.3.orig/configure.ac 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/configure.ac 2012-09-20 03:43:20.451738906 -0400 +@@ -264,6 +264,19 @@ AC_ARG_WITH([bash-completion-dir], [AS_H + AC_MSG_RESULT([$bashcompletiondir]) + AC_SUBST([bashcompletiondir]) + ++AC_MSG_CHECKING([whether to enable root-only unit tests]) ++AC_ARG_ENABLE([root-tests], [AS_HELP_STRING([--with-root-tests], [Enable root-only tests])], ++ [ case "${enableval}" in ++ yes) enable_root_tests="yes" ;; ++ no) enable_root_tests="no" ;; ++ *) AC_MSG_RESULT([unknown]) ++ AC_MSG_ERROR([bad value ${enableval} for --enable-root-tests]) ;; ++ esac], ++ [ enable_root_tests="yes" ]) ++AC_MSG_RESULT([$enable_root_tests]) ++AM_CONDITIONAL([USE_ROOT_TESTS], [test "$enable_root_tests" = "yes"]) ++AC_SUBST([enable_root_tests]) ++ + # Checks for programs. + AC_PROG_CXX + AC_LANG([C++]) +diff -purN schroot-1.6.3.orig/test/Makefile.am schroot-1.6.3/test/Makefile.am +--- schroot-1.6.3.orig/test/Makefile.am 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/test/Makefile.am 2012-09-20 03:45:31.400235841 -0400 +@@ -24,10 +24,12 @@ include $(top_srcdir)/scripts/global.mk + LOCAL_CXXFLAGS = $(SCHROOT_CFLAGS) $(CPPUNIT_CFLAGS) -DTESTDATADIR='"./testdata"' -I$(top_srcdir)/bin + + if USE_UNIT_TESTS +-noinst_LTLIBRARIES = libtest.la ++check_LTLIBRARIES = libtest.la + +-noinst_PROGRAMS = \ +- sbuild-chroot \ ++ROOT_TESTS = ++ ++if USE_ROOT_TESTS ++ROOT_TESTS += \ + sbuild-chroot-plain \ + sbuild-chroot-custom \ + sbuild-chroot-file \ +@@ -37,7 +39,12 @@ noinst_PROGRAMS = \ + sbuild-chroot-lvm-snapshot \ + sbuild-chroot-btrfs-snapshot \ + sbuild-chroot-config \ +- sbuild-chroot-facet-userdata \ ++ sbuild-chroot-facet-userdata ++endif ++ ++check_PROGRAMS = \ ++ sbuild-chroot \ ++ $(ROOT_TESTS) \ + sbuild-environment \ + sbuild-keyfile \ + sbuild-lock \ +@@ -54,16 +61,7 @@ noinst_PROGRAMS = \ + # randomly on slow or heavily-loaded systems. + TESTS = setup-test-data \ + sbuild-chroot \ +- sbuild-chroot-plain \ +- sbuild-chroot-custom \ +- sbuild-chroot-file \ +- sbuild-chroot-directory \ +- sbuild-chroot-block-device \ +- sbuild-chroot-loopback \ +- sbuild-chroot-lvm-snapshot \ +- sbuild-chroot-btrfs-snapshot \ +- sbuild-chroot-config \ +- sbuild-chroot-facet-userdata \ ++ $(ROOT_TESTS) \ + sbuild-environment \ + sbuild-keyfile \ + sbuild-log \ +diff -purN schroot-1.6.3.orig/test/setup-test-data schroot-1.6.3/test/setup-test-data +--- schroot-1.6.3.orig/test/setup-test-data 2012-07-23 17:54:07.000000000 -0400 ++++ schroot-1.6.3/test/setup-test-data 2012-09-20 03:43:20.451738906 -0400 +@@ -4,4 +4,8 @@ + rm -rf testdata + mkdir testdata + cp -r ${srcdir}/*.ex* testdata ++if test `id -u` -ne 0; then ++echo "You are not root, only doing partial setup" ++else + chown -R root:root testdata ++fi |