Commit graph

26 commits

Author SHA1 Message Date
rillig
81a41d0b94 mk/tools: correctly quote arguments in the tool wrapper log
Before, the tool arguments were written to the log as plain strings. Now
the arguments are properly quoted, which makes it possible to replay the
commands by copying them from the .work.log file.

This only affects tools that are shell builtins (echo, true, false), get
additional arguments (mkdir -p) or define a custom TOOLS_SCRIPT
(pkg-config, to set an environment variable; or autotools). Tools that
are symlinked to the real tool are not affected.

The calls to the compiler are already properly logged since cwrappers
takes care of that. This commit therefore makes the log entries for the
compilers and the other tools more similar.
2019-03-24 11:29:19 +00:00
rillig
575f219e37 mk/tools: fix quoting when logging tool invocations
When a package or the infrastructure defined a tool with custom
TOOLS_ARGS or TOOLS_SCRIPT containing special characters, these could
lead to unintuitive interactions at the time when that tool invocation
was logged in the tool wrapper log. Some of the logging output ended up
on stdout, while some of the normal output ended up in the log, and parts
of the quoted arguments were even evaluated as shell commands.

The logging of the wrapped tool commands is not perfect yet, but at least
it's much more predictable now.
2019-03-24 08:40:07 +00:00
rillig
492beb29f5 regress/tools: show that TOOLS_SCRIPT is not always logged properly 2019-03-23 22:59:11 +00:00
rillig
70fd82fc7e regress/tools: demonstrate wrong shell quoting in the tools wrapper 2019-03-22 22:41:06 +00:00
rillig
23128f791d mk/tools: fix unintended filename expansion in the tool wrapper log file 2019-03-22 22:13:21 +00:00
rillig
32d0165e0f regress/tools: demonstrate wrong quoting in tools wrapper logging 2019-03-22 20:56:16 +00:00
rillig
9e31554ec7 regress/tools: clarify that only the NetBSD 7 shell exhibits this bug
The test has been changed again to fail since making the test pass would
mean this bug could later silently show up inside a large GNU configure
script where it would be impossible to find. Therefore, when using pkgsrc
on NetBSD 7, it is better to switch to another shell for doing pkgsrc
work.

The comment has been updated to be more accurate.
2018-12-05 19:01:40 +00:00
rillig
37529136f3 regress/tools: disable failing test on NetBSD
See bin/53754.
2018-11-30 19:55:26 +00:00
rillig
dbb64b82e8 Fixed pkglint warnings. 2016-06-11 11:36:14 +00:00
bsiegert
90c36cf39b Add PLISTs for all regression tests. The infrastructure now sets
PKG_FAIL_REASON if there is no PLIST, breaking all but one test.

Goes from "1 passed, 12 failed" to "6 passed, 7 failed" on Mac OS.

"haha" schmonz@
2014-06-21 16:15:00 +00:00
joerg
ce1772b268 Remove redundant EXTRACT_ONLY and NO_CHECKSUM declarations.
Retire NO_PACAKGE as there is no technical reason for it.
2009-04-09 00:47:11 +00:00
rillig
ebcb0ce01e Resign from maintaining a lot of packages, so everyone is free to update
them at will.
2008-03-04 11:02:23 +00:00
rillig
3702f2b4c7 Added a testcase for tar. 2007-09-09 08:01:45 +00:00
rillig
fd7861c39a Added a test new case for /bin/sh. 2006-11-09 12:39:55 +00:00
rillig
915d764b85 Added a testsuite for sed(1) to make sure it can handle character
classes.
2006-09-20 07:39:54 +00:00
rillig
aa0acb70fa Added a test for the "sort" tool. Fixed pkglint warnings. 2006-06-25 21:47:28 +00:00
rillig
f0eca5584b Double the length of the command line argument after each iteration. 2006-05-31 13:10:49 +00:00
rillig
477fc93c59 Added more tests for tr(1), including one that feeds 65536 bytes through
tr(1). Let's see if there's an implementation with bounded line lengths.
2005-11-24 19:46:45 +00:00
rillig
d6e5c93e15 Added testsuite for tr(1). 2005-11-24 19:39:23 +00:00
rillig
dc73dcb087 Oops. I had put the awk-specific functions into test.subr. Moved back. 2005-11-24 19:20:18 +00:00
rillig
cfadbbe5f6 Factored out the generally useable shell functions into tests.subr, as they
will be used by almost all test cases.
2005-11-24 19:18:45 +00:00
rillig
7460df377f Don't require too much from a simple awk. 6144 bytes per line must be
enough. At least for Solaris.
2005-11-19 22:55:24 +00:00
rillig
307b3cd8c8 Print the name of the test case when starting it. This helps in detecting
which test case fails.
2005-11-19 22:03:54 +00:00
rillig
5a1ed27747 Make sure that awk can handle strings of length 4096 on the command line
and of length 2^20 when copying from stdin to stdout.
2005-11-19 21:59:51 +00:00
rillig
4504993e92 Added comments. 2005-11-19 21:31:10 +00:00
rillig
27610dfc4b Regression test for the capabilities of the TOOLS. Most of them have
many different implementations and are by no way easy to use. This test
collects some assumptions about what the tools must be able to handle.
It is also meant as a guide on using these tools correctly and reliably.
2005-11-19 21:27:06 +00:00