[tests] some missing dependencies in differential tests

Summary:
This can be noticed when the format of the DB changes, and other fun things
like that. No longer require to `make clean` to be able to pass these tests.

Reviewed By: mbouaziz

Differential Revision: D7533559

fbshipit-source-id: 670cb60
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 74e16bdb58
commit 9b315d4d08

@ -7,11 +7,12 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
INFER_OUT = infer-out INFER_OUT = infer-out
include $(TESTS_DIR)/differential.make SOURCES = $(SRC_DIR)/some_bugs.c $(SRC_DIR)/some_different_bugs.c
DIFFERENTIAL_ARGS = --differential-filter-files changed_files.txt DIFFERENTIAL_ARGS = --differential-filter-files changed_files.txt
include ../../differential.make include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(CLANG_DEPS)
BUCK_TARGET = //src:hello BUCK_TARGET = //src:hello
INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions

@ -12,10 +12,14 @@ TESTS_DIR = ../..
MODIFIED_FILES_FILE = filter_files.test.txt MODIFIED_FILES_FILE = filter_files.test.txt
DIFFERENTIAL_ARGS = --differential-filter-files $(MODIFIED_FILES_FILE) \ DIFFERENTIAL_ARGS = --differential-filter-files $(MODIFIED_FILES_FILE) \
--differential-filter-set "fixed,preexisting" --differential-filter-set "fixed,preexisting"
SOURCES = $(wildcard src/com/example/*.java.current src/com/example/*.java.previous \
src/com/example/*.java.unchanged)
SRC_OBJECT_FILES = src/com/example/*.java src/com/example/*.class com/ SRC_OBJECT_FILES = src/com/example/*.java src/com/example/*.class com/
CLEAN_EXTRA = $(SRC_OBJECT_FILES) $(MODIFIED_FILES_FILE) CLEAN_EXTRA = $(SRC_OBJECT_FILES) $(MODIFIED_FILES_FILE)
include ../../differential.make include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
.PHONY: compare_reports replace_reports .PHONY: compare_reports replace_reports
compare_reports: current.exp.test previous.exp.test compare_reports: current.exp.test previous.exp.test

@ -8,9 +8,12 @@
# E2E test involving the skip_anonymous_class_renamings filter # E2E test involving the skip_anonymous_class_renamings filter
TESTS_DIR = ../.. TESTS_DIR = ../..
SOURCES = src/DiffExample.java.current src/DiffExample.java.previous
CLEAN_EXTRA = src/Diff*.java *.class CLEAN_EXTRA = src/Diff*.java *.class
include ../../differential.make include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
$(CURRENT_REPORT): $(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffExample.java.current src/DiffExample.java $(QUIET)$(COPY) src/DiffExample.java.current src/DiffExample.java

@ -8,9 +8,12 @@
# E2E test involving the skip_duplicated_types_on_filenames filter # E2E test involving the skip_duplicated_types_on_filenames filter
TESTS_DIR = ../.. TESTS_DIR = ../..
SOURCES = $(wildcard src/*.java.current src/*.java.previous)
CLEAN_EXTRA = src/Diff*.java src/Diff*.java *.class CLEAN_EXTRA = src/Diff*.java src/Diff*.java *.class
include ../../differential.make include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
$(CURRENT_REPORT): $(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffExample.java.current src/DiffExample.java $(QUIET)$(COPY) src/DiffExample.java.current src/DiffExample.java

@ -8,10 +8,13 @@
# E2E test involving the skip_duplicated_types_on_filenames filter # E2E test involving the skip_duplicated_types_on_filenames filter
TESTS_DIR = ../.. TESTS_DIR = ../..
SOURCES = $(wildcard src/*.java.current src/*.java.previous)
DIFFERENTIAL_ARGS = --file-renamings file_renamings.json DIFFERENTIAL_ARGS = --file-renamings file_renamings.json
CLEAN_EXTRA = src/Diff*.java *.class CLEAN_EXTRA = src/Diff*.java *.class
include ../../differential.make include $(TESTS_DIR)/differential.make
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(JAVA_DEPS)
$(CURRENT_REPORT): $(CURRENT_REPORT):
$(QUIET)$(COPY) src/DiffExampleRenamed.java.current src/DiffExampleRenamed.java $(QUIET)$(COPY) src/DiffExampleRenamed.java.current src/DiffExampleRenamed.java

@ -29,6 +29,8 @@ $(PREVIOUS_REPORT): $(CURRENT_REPORT)
.PHONY: analyze .PHONY: analyze
analyze: $(CURRENT_REPORT) $(PREVIOUS_REPORT) analyze: $(CURRENT_REPORT) $(PREVIOUS_REPORT)
$(CURRENT_REPORT) $(PREVIOUS_REPORT): $(INFER_BIN) $(SOURCES)
$(EXPECTED_TEST_OUTPUT): $(CURRENT_REPORT) $(PREVIOUS_REPORT) $(MODIFIED_FILES_FILE) \ $(EXPECTED_TEST_OUTPUT): $(CURRENT_REPORT) $(PREVIOUS_REPORT) $(MODIFIED_FILES_FILE) \
$(INFER_BIN) $(MAKEFILE_LIST) $(INFER_BIN) $(MAKEFILE_LIST)
$(QUIET)$(REMOVE_DIR) $(INFER_OUT) $(QUIET)$(REMOVE_DIR) $(INFER_OUT)

Loading…
Cancel
Save