From 902a0cd001e933bfb26d396e1eff0e8ad1e49f61 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 13 Dec 2016 02:46:03 -0800 Subject: [PATCH] [make] make crashcontext tests replace-proof Summary: Rename the intermediate .exp.test files to .exp.test.noreplace so that they don't match the regexp used by `make test-replace`. Otherwise they can accidentally become .exp files that will show up in `git status`. Reviewed By: cristianoc Differential Revision: D4319436 fbshipit-source-id: df2ef21 --- infer/tests/codetoanalyze/java/crashcontext/Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/infer/tests/codetoanalyze/java/crashcontext/Makefile b/infer/tests/codetoanalyze/java/crashcontext/Makefile index 79fe45d09..d340531b3 100644 --- a/infer/tests/codetoanalyze/java/crashcontext/Makefile +++ b/infer/tests/codetoanalyze/java/crashcontext/Makefile @@ -12,25 +12,24 @@ ANALYZER = crashcontext SOURCES = $(wildcard *.java) OBJECTS = $(patsubst %.java,%.class,$(SOURCES)) -EXP_TESTs = $(sort $(patsubst %.java,%.exp.test,$(SOURCES))) +EXP_TESTs = $(sort $(patsubst %.java,%.exp.test.noreplace,$(SOURCES))) INFER_OUTs = $(patsubst %.java,infer-out-%,$(SOURCES)) $(OBJECTS): $(SOURCES) javac -cp $(CLASSPATH) $(SOURCES) # analyze a single source file and generate the test results for it -%.exp.test: $(INFER_BIN) %.stacktrace.json %.java +%.exp.test.noreplace: $(JAVA_DEPS) %.stacktrace.json %.java $(call silent_on_success,\ $(INFER_BIN) -a $(ANALYZER) -o infer-out-$* --stacktrace $*.stacktrace.json \ -- javac -cp $(CLASSPATH) $*.java) # add a newline at the end of the json when creating the exp.test - bash -c 'cat infer-out-$*/crashcontext/crashcontext.json <(echo) > $*.exp.test' + $(COPY) infer-out-$*/crashcontext/crashcontext.json $@ && echo >> $@ # combine the test results for all the source files issues.exp.test: $(EXP_TESTs) cat $(EXP_TESTs) > issues.exp.test - default: compile .PHONY: compile