[tests] attempt at fewer race conditions

Summary:
This sometimes fail in our CI, eg:

```
[*ERROR**][66148] file has vanished: "/data/sandcastle/boxes/trunk-git-infer/infer/tests/build_systems/utf8_in_pwd/../codetoanalyze/make/utf8_in_function_names-617be4bc.o.tmp"
```

The issue seems to be that we are too greedy and try and copy files that may
disappear. This diff makes the list of files to copy over explicit to exclude
such temporary files.

Reviewed By: artempyanykh

Differential Revision: D16261872

fbshipit-source-id: 2b080d27a
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 0126b64d16
commit 15246ec2a2

@ -19,17 +19,21 @@ CMAKE_BUILD_DIR = $(CMAKE_DIR)/_build
CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer CMAKE_ANALYZE_DIR = $(CMAKE_DIR)/_build_infer
CMAKE_SOURCES_DIR = ../codetoanalyze/cmake CMAKE_SOURCES_DIR = ../codetoanalyze/cmake
CMAKE_SOURCES = $(CMAKE_SOURCES_DIR)/hello.c CMAKE_SOURCES = $(CMAKE_SOURCES_DIR)/hello.c
CMAKE_FILES = $(CMAKE_SOURCES) $(CMAKE_SOURCES_DIR)/CMakeLists.txt
GRADLE_DIR = $(UTF8_DIR)/gradle GRADLE_DIR = $(UTF8_DIR)/gradle
GRADLE_SOURCES_DIR = $(ROOT_DIR)/examples/java_hello GRADLE_SOURCES_DIR = $(ROOT_DIR)/examples/java_hello
GRADLE_SOURCES = $(wildcard $(GRADLE_SOURCES_DIR)/*.java) GRADLE_SOURCES = $(wildcard $(GRADLE_SOURCES_DIR)/*.java)
GRADLE_FILES = $(GRADLE_SOURCES)
JAVAC_DIR = $(UTF8_DIR)/javac JAVAC_DIR = $(UTF8_DIR)/javac
JAVAC_SOURCES = $(ROOT_DIR)/examples/Hello.java JAVAC_SOURCES = $(ROOT_DIR)/examples/Hello.java
JAVAC_FILES = $(JAVAC_SOURCES)
MAKE_DIR = $(UTF8_DIR)/make MAKE_DIR = $(UTF8_DIR)/make
MAKE_SOURCES_DIR = ../codetoanalyze/make MAKE_SOURCES_DIR = ../codetoanalyze/make
MAKE_SOURCES = $(wildcard $(MAKE_SOURCES_DIR)/*.c $(MAKE_SOURCES_DIR)/*.java) MAKE_SOURCES = $(wildcard $(MAKE_SOURCES_DIR)/*.c $(MAKE_SOURCES_DIR)/*.java)
MAKE_FILES = $(MAKE_SOURCES) $(MAKE_SOURCES_DIR)/Makefile
CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) infer-out-cmake CLEAN_EXTRA = $(CMAKE_BUILD_DIR) $(CMAKE_ANALYZE_DIR) infer-out-cmake
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
@ -40,20 +44,23 @@ $(UTF8_DIR):
$(QUIET)$(MKDIR_P) $@ $(QUIET)$(MKDIR_P) $@
$(CMAKE_DIR): $(CMAKE_SOURCES) $(UTF8_DIR) $(CMAKE_DIR): $(CMAKE_SOURCES) $(UTF8_DIR)
$(QUIET)rsync -aL --exclude='_build*' $(CMAKE_SOURCES_DIR)/ $@/ $(QUIET)$(MKDIR_P) $@
$(QUIET)cp $(CMAKE_FILES) $@/
$(QUIET)touch $@ $(QUIET)touch $@
$(GRADLE_DIR): $(GRADLE_SOURCES) $(UTF8_DIR) $(GRADLE_DIR): $(GRADLE_SOURCES) $(UTF8_DIR)
$(QUIET)rsync -a $(GRADLE_SOURCES_DIR)/ $@/ $(QUIET)$(MKDIR_P) $@
$(QUIET)cp $(GRADLE_FILES) $@/
$(QUIET)touch $@ $(QUIET)touch $@
$(JAVAC_DIR): $(JAVAC_SOURCES) $(UTF8_DIR) $(JAVAC_DIR): $(JAVAC_SOURCES) $(UTF8_DIR)
$(QUIET)$(MKDIR_P) $(JAVAC_DIR) $(QUIET)$(MKDIR_P) $@
$(QUIET)rsync -a $(JAVAC_SOURCES) $@ $(QUIET)cp $(JAVAC_FILES) $@/
$(QUIET)touch $@ $(QUIET)touch $@
$(MAKE_DIR): $(MAKE_SOURCES) $(UTF8_DIR) $(MAKE_DIR): $(MAKE_SOURCES) $(UTF8_DIR)
$(QUIET)rsync -a $(MAKE_SOURCES_DIR)/ $@/ $(QUIET)$(MKDIR_P) $@
$(QUIET)rsync -a $(MAKE_FILES) $@/
$(QUIET)touch $@ $(QUIET)touch $@
infer-out-cmake/report.json: $(CMAKE_DIR) $(CMAKE_SOURCES_DIR)/CMakeLists.txt $(CLANG_DEPS) infer-out-cmake/report.json: $(CMAKE_DIR) $(CMAKE_SOURCES_DIR)/CMakeLists.txt $(CLANG_DEPS)

Loading…
Cancel
Save