blob: 67f8516316ea48f6f9dda82c9a28ed4c35a7ab3b (
plain)
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
|
# $NetBSD: Makefile,v 1.14 2019/03/24 08:40:07 rillig Exp $
#
DISTNAME= # not applicable
PKGNAME= regress-tools-1.2
CATEGORIES= regress
MASTER_SITES= # none
DISTFILES= # none
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Test whether the TOOLS do what I expect
LICENSE= 2-clause-bsd
WRKSRC= ${WRKDIR}
NO_CHECKSUM= yes
PLIST_SRC= # none
REGRESS_TESTS+= logging
REGRESS_TESTS+= awk sed sh sort tar tr
USE_TOOLS+= awk sed sh sort tar tr
TOOLS_CREATE+= script-dquot
TOOLS_SCRIPT.script-dquot= \
echo "hello; world"
TOOLS_CREATE+= script-backslash
TOOLS_SCRIPT.script-backslash= \
echo hello\;\ world
# If both of the above tools are properly quoted during logging, the
# semicolon in "hello; world" is never interpreted as a shell command
# delimiter, and this tool is never run.
TOOLS_CREATE+= world
TOOLS_SCRIPT.world= \
echo oops
# The script for this example tool contains single quotes, double quotes
# and backslashes to demonstrate that these are properly logged.
TOOLS_CREATE+= for-loop
TOOLS_SCRIPT.for-loop= \
printf '%s' "$$0"; \
for arg in "$$@"; do \
printf ' <%s>' "$$arg"; \
done; \
printf '\n'
# Demonstrates that double quotes in both the TOOLS_ARGS and the actual
# arguments are properly logged.
TOOLS_CREATE+= path-args-dquot
TOOLS_PATH.path-args-dquot= echo
TOOLS_ARGS.path-args-dquot= \" "\"" '"'
# Demonstrates that both the TOOLS_ARGS and the actual arguments are
# properly logged.
TOOLS_CREATE+= path-args
TOOLS_PATH.path-args= echo
TOOLS_ARGS.path-args= " \"'\\$$" "*"
do-build:
.for t in ${REGRESS_TESTS}
${RUN} cd ${WRKSRC}; \
${ECHO_MSG} "Running testsuite "${t:Q}; \
${SH} ${FILESDIR}/${t:Q}-test.sh
.endfor
.include "../../mk/bsd.pkg.mk"
|