Commit graph

5 commits

Author SHA1 Message Date
Avery Pennarun
576e980c0e t/351-deps-forget: remove a test that occasionally flakes.
This is unfixable when running with -j > 1 because of how the current
t/flush-cache script works.  We'll only be able to fix that after
making a more granular flush-cache tool, which is already on my todo
list.
2018-12-31 19:35:56 -05:00
Avery Pennarun
174a093dc5 Don't set_checked() on is_override files.
If a file is overridden and then overridden again, this caused us to
rebuild only the first thing that depends on it, but not any subsequent
things, which is a pretty serious bug.

It turned out that t/350-deps-forget is already supposed to test this,
but I had cleverly encoded the wrong behaviour into the expected
results in the table-driven test.  I blame lack of sleep.  Anyway, I
fixed the test, which made it fail, and then fixed the code, which made
it pass.
2018-12-18 13:01:40 +00:00
Avery Pennarun
5abf78059f t/351-deps-forget: forgot skip-if-minimal-do.
minimal/do doesn't really understand dependencies at all, to say
nothing of forgetting targets and converting them to sources.
2018-12-04 02:43:58 -05:00
Avery Pennarun
2b0d34f0ed More fixes for converting missing targets -> sources.
I attempted to fix this in commit c06d1fba40, but it was apparently
incomplete and not all cases were covered by tests.

Let's add a much more thorough test by going through every possible
combination and making sure redo-{sources,targets,ood} all work as
expected, that the "you modified it" warning does or does not show up
when expected, and that dependencies are rebuilt the number of times we
expect.
2018-12-02 19:39:29 -05:00
Avery Pennarun
c06d1fba40 {ood,sources,targets}: fix relative paths; turn missing targets into sources.
When we check dependencies and a previously-is_generated dependency
existed before, but no longer does, forget that it was is_generated.
This slightly improves the situation where as a project evolves, a file
that used to be a target gets removed, and then later is re-added as a
static source file.  (It doesn't fix the other variant, where a file is
changed from target to source in a single atomic change, and is never
missing.  That one will be trickier to handle.)

While adding a test for this behaviour, I discovered that redo-sources,
redo-targets, and redo-ood were reporting their output relative to
STARTDIR instead of relative to $PWD, so fix that too.
2018-11-23 19:18:43 -05:00