mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-03 14:52:21 +02:00
Clean src path in test.pl before attempting vpath builds.
If configure/make has been run in the src path it can conflict with tests, which may require different build options. Also add a comment when rebuilding for code generation.
This commit is contained in:
parent
c192ec4561
commit
4e71c077f1
@ -266,4 +266,4 @@ rwildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2
|
||||
|
||||
# Include depedency files
|
||||
DEP_FILES = $(call rwildcard,$(BUILDDIR),*.dep)
|
||||
include $(DEP_FILES)
|
||||
-include $(DEP_FILES)
|
||||
|
@ -410,6 +410,11 @@ eval
|
||||
################################################################################################################################
|
||||
if (!defined($iVmId))
|
||||
{
|
||||
# Clean any existing files in the src path that might interfere with the vpath build. This is kosher because the user should
|
||||
# be expecting us to do builds in the src path during testing. Instead we clean the src path and do the builds elsewhere.
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
executeTest("make -C ${strBackRestBase}/src -f Makefile.in clean-all");
|
||||
|
||||
# Auto-generate configure files unless --no-gen specified
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
if (!$bNoGen)
|
||||
@ -512,6 +517,7 @@ eval
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
my $strBuildPath = "${strTestPath}/build";
|
||||
|
||||
# Determine if we need to start from scratch due to changes that make may not detect
|
||||
if (!-e "${strBuildPath}/Makefile" ||
|
||||
stat("${strBackRestBase}/src/Makefile.in")->mtime > stat("${strBuildPath}/Makefile")->mtime ||
|
||||
stat("${strBackRestBase}/src/configure")->mtime > stat("${strBuildPath}/Makefile")->mtime ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user