forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (45 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Environment variables to run tests.
# Test project configuration, tests are run on these files.
TEST_PROJECT ?= TEST_PROJ=$(CURRENT_DIR)/tests/projects
REPO_ROOT ?= REPO_ROOT=$(ROOT)
# Nose test runner configuration options.
NOSECFG = --config .noserc
test_in_env: pycodestyle_in_env pylint_in_env test_unit_in_env test_functional_in_env test_build_logger test_tu_collector_in_env
test: pycodestyle pylint test_unit test_functional test_build_logger test_tu_collector
PYCODESTYLE_TEST_CMD = pycodestyle bin codechecker_analyzer tests
pycodestyle:
$(PYCODESTYLE_TEST_CMD)
pycodestyle_in_env: venv_dev
$(ACTIVATE_DEV_VENV) && $(PYCODESTYLE_TEST_CMD)
PYLINT_TEST_CMD = PYLINTRC=$(ROOT)/.pylintrc \
pylint ./bin/** ./codechecker_analyzer ./tests/**
pylint:
$(PYLINT_TEST_CMD)
pylint_in_env: venv_dev
$(ACTIVATE_DEV_VENV) && $(PYLINT_TEST_CMD)
run_test:
$(REPO_ROOT) $(TEST_PROJECT) \
nosetests $(NOSECFG) ${TEST} || exit 1
run_test_in_env: venv_dev
$(ACTIVATE_DEV_VENV) && $(REPO_ROOT) $(TEST_PROJECT) \
nosetests $(NOSECFG) ${TEST} || exit 1
UNIT_TEST_CMD = $(REPO_ROOT) nosetests $(NOSECFG) tests/unit
test_unit:
$(UNIT_TEST_CMD)
test_unit_in_env: venv_dev
$(ACTIVATE_DEV_VENV) && $(UNIT_TEST_CMD)
FUNCTIONAL_TEST_CMD = $(REPO_ROOT) $(TEST_PROJECT) \
nosetests $(NOSECFG) tests/functional || exit 1
test_functional:
python $(ROOT)/scripts/test/check_clang.py || exit 1;
$(FUNCTIONAL_TEST_CMD)
test_functional_in_env: venv_dev
python $(ROOT)/scripts/test/check_clang.py || exit 1;
$(ACTIVATE_DEV_VENV) && $(FUNCTIONAL_TEST_CMD)
test_build_logger:
make -C tools/build-logger -f Makefile.manual test
test_tu_collector:
$(REPO_ROOT) make -C $(ROOT)/tools/tu_collector test
test_tu_collector_in_env:
$(ACTIVATE_DEV_VENV) && \
$(REPO_ROOT) make -C $(ROOT)/tools/tu_collector test