Skip to content

Commit

Permalink
Pin the number of jobs in some Make targets
Browse files Browse the repository at this point in the history
If someone runs `make -j16 test_unit test_analyzer test_web_sqlite`,
then the command would spuriously would fail due to a filesystem racecondition.

The `cp ldlogger build/bin` would basically try to copy a not-yet-existing file,
causing a failure immediately, or later in the test pipeline, when it
excercises the logger. Causing an error similar to this:
```
make[1]: Leaving directory `codechecker/analyzer'
make: *** [test_analyzer] Error 2
make: *** Waiting for unfinished jobs....
```

Let's work around the issue by explicitly restricting the number of jobs
in those calls.
  • Loading branch information
Balazs Benics committed Mar 30, 2022
1 parent f11eb1a commit 8a4de4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ venv_osx:
clean_venv:
rm -rf venv

PIP_DEV_DEPS_CMD = $(MAKE) -C $(CC_ANALYZER) pip_dev_deps && \
$(MAKE) -C $(CC_WEB) pip_dev_deps && \
PIP_DEV_DEPS_CMD = $(MAKE) -C $(CC_ANALYZER) -j1 pip_dev_deps && \
$(MAKE) -C $(CC_WEB) -j1 pip_dev_deps && \
cd $(CC_COMMON) && pip3 install -r requirements_py/dev/requirements.txt

pip_dev_deps:
Expand Down
2 changes: 1 addition & 1 deletion analyzer/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ test_functional_in_env: venv_dev
$(ACTIVATE_DEV_VENV) && $(FUNCTIONAL_TEST_CMD)

test_build_logger:
$(MAKE) -C tools/build-logger test
$(MAKE) -C tools/build-logger -j1 test

test_tu_collector:
REPO_ROOT=$(REPO_ROOT) $(MAKE) -C $(ROOT)/tools/tu_collector test
Expand Down

0 comments on commit 8a4de4a

Please sign in to comment.