tests/make: cover purging the realpath cache
In purge_relative_cached_realpaths, the hash table containing the cache is modified while being iterated, which needs extra care, so add a test that covers this code in at least a single simple scenario.
This commit is contained in:
parent
74b93bff11
commit
eae7578437
|
@ -1 +1,2 @@
|
||||||
|
: purge-cache was reached.
|
||||||
exit status 0
|
exit status 0
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
# $NetBSD: varname-dot-objdir.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
|
# $NetBSD: varname-dot-objdir.mk,v 1.3 2024/06/01 11:06:17 rillig Exp $
|
||||||
#
|
#
|
||||||
# Tests for the special .OBJDIR variable.
|
# Tests for the special .OBJDIR variable.
|
||||||
|
|
||||||
# TODO: Implementation
|
# TODO: Implementation
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@:;
|
# Add an entry to the cached_realpath table, to test cleaning up
|
||||||
|
# that table in purge_relative_cached_realpaths.
|
||||||
|
# Having a ':=' assignment in the command line is construed but works
|
||||||
|
# well enough to reach the code.
|
||||||
|
@${MAKE} -f ${MAKEFILE} 'VAR:=$${:U.:tA}' purge-cache
|
||||||
|
|
||||||
|
purge-cache:
|
||||||
|
: ${.TARGET} was reached.
|
||||||
|
|
Loading…
Reference in New Issue