Package: bcron / 0.11-8

0006-tests.sh-skip-tests-exec-fds-tests-exec-simple-if-HOM.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From e2145b3bc420a99398c35fddd51b466a88a5ca32 Mon Sep 17 00:00:00 2001
From: Gerrit Pape <pape@smarden.org>
Date: Mon, 11 Aug 2014 19:05:49 +0000
Subject: [PATCH] tests.sh: skip tests/exec-fds, tests/exec-simple if $HOME
 does not exist

This fixes FTBFS on Debian autobuilders, which run the package build
process as user with non-existng home directory /sbuild-nonexistent.

E.g.:
https://buildd.debian.org/status/fetch.php?pkg=bcron&arch=amd64&ver=0.10-1&stamp=1407686613
---
 tests.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

--- a/tests.sh
+++ b/tests.sh
@@ -557,6 +557,8 @@ END_OF_TEST_RESULTS
 
 ##### Test tests/exec-fds #####
 
+if test -d "$HOME"; then
+
 runtest() {
 echo 'exec 2>/dev/null' >$tmp/echo-all.sh
 fd=4
@@ -597,6 +599,8 @@ Subject: Cron <USER@HOST> sleep 1; echo
 all done
 END_OF_TEST_RESULTS
 
+fi
+
 
 ##### Test tests/sched-dump #####
 
@@ -636,6 +640,8 @@ END_OF_TEST_RESULTS
 
 ##### Test tests/exec-simple #####
 
+if test -d "$HOME"; then
+
 runtest() {
 doexec 'echo yes'
 }
@@ -651,6 +657,8 @@ Subject: Cron <USER@HOST> echo yes
 yes
 END_OF_TEST_RESULTS
 
+fi
+
 
 ##### Test tests/spool-submit #####