[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
master
Jules Villard 8 years ago committed by Facebook Github Bot
parent 8b976154f6
commit 902a0cd001

@ -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

Loading…
Cancel
Save