File: lib-restricts

package info (click to toggle)
dgit 13.19
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 4,084 kB
  • sloc: perl: 13,953; sh: 7,268; makefile: 340; python: 334; tcl: 69
file content (65 lines) | stat: -rw-r--r-- 1,624 bytes parent folder | download | duplicates (6)
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
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh

t-restriction-x-dgit-intree-only () {
	if [ "x$DGIT_TEST_INTREE" != x ]; then return 0; fi
	echo 'running installed package version'
	return 1
}

t-restriction-x-dgit-out-of-tree-only () {
	if [ "x$DGIT_TEST_INTREE" = x ]; then return 0; fi
	echo 'running out of development tree'
	return 1
}

t-restriction-x-dgit-git-only () {
	if test -d .git; then return 0; fi
	echo 'not running out of git clone'
	return 1
}

t-restriction-x-dgit-skip-suite () {
	if [ "x$1" != "x$DGIT_TEST_CURRENT_SUITE" ]; then return 0; fi
	echo "not running, DGIT_TEST_CURRENT_SUITE is $DGIT_TEST_CURRENT_SUITE"
	return 1
}

t-restriction-x-dgit-schroot-build () {
	# if DGIT_SCHROOT_CHROOT is set, user wants not to skip this test
	if [ "x${DGIT_SCHROOT_CHROOT}" != x ]; then return 0; fi

	case "$LD_PRELOAD" in
	*eatmydata*)
		local l=":$LD_PRELOAD:"
		l=${l//:libeatmydata.so:/:}
		l=${l#:}
		l=${l%:}
		LD_PRELOAD="$l"
		;;
	esac

	schroot -l -c build 2>&1 >/dev/null || return 1
}

t-restriction-x-tag2upload-service-manager () {
	# DGIT_TEST_T2USM_PROGRAM being the command to run for the
	# tagupload-service-manager.
	# It can contain spaces: it's run as $DGIT_TEST_T2USM_PROGRAM -c ...
	#
	# In principle we could have done this with a formal dependency
	# on a .deb which isn't in the Debian archive, but this is
	# a lot simpler and good enough at least for now.

	if [ "x${DGIT_TEST_T2USM_PROGRAM}" != x ]; then return 0; fi
	echo 'DGIT_TEST_T2USM_PROGRAM not set'
	return 1
}

t-restriction-x-dgit-unfinished () {
	echo 'unfinished test, or unfinished feature'
	return 1
}

t-restriction-hint-testsuite-triggers () {
	:
}