summaryrefslogtreecommitdiff
path: root/regress
AgeCommit message (Collapse)AuthorFilesLines
2020-03-22mk/subst.mk: ignore directories in SUBST_FILESrillig1-0/+85
Seen in multimedia/libmp4v2, where a pattern also matches the CVS directory from the distfiles.
2020-03-22mk/subst.mk: use the same severity for all messagesrillig2-18/+28
The severity now depends only on the setting of SUBST_NOOP_OK. Right now this means that some former warnings will be reported as info only, but that will change after switching the default of SUBST_NOOP_OK after 2020Q1. Then they will all be reported as warnings, followed by the final error saying that the pattern has no effect. This change makes it easier to detect inconsistencies and outdated definitions, for example by setting the global SUBST_NOOP_OK=no and redefining WARNING_MSG to actuall fail.
2020-03-21regress: migrate SUBST test to the other SUBST testsrillig6-97/+186
In the old test code, the input and output data for each test case were in different files. This was too far apart to relate them. In addition, all test cases were merged into a single big test, which made it hard to tell the topics apart.
2020-03-21mk/subst.mk: add global SUBST_SHOW_DIFF variablerillig1-0/+41
This is useful in bulk builds or when trying to understand what happens under the hood, since the SUBST code leaves no .orig files around.
2020-03-21regress/infra-unittests: add more tests for subst.mkrillig1-0/+89
2020-03-21mk/subst.mk: fix bmake warnings in case of duplicate SUBST classesrillig1-0/+28
2020-03-21regress/infra-unittests: fix assertion --file-is-linesrillig2-8/+4
It had compared the actual output with itself, instead of comparing it to the expected output.
2020-03-20regress/infra-unittests: add tests for special characters in subst.mkrillig2-6/+104
2020-03-20show-all: fix output for list variables containing dollar charactersrillig2-11/+11
Before, variables containing dollar characters displayed so wrong that it was hard to explain. To fix the problem, I typed almost random characters into the code until the output was exactly as expected. I still do not understand: * why the list variables need 8 dollars to survive the @x@ loop, * why the code only works if the dollars come from an external variable instead of being written inline, * why the backslash in the :C modifier needs to be doubled. Anyway, the output of "bmake show-all-extract" now contains the shell variable $${extract_file}, just as it should. The dollars are now doubled in the output and thereby match the source code from the Makefile exactly.
2020-03-20regress/show-all: demonstrate wrong output of show-allrillig2-2/+30
A real-life example of this pattern is EXTRACT_CMD_DEFAULT, which refers to DOWNLOADED_DISTFILE, which is defined as "$${extract_file}". Until mk/extract/extract.mk r1.40, that argument was discarded from the output completely. With the surrounding quotes at least the quotes are visible in the output of "bmake show-all-extract".
2020-03-20mk/subst.mk: evaluate SUBST_MESSAGE only once, and laterillig1-3/+49
The default value of SUBST_MESSAGE is based on SUBST_FILES, and that variable may use the :sh modifier to list files from WRKSRC, which may not exist at load time.
2020-03-20regress/infra-unittests: restructure test infrastructurerillig4-48/+147
Before, the first assertion failure quit immediately. This prevented getting a complete picture of the situation that failed. Now the assertions continue the test and fail at the very end.
2020-03-20mk/subst.mk: fix early evaluation of SUBST_FILESrillig1-14/+21
In the case of pkglocaledir, the SUBST_FILES are generated by a shell command. That command assumes that the WRKDIR already exists. Therefore SUBST_FILES must be evaluated as late as possible. See mk/configure/replace-localedir.mk; an example package that fails is devel/gettext-tools.
2020-03-19regress/infra-unittests: add more tests for subst.mk failuresrillig1-2/+55
2020-03-19regress/pkg-options: remove obsolete _PKG_SILENTrillig1-4/+3
2020-03-19regress/infra-unittests: add tests for mk/subst.mkrillig3-7/+343
2020-02-11mk/pkginstall/files: allow spaces in configuration file namesrillig4-0/+64
Fixes PR pkg/42191.
2020-02-09mk/bsd.pkg.mk: support spaces in PATH directoriesrillig1-5/+3
Fixes PR pkg/53959.
2020-02-09regress/path: demonstrate wrong handling of PATH directories with spacesrillig1-0/+26
See PR pkg/53959.
2020-01-15mk/pkgformat: include only relevant ident strings in +BUILD_VERSIONrillig3-3/+4
Before, not only files containing an RCS Id were recorded in the +BUILD_VERSION file but also files containing text that looked similar to an RCS Id were recorded, even though these didn't contain any valuable version information. The effect was that before this change, pkgtools/pkglint was built over and over again by the bulk builds since pbulk uses a different regular expression for detecting modified files. The regular expression for unexpanded RCS Ids is added to record files that have never been checked in to CVS, just to have them recorded and to distinguish them from the final committed version. See https://mail-index.netbsd.org/tech-pkg/2020/01/11/msg022489.html.
2020-01-15mk/pkgformat: include only relevant ident strings in +BUILD_VERSIONrillig1-3/+0
Before, not only files containing an RCS Id were recorded in the +BUILD_VERSION file but also files containing text that looked similar to an RCS Id were recorded, even though these didn't contain any valuable version information. The effect was that before this change, pkgtools/pkglint was built over and over again by the bulk builds since pbulk uses a different regular expression for detecting modified files. The regular expression for unexpanded RCS Ids is added to record files that have never been checked in to CVS, just to have them recorded and to distinguish them from the final committed version. See https://mail-index.netbsd.org/tech-pkg/2020/01/11/msg022489.html.
2020-01-15regress/plus_build_version: fix testrillig1-1/+1
2020-01-11regress/plus_build_version: document obvious uses of RCS Idsrillig1-5/+19
2020-01-11regress/plus_build_version: adjust the expanded RCS Idsrillig2-4/+4
These values could not be guessed before the previous commit.
2020-01-11regress/plus_build_version: RCS Id extraction for +BUILD_VERSIONrillig8-0/+84
In pkgtools/pkglint, there are several lines that look almost like RCS Ids. Some parts of the pkgsrc infrastructure expand them and some others don't. This needs to be fixed so that all parts of pkgsrc agree what is a complete RCS Id and what isn't. As long as that is not the case, pbulk unnecessarily builds pkglint over and over again, even if nothing changed. There are probably other unintended side effects as well that just haven't been discovered or considered grave enough.
2020-01-11regress: remove Makefilerillig2-31/+2
The regress/ directory does not contain pkgsrc packages, therefore it should not be listed as a SUBDIR in the top-level Makefile. This wrong impression could be caused because most of the regression tests have a Makefile that looks like an actual package Makefile. But this alone doesn't mean that these are packages. The only relevant file for a regression test is the spec file. If that test uses a package Makefile or not is an implementation detail of each test.
2019-12-17regress/make-env-phases: fix test by ignoring changes to *FLAGSrillig3-10/+24
The CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS differ between the build phase and the install phase. It's only a minor difference but may still influence packages that use these flags at install time, even though they shouldn't. For now just document that the flags differ.
2019-12-12regress/Makefile: add reasons for commenting out entrieswiz1-3/+3
2019-12-08regress: comment out two directories without Makefileswiz1-3/+3
2019-09-19regress/check-perms: add test for broken CHECK_PERMS_AUTOFIXrillig5-1/+88
The variable CHECK_PERMS_AUTOFIX has been existing since 2006 but is not used in any package. This may be because it is not helpful in any way. When a package sets this variables to yes, the permission errors are not silently fixed, but the build still fails instead. This behavior is not useful in any way and thus needs to be fixed. See https://mail-index.netbsd.org/tech-pkg/2019/08/thread1.html#021828
2019-07-17lang/python: fix PYVERSSUFFIX escaping for print-PLISTrillig5-1/+52
Before, the filename "3270" was wrongly replaced with "${PYVERSSUFFIX}" since the version number "3.7", when interpreted as a regular expression, matched that filename.
2019-07-17regress/print-plist: fix syntax error after almost 15 yearsrillig1-3/+3
The race for the oldest undiscovered pkgsrc bug still goes on. 15 years is hard to beat, but definitely possible.
2019-05-22mk/tools: in the wrapper log, quote arguments containing = naturallyrillig2-3/+12
2019-05-04regress: add gnu-configure-strict to SUBDIRSrillig1-1/+2
2019-05-04mk/configure: assist in finding unrecognized configure optionsrillig7-0/+196
Instead of giving instructions, just to the work automatically as far as it can be automated.
2019-03-24regress/buildlink-libtool: fix failing testrillig1-3/+3
The comment above that test was a copy-and-paste error. It got almost 15 years old.
2019-03-24regress/pkg-options: fix regression test for PKG_OPTIONS frameworkrillig4-5/+5
Just a few changes in the wording, which have been introduced in 2007.
2019-03-24mk/tools: correctly quote arguments in the tool wrapper logrillig3-46/+85
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-24mk/tools: fix quoting when logging tool invocationsrillig2-12/+49
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-23regress/tools: show that TOOLS_SCRIPT is not always logged properlyrillig3-42/+118
2019-03-22regress/tools: demonstrate wrong shell quoting in the tools wrapperrillig2-2/+33
2019-03-22mk/tools: fix unintended filename expansion in the tool wrapper log filerillig1-8/+33
2019-03-22regress/tools: demonstrate wrong quoting in tools wrapper loggingrillig3-8/+48
2019-03-21regress/infra-unittests: add small framework for testing mk/ with mocksrillig5-1/+239
2019-03-17regress/compiler: fix regression testrillig2-7/+5
2019-03-17mk/subst.mk: substitute embedded newlines, escape dots in variable namesrillig2-8/+11
2019-03-17regress/subst: demonstrate that SUBST_VARS doesn't pass newlinesrillig4-13/+61
Sure, it's an edge case and has not been necessary until now. Nevertheless it's good to see how this can be done. Variables having dots in their names are also not handled completely correct. This also didn't occur in practice since the variable names passed to SUBST_VARS are usually A-Za-z0-9_ only.
2019-03-17regress/subst: enable regression testrillig2-3/+11
2018-12-05regress/tools: clarify that only the NetBSD 7 shell exhibits this bugrillig1-4/+4
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-11-30regress/tools: disable failing test on NetBSDrillig1-1/+4
See bin/53754.