From e86ea5ca7fab49d0c7071ab98428454fee0f8dbe Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Thu, 11 Jun 2020 05:54:37 -0700 Subject: [PATCH] [infer] Fix tracebugs test Makefile Summary: This diff gives an order on running `test1`, `test2`, and `test3`. If they run parallel, they may have a data race on writing `infer-out/.infer_runstate.json`. Another minor fix is the object file path to remove. Reviewed By: jvillard Differential Revision: D21995671 fbshipit-source-id: eb9950cae --- infer/tests/build_systems/tracebugs/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/infer/tests/build_systems/tracebugs/Makefile b/infer/tests/build_systems/tracebugs/Makefile index 4b6313e5a..6e8617656 100644 --- a/infer/tests/build_systems/tracebugs/Makefile +++ b/infer/tests/build_systems/tracebugs/Makefile @@ -8,7 +8,7 @@ TESTS_DIR = ../.. include $(TESTS_DIR)/base.make SOURCES = ../codetoanalyze/hello.c -OBJECTS = $(SOURCES:.c=.o) +OBJECTS = hello.o default: print @@ -36,7 +36,11 @@ test3: infer-out/report.json .PHONY: print -print: test1 test2 test3 +print: +# the tests cannot be run in parallel safely, run them sequentially + $(MAKE) test1 + $(MAKE) test2 + $(MAKE) test3 .PHONY: test test: print