Fix test buck_flavours_diff

Summary: This test wasn't building correctly or being called by the toplevel makefile

Reviewed By: jvillard

Differential Revision: D16458386

fbshipit-source-id: 48a0c2f36
master
Phoebe Nichols 5 years ago committed by Facebook Github Bot
parent 860d3aa8a4
commit 70474ec2de

@ -73,7 +73,14 @@ DIRECT_TESTS += \
ifneq ($(BUCK),no) ifneq ($(BUCK),no)
BUILD_SYSTEMS_TESTS += buck_blacklist buck-clang-db buck_flavors buck_flavors_run buck_flavors_deterministic BUILD_SYSTEMS_TESTS += \
buck_blacklist \
buck-clang-db \
buck_flavors \
buck_flavors_diff \
buck_flavors_run \
buck_flavors_deterministic \
endif endif
ifneq ($(CMAKE),no) ifneq ($(CMAKE),no)
BUILD_SYSTEMS_TESTS += clang_compilation_db cmake inferconfig inferconfig_not_strict BUILD_SYSTEMS_TESTS += clang_compilation_db cmake inferconfig inferconfig_not_strict

@ -5,7 +5,8 @@
TESTS_DIR = ../.. TESTS_DIR = ../..
INFER_OUT = infer-out INFER_OUT = infer-out
SOURCES = $(SRC_DIR)/some_bugs.c $(SRC_DIR)/some_different_bugs.c CODETOANALYZE = $(CURDIR)/../codetoanalyze
SOURCES = $(CODETOANALYZE)/some_bugs.c $(CODETOANALYZE)/some_different_bugs.c
DIFFERENTIAL_ARGS = --differential-filter-files changed_files.txt DIFFERENTIAL_ARGS = --differential-filter-files changed_files.txt
include $(TESTS_DIR)/differential.make include $(TESTS_DIR)/differential.make
@ -14,7 +15,6 @@ $(CURRENT_REPORT) $(PREVIOUS_REPORT): $(CLANG_DEPS)
BUCK_TARGET = //src:hello BUCK_TARGET = //src:hello
INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions --no-linters INFER_OPTIONS = $(DIFFERENTIAL_ARGS) --flavors --reactive --debug-exceptions --no-linters
SRC_DIR = $(CURDIR)/../codetoanalyze
.PHONY: compare_reports .PHONY: compare_reports
compare_reports: current.exp.test previous.exp.test compare_reports: current.exp.test previous.exp.test
@ -42,13 +42,13 @@ replace: replace_reports
$(CURRENT_REPORT): $(CURRENT_REPORT):
$(QUIET)$(REMOVE_DIR) buck-out $(QUIET)$(REMOVE_DIR) buck-out
$(QUIET)$(COPY) $(SRC_DIR)/some_bugs.c src/hello.c $(QUIET)$(COPY) $(CODETOANALYZE)/some_bugs.c src/hello.c
$(QUIET)$(call silent_on_success,Running Buck diff analysis: current,\ $(QUIET)$(call silent_on_success,Running Buck diff analysis: current,\
$(INFER_BIN) $(INFER_OPTIONS) run --results-dir $(CURRENT_DIR) -- \ $(INFER_BIN) $(INFER_OPTIONS) run --results-dir $(CURRENT_DIR) -- \
$(BUCK) build --no-cache $(BUCK_TARGET)) $(BUCK) build --no-cache $(BUCK_TARGET))
$(PREVIOUS_REPORT): $(PREVIOUS_REPORT):
$(QUIET)$(COPY) $(SRC_DIR)/some_different_bugs.c src/hello.c $(QUIET)$(COPY) $(CODETOANALYZE)/some_different_bugs.c src/hello.c
$(QUIET)$(call silent_on_success,Running Buck diff analysis: previous,\ $(QUIET)$(call silent_on_success,Running Buck diff analysis: previous,\
$(INFER_BIN) $(INFER_OPTIONS) run --results-dir $(PREVIOUS_DIR) -- \ $(INFER_BIN) $(INFER_OPTIONS) run --results-dir $(PREVIOUS_DIR) -- \
$(BUCK) build --no-cache $(BUCK_TARGET)) $(BUCK) build --no-cache $(BUCK_TARGET))

@ -0,0 +1 @@
{"top":{"current":0,"previous":0},"zero":{"current":0,"previous":0},"degrees":[]}

@ -1,3 +1,3 @@
src/hello.c, test1, 2, NULL_DEREFERENCE, [start of procedure test1()] src/hello.c, test1, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure test1()]
src/hello.c, test2, 2, NULL_DEREFERENCE, [start of procedure test2(),start of procedure nullify()] src/hello.c, test2, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure test2(),start of procedure nullify()]
src/hello2.c, test_hello2, 2, NULL_DEREFERENCE, [start of procedure test_hello2()] src/hello2.c, test_hello2, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure test_hello2()]

@ -1 +1 @@
MEMORY_LEAK, src/hello.c, test3, 3, test3.8ad8757baa8564dc136c1e07507f4a98, test3 MEMORY_LEAK, no_bucket, src/hello.c, test3, 3

@ -1 +1 @@
NULL_DEREFERENCE, src/hello.c, test2, 2, test2.ad0234829205b9033196ba818f7a872b, test2 NULL_DEREFERENCE, B1, src/hello.c, test2, 2

@ -1 +1 @@
NULL_DEREFERENCE, src/hello.c, test1, 2, test1.5a105e8b9d40e1329780d62ea2265d8a, test1 NULL_DEREFERENCE, B1, src/hello.c, test1, 2

@ -1,3 +1,3 @@
src/hello.c, test1, 2, NULL_DEREFERENCE, [start of procedure test1()] src/hello.c, test1, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure test1()]
src/hello.c, test3, 3, MEMORY_LEAK, [start of procedure test3(),Condition is true] src/hello.c, test3, 3, MEMORY_LEAK, no_bucket, ERROR, [start of procedure test3(),Taking true branch]
src/hello2.c, test_hello2, 2, NULL_DEREFERENCE, [start of procedure test_hello2()] src/hello2.c, test_hello2, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure test_hello2()]

Loading…
Cancel
Save