Skip to content

Commit f6188e5

Browse files
[DEBUG] Even more fixes. Does it work now?
1 parent 09731ab commit f6188e5

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
shell: /bin/bash
4444
name: "install test depends attempt"
4545
command: |
46-
python3 -m pip install --upgrade --user -r ./tests-requirements.txt || : ;
46+
python3 -m pip install --upgrade --user -r ./test-requirements.txt || : ;
4747
when: on_success
4848
- save_cache:
4949
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
@@ -69,7 +69,7 @@ jobs:
6969
shell: /bin/bash
7070
name: "Installing deps for test"
7171
command: |
72-
python3 -m pip install --upgrade --user -r ./tests-requirements.txt || : ;
72+
python3 -m pip install --upgrade --user -r ./test-requirements.txt || : ;
7373
when: on_success
7474
- cleanup
7575
- run:
@@ -105,7 +105,7 @@ jobs:
105105
shell: /bin/bash
106106
name: "clean up for test"
107107
command: |
108-
python3 -m pip install --upgrade --user -r ./tests-requirements.txt || : ;
108+
python3 -m pip install --upgrade --user -r ./test-requirements.txt || : ;
109109
when: on_success
110110
- cleanup
111111
- run:
@@ -143,7 +143,7 @@ jobs:
143143
- run:
144144
name: "install test-reqs attempt"
145145
command: |
146-
python3 -m pip install --user -r ./tests-requirements.txt || : ;
146+
python3 -m pip install --user -r ./test-requirements.txt || : ;
147147
- cleanup
148148
- run:
149149
shell: /bin/bash

Makefile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,31 @@ else
9191
endif
9292
endif
9393

94+
ifndef CC_TOOL
95+
FETCH_CC_TOOL := tests/fetch_cc-test-reporter
96+
CC_TOOL := ./cc-test-reporter
97+
CC_TOOL_ARGS := after-build --exit-code 0 -t coverage.py
98+
DS_TOOL := ./bin/deepsource
99+
DS_TOOL_ARGS := report --analyzer test-coverage --key python --value-file ./coverage.xml
100+
endif
101+
94102
ifndef PIP_COMMON_FLAGS
95103
# Define common pip install flags
96104
PIP_COMMON_FLAGS := --use-pep517 --exists-action s --upgrade --upgrade-strategy eager
97105
endif
98106

99-
# Define environment-specific pip install flags
100-
ifeq ($(shell uname),Darwin)
107+
# Define environment-specific flags
108+
ifeq ($(shell uname -s), Darwin)
101109
PIP_ENV_FLAGS := --break-system-packages
110+
else ifeq ($(shell uname -s), Linux)
111+
PIP_ENV_FLAGS :=
102112
else
103113
PIP_ENV_FLAGS :=
114+
FETCH_CC_TOOL :=
115+
CC_TOOL :=
116+
CC_TOOL_ARGS :=
117+
DS_TOOL :=
118+
DS_TOOL_ARGS :=
104119
endif
105120

106121
ifeq "$(WAIT)" ""
@@ -222,7 +237,7 @@ test: just-test cc-test-reporter
222237
$(QUIET)$(DO_FAIL) ;
223238
$(QUIET)$(COVERAGE) combine 2>$(ERROR_LOG_PATH) || : ;
224239
$(QUIET)$(COVERAGE) report -m --include=* 2>$(ERROR_LOG_PATH) || : ;
225-
$(QUIET)./cc-test-reporter after-build --exit-code 0 -t coverage.py 2>/dev/null || : ;
240+
$(QUIET)$(CC_TOOL) $(CC_TOOL_ARGS) 2>$(ERROR_LOG_PATH) || : ;
226241
$(QUIET)$(ECHO) "$@: Done."
227242

228243
test-tox: cleanup
@@ -231,8 +246,8 @@ test-tox: cleanup
231246

232247
test-pytest: cleanup MANIFEST.in cc-test-reporter must_have_pytest test-reports
233248
$(QUIET)$(PYTHON) -m pytest --cache-clear --doctest-glob=pythonrepo/*.py --doctest-modules --cov=. --cov-append --cov-report=xml --junitxml=test-reports/junit.xml -v --rootdir=. || DO_FAIL="exit 2" ;
234-
$(QUIET)./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml || : ;
235-
$(QUIET)./cc-test-reporter after-build --exit-code 0 -t coverage.py 2>/dev/null || : ;
249+
$(QUIET)$(DS_TOOL) $(DS_TOOL_ARGS) || : ;
250+
$(QUIET)$(CC_TOOL) $(CC_TOOL_ARGS) 2>$(ERROR_LOG_PATH) || : ;
236251
$(QUIET)$(WAIT) ;
237252
$(QUIET)$(DO_FAIL) ;
238253
$(QUIET)$(ECHO) "$@: Done."
@@ -244,7 +259,7 @@ test-style: cleanup
244259
$(QUIET)$(ECHO) "$@: Done."
245260

246261
cc-test-reporter: tests/fetch_cc-test-reporter
247-
$(QUIET)tests/fetch_cc-test-reporter ;
262+
$(QUIET)$(FETCH_CC_TOOL) ;
248263
$(QUIET)$(WAIT) ;
249264
$(QUIET)$(DO_FAIL) ;
250265
$(QUIET)$(ECHO) "$@: Done."

0 commit comments

Comments
 (0)