Fix isolation tests on OSX (#3706)

* Don't print out comments in make output

* Remove empty lines with sed
pull/3701/head
Jelte Fennema 2020-04-03 16:28:06 +02:00 committed by GitHub
parent 32156dbf5c
commit 459a4829ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -64,14 +64,15 @@ create-symbolic-link:
# it runs the spec files from build/specs and checks the expected output from build/expected.
# /specs is renamed as /spec because postgres first look at the specs file under current directory,
# so this is renamed to avoid that since we are running the isolation tests from build/specs now.
$(generated_isolation_files): $(citus_abs_srcdir)/build/specs/%: $(citus_abs_srcdir)/spec/%
$(generated_isolation_files): $(citus_abs_srcdir)/build/specs/%: $(citus_abs_srcdir)/spec/% Makefile
@mkdir -p $(citus_abs_srcdir)/$(ISOLATION_DEPDIR) $(citus_abs_srcdir)/$(ISOLATION_BUILDDIR)
# -MF is used to store dependency files(.Po) in another directory for separation
# -MT is used to change the target of the rule emitted by dependency generation.
# -P is used to inhibit generation of linemarkers in the output from the preprocessor.
# -undef is used to not predefine any system-specific or GCC-specific macros.
# `man cpp` for further information
cd $(citus_abs_srcdir) && cpp -undef -w -P -MMD -MP -MF$(ISOLATION_DEPDIR)/$(*F).Po -MT$@ $< > $@
@# -MF is used to store dependency files(.Po) in another directory for separation
@# -MT is used to change the target of the rule emitted by dependency generation.
@# -P is used to inhibit generation of linemarkers in the output from the preprocessor.
@# -undef is used to not predefine any system-specific or GCC-specific macros.
@# `man cpp` for further information
@# sed is used to strip the final // comments, because OSX cpp is weird
cd $(citus_abs_srcdir) && cpp -undef -w -P -MMD -MP -MF$(ISOLATION_DEPDIR)/$(*F).Po -MT$@ $< | sed '/^\/\//d' | sed '/^$$/d' > $@
Isolation_Po_files := $(wildcard $(ISOLATION_DEPDIR)/*.Po)