File tree Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,34 @@ COPY ./opt/ opt/
22
22
COPY ./test/test_requirements.txt test/
23
23
24
24
RUN ./opt/readies/bin/getpy3
25
- RUN ./opt/system-setup.py
25
+ RUN set -e ;\
26
+ python3 -m virtualenv venv ;\
27
+ . ./venv/bin/activate ;\
28
+ ./opt/system-setup.py
26
29
27
30
ARG DEPS_ARGS=""
28
31
COPY ./get_deps.sh .
29
- RUN if [ "$DEPS_ARGS" = "" ]; then ./get_deps.sh gpu; else env $DEPS_ARGS ./get_deps.sh gpu; fi
32
+ RUN set -e ;\
33
+ . ./venv/bin/activate ;\
34
+ if [ "$DEPS_ARGS" = "" ]; then \
35
+ ./get_deps.sh gpu ;\
36
+ else \
37
+ env $DEPS_ARGS ./get_deps.sh gpu ;\
38
+ fi
30
39
31
40
ARG BUILD_ARGS=""
32
41
ADD ./ /build
33
- RUN make -C opt build GPU=1 $BUILD_ARGS SHOW=1
42
+ RUN set -e ;\
43
+ . ./venv/bin/activate ;\
44
+ make -C opt build GPU=1 $BUILD_ARGS SHOW=1
34
45
35
46
ARG PACK=1
36
47
37
- RUN if [ "$PACK" = "1" ]; then make -C opt pack GPU=1; fi
48
+ RUN if [ "$PACK" = "1" ]; then \
49
+ . ./venv/bin/activate ;\
50
+ make -C opt pack GPU=1 ;\
51
+ fi
38
52
39
53
RUN git remote set-url origin https://github.com/RedisAI/RedisAI
40
54
41
- CMD ["bash", "-c", "make -C opt test GPU=1 SHOW=1"]
55
+ CMD ["bash", "-c", ". ./venv/bin/activate; make -C opt test GPU=1 SHOW=1"]
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ ifneq ($(VGD),)
12
12
VALGRIND =$(VGD )
13
13
endif
14
14
15
+ ifeq ($(VALGRIND ) ,1)
16
+ DEBUG ?= 1
17
+ endif
18
+
15
19
ifeq ($(COV ) ,1)
16
20
DEBUG ?= 1
17
21
endif
@@ -179,6 +183,8 @@ export GEN ?= 1
179
183
export SLAVES ?= 1
180
184
export AOF ?= 1
181
185
186
+ $(info COV_DIR=$(COV_DIR))
187
+
182
188
test :
183
189
$(COVERAGE_RESET )
184
190
$(SHOW ) \
@@ -187,7 +193,7 @@ test:
187
193
GEN=$(GEN ) AOF=$(AOF ) SLAVES=$(SLAVES ) \
188
194
VALGRIND=$(VALGRIND ) \
189
195
$(ROOT ) /test/tests.sh
190
- $(COVERAGE_COLLECT_REPORT )
196
+ # $(COVERAGE_COLLECT_REPORT)
191
197
192
198
valgrind :
193
199
$(SHOW )$(ROOT ) /test/valgrind.sh $(realpath $(INSTALLED_TARGET ) )
Original file line number Diff line number Diff line change @@ -14,22 +14,22 @@ COV_EXCLUDE += \
14
14
define COVERAGE_RESET
15
15
$(SHOW)set -e ;\
16
16
echo "Starting coverage analysys." ;\
17
- mkdir -p $$ (COV_DIR) ;\
18
- lcov --directory $$ (BINROOT) --base-directory $ $(SRCDIR) -z > /dev/null 2>&1
17
+ mkdir -p $(COV_DIR) ;\
18
+ lcov --directory $(BINROOT) --base-directory $(SRCDIR) -z > /dev/null 2>&1
19
19
endef
20
20
21
21
define COVERAGE_COLLECT
22
22
$(SHOW)set -e ;\
23
23
echo "Collecting coverage data ..." ;\
24
- lcov --capture --directory $$ (BINROOT) --base-directory $$ (SRCDIR) --output-file $ $(COV_INFO) > /dev/null 2>&1 ;\
25
- lcov -o $$ (COV_INFO) -r $$ (COV_INFO) $ $(COV_EXCLUDE) > /dev/null 2>&1
24
+ lcov --capture --directory $(BINROOT) --base-directory $(SRCDIR) --output-file $(COV_INFO) > /dev/null 2>&1 ;\
25
+ lcov -o $(COV_INFO) -r $(COV_INFO) $(COV_EXCLUDE) > /dev/null 2>&1
26
26
endef
27
27
28
28
define COVERAGE_REPORT
29
29
$(SHOW)set -e ;\
30
- lcov -l $$ (COV_INFO) ;\
31
- genhtml --legend -o $$ (COV_DIR) $ $(COV_INFO) > /dev/null 2>&1 ;\
32
- echo "Coverage info at $$(realpath $$ (COV_DIR))/index.html"
30
+ lcov -l $(COV_INFO) ;\
31
+ genhtml --legend -o $(COV_DIR) $(COV_INFO) > /dev/null 2>&1 ;\
32
+ echo "Coverage info at $$(realpath $(COV_DIR))/index.html"
33
33
endef
34
34
35
35
define COVERAGE_COLLECT_REPORT
You can’t perform that action at this time.
0 commit comments