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/
2222COPY ./test/test_requirements.txt test/
2323
2424RUN ./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
2629
2730ARG DEPS_ARGS=""
2831COPY ./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
3039
3140ARG BUILD_ARGS=""
3241ADD ./ /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
3445
3546ARG PACK=1
3647
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
3852
3953RUN git remote set-url origin https://github.com/RedisAI/RedisAI
4054
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),)
1212VALGRIND =$(VGD )
1313endif
1414
15+ ifeq ($(VALGRIND ) ,1)
16+ DEBUG ?= 1
17+ endif
18+
1519ifeq ($(COV ) ,1)
1620DEBUG ?= 1
1721endif
@@ -179,6 +183,8 @@ export GEN ?= 1
179183export SLAVES ?= 1
180184export AOF ?= 1
181185
186+ $(info COV_DIR=$(COV_DIR))
187+
182188test :
183189 $(COVERAGE_RESET )
184190 $(SHOW ) \
@@ -187,7 +193,7 @@ test:
187193 GEN=$(GEN ) AOF=$(AOF ) SLAVES=$(SLAVES ) \
188194 VALGRIND=$(VALGRIND ) \
189195 $(ROOT ) /test/tests.sh
190- $(COVERAGE_COLLECT_REPORT )
196+ # $(COVERAGE_COLLECT_REPORT)
191197
192198valgrind :
193199 $(SHOW )$(ROOT ) /test/valgrind.sh $(realpath $(INSTALLED_TARGET ) )
Original file line number Diff line number Diff line change @@ -14,22 +14,22 @@ COV_EXCLUDE += \
1414define COVERAGE_RESET
1515$(SHOW)set -e ;\
1616echo "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
1919endef
2020
2121define COVERAGE_COLLECT
2222$(SHOW)set -e ;\
2323echo "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
2626endef
2727
2828define COVERAGE_REPORT
2929$(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"
3333endef
3434
3535define COVERAGE_COLLECT_REPORT
You can’t perform that action at this time.
0 commit comments