Commit 72e8dab5 authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-a/2630-rm-Makefile' into 'dev'

Feature a/2630 rm makefile

See merge request !96
parents 0a8188db e7e6c3f1
......@@ -20,7 +20,7 @@ stages:
test_algo_unit:
stage: test_unit
script: make unit
script: make -C algo unit
only:
- /^feature-a\/.*$/
......@@ -32,25 +32,25 @@ test_tools_unit:
test_algo_should:
stage: test_functional
script: make should
script: make -C algo should
only:
- /^feature-a\/.*$/
test_algo_shouldvdj:
stage: test_shouldvdj
script: make shouldvdj
script: make -C algo shouldvdj
only:
- /^feature-a\/.*$/
algo_valgrind_unit:
stage: valgrind_unit
script: make valgrind_unit
script: make -C algo valgrind_unit
only:
- /^feature-a\/.*$/
algo_valgrind_functional:
stage: valgrind_functional
script: make valgrind_should
script: make -C algo valgrind_should
when: manual
only:
- /^feature-a\/.*$/
......
......@@ -12,30 +12,6 @@ endif
TEE = python tools/tee.py -v
all:
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)
static:
$(MAKE) all LDFLAGS="-static -static-libstdc++"
test:
$(MAKE) -C algo/tests cleantests
$(TEE) '$(MAKE) COVERAGE="$(COVERAGE)" unit' algo/tests/out-unit.log
$(MAKE) functional
$(TEE) '$(MAKE) test_tools_if_python' algo/tests/out-tools.log
@echo
@echo "*** All tests passed. Congratulations !"
@echo
$(MAKE) -C algo/tests snapshot_success
$(MAKE) -C algo/tests mark_failed_tests_as_todo
snapshot_diff:
$(MAKE) -C algo/tests snapshot_diff
snapshot_diff_current:
$(MAKE) -C algo/tests snapshot_diff_current
test_browser: unit_browser functional_browser
test_server: unit_server
......@@ -46,52 +22,14 @@ test_tools_if_python:
test_tools:
$(MAKE) -C tools/tests
unit: all
@echo "*** Launching unit tests..."
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests
@echo "*** All unit tests passed"
functional: all
$(TEE) '$(MAKE) should' algo/tests/out-should-get.log
$(TEE) '$(MAKE) shouldvdj' algo/tests/out-should-vdj.log
should: all
@echo
@echo "*** Launching .should_get tests..."
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests should
@echo "*** All .should_get tests passed"
shouldvdj: all
@echo
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests shouldvdj_if_python
shouldvdj_generate:
@echo
rm -rf data/gen
mkdir -p data/gen
cd germline ; python generate-recombinations.py --random-deletions 8,4:3,1:5,3 --random-insertions 5,4 -e .01
shouldvdj_generated_kmer: all
@echo
@echo "*** Launching generated .should-vdj-fa tests (and accepts errors) -- Kmer"
-cd data/gen ; python ../../algo/tests/should-vdj-to-tap.py -2q *.should-vdj.fa
@echo "*** Generated .should-vdj.fa tests finished -- Kmer"
python algo/tests/tap-stats.py data/gen/0-*.2.tap
python algo/tests/tap-stats.py data/gen/5-*.2.tap
shouldvdj_generated_fine: all
@echo
@echo "*** Launching generated .should-vdj-fa tests (and accepts errors) -- Fine"
-cd data/gen ; python ../../algo/tests/should-vdj-to-tap.py *.should-vdj.fa
@echo "*** Generated .should-vdj.fa tests finished -- Fine"
python algo/tests/tap-stats.py data/gen/0-*.1.tap
python algo/tests/tap-stats.py data/gen/5-*.1.tap
valgrind_unit:
$(MAKE) -C algo/tests valgrind_tests
valgrind_should:
$(MAKE) -C algo/tests valgrind_should
### Browser tests
unit_browser:
$(MAKE) -C browser/test unit
......@@ -105,38 +43,6 @@ headless_browser:
unit_server:
$(MAKE) -C server/ unit
### Code coverage
coverage: unit_coverage should_coverage
unit_coverage: clean
$(MAKE) COVERAGE=1 unit
should_coverage: clean
$(MAKE) COVERAGE=1 functional
### Reports with gcovr
unit_gcovr: unit_coverage
mkdir -p reports
which gcovr > /dev/null && (cd algo; gcovr -r . -e tests/ --xml > ../reports/unit_coverage.xml) || echo "gcovr is needed to generate a full report"
should_gcovr: should_coverage
mkdir -p reports
which gcovr > /dev/null && (cd algo; gcovr -r . -e tests/ --xml > ../reports/should_coverage.xml) || echo "gcovr is needed to generate a full report"
### Upload to coveralls.io
unit_coveralls:
coveralls $(COVERALLS_OPTIONS) --exclude release --exclude algo/lib --exclude algo/tests --exclude algo/tools --exclude tests --exclude tools --exclude lib --gcov-options '\-lp'
should_coveralls:
coveralls $(COVERALLS_OPTIONS) --exclude release --exclude algo/lib --exclude algo/tests --exclude algo/tools --exclude tests --exclude tools --exclude lib --gcov-options '\-lp' -r algo
### cppcheck
cppcheck:
mkdir -p reports
cppcheck --enable=all --xml . 2>! reports/cppcheck.xml
###
data:
......@@ -145,9 +51,6 @@ data:
germline browser server: %:
$(MAKE) -C $@
clean:
$(MAKE) -C $(VIDJIL_ALGO_SRC) clean
cleanall: clean
$(MAKE) -C algo/tests/data $^
$(MAKE) -C germline $^
......@@ -208,7 +111,7 @@ distrib:
cd release/$(DIST_DIR) && $(MAKE)
cd release/$(DIST_DIR) && $(MAKE) germline
cd release/$(DIST_DIR) && $(MAKE) data
cd release/$(DIST_DIR) && $(MAKE) test
cd release/$(DIST_DIR) && $(MAKE) -C algo test
cd release/$(DIST_DIR) && $(MAKE) clean && $(MAKE) static && mv vidjil vidjil-$(RELEASE_TAG)_`uname -m`
......
......@@ -39,6 +39,8 @@ SIMILARITY_TOOL=$(TOOLDIR)similarity
CREATE_VERSION_GIT_H := $(shell test -x ./create-git-version-h.sh && ./create-git-version-h.sh)
TEE = python ../tools/tee.py -v
.PHONY: all core lib clean forcedep
all: $(VIDJIL) $(ALIGN_CGI) $(SIMILARITY_CGI) $(SIMILARITY_TOOL)
......@@ -46,6 +48,9 @@ all: $(VIDJIL) $(ALIGN_CGI) $(SIMILARITY_CGI) $(SIMILARITY_TOOL)
base: $(VIDJIL)
static:
$(MAKE) all LDFLAGS="-static -static-libstdc++"
###
paranoid: clean
......@@ -126,6 +131,111 @@ cleancoverage: clean
cleanall: cleancoverage
$(MAKE) -C tests cleanall
###
# Tests
###
test:
$(MAKE) -C tests cleantests
$(TEE) '$(MAKE) COVERAGE="$(COVERAGE)" unit' tests/out-unit.log
$(MAKE) functional
$(TEE) '$(MAKE) -C .. test_tools_if_python' tests/out-tools.log
@echo
@echo "*** All tests passed. Congratulations !"
@echo
$(MAKE) -C tests snapshot_success
$(MAKE) -C tests mark_failed_tests_as_todo
snapshot_diff:
$(MAKE) -C tests snapshot_diff
snapshot_diff_current:
$(MAKE) -C tests snapshot_diff_current
unit: all
@echo "*** Launching unit tests..."
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C tests
@echo "*** All unit tests passed"
functional: all
$(TEE) '$(MAKE) should' tests/out-should-get.log
$(TEE) '$(MAKE) shouldvdj' tests/out-should-vdj.log
should: all
@echo
@echo "*** Launching .should_get tests..."
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C tests should
@echo "*** All .should_get tests passed"
shouldvdj: all
@echo
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C tests shouldvdj_if_python
valgrind_unit:
$(MAKE) -C tests valgrind_tests
valgrind_should:
$(MAKE) -C tests valgrind_should
### Code coverage
coverage: unit_coverage should_coverage
unit_coverage: clean
$(MAKE) COVERAGE=1 unit
should_coverage: clean
$(MAKE) COVERAGE=1 functional
### Reports with gcovr
unit_gcovr: unit_coverage
mkdir -p reports
which gcovr > /dev/null && (gcovr -r . -e tests/ --xml > ../reports/unit_coverage.xml) || echo "gcovr is needed to generate a full report"
should_gcovr: should_coverage
mkdir -p reports
which gcovr > /dev/null && (gcovr -r . -e tests/ --xml > ../reports/should_coverage.xml) || echo "gcovr is needed to generate a full report"
### Upload to coveralls.io
unit_coveralls:
coveralls $(COVERALLS_OPTIONS) --exclude release --exclude lib --exclude tests --exclude tools --exclude tests --exclude ../tools --exclude lib --gcov-options '\-lp'
should_coveralls:
coveralls $(COVERALLS_OPTIONS) --exclude release --exclude lib --exclude tests --exclude tools --exclude tests --exclude ../tools --exclude lib --gcov-options '\-lp' -r algo
### cppcheck
cppcheck:
mkdir -p reports
cppcheck --enable=all --xml . 2>! reports/cppcheck.xml
###
# Tests - generated
###
shouldvdj_generated_kmer: base
@echo
@echo "*** Launching generated .should-vdj-fa tests (and accepts errors) -- Kmer"
-cd tests/data/gen ; python ../../should-vdj-to-tap.py -2q *.should-vdj.fa
@echo "*** Generated .should-vdj.fa tests finished -- Kmer"
python tests/tap-stats.py tests/data/gen/0-*.2.tap
python tests/tap-stats.py tests/data/gen/5-*.2.tap
shouldvdj_generated_fine: base
@echo
@echo "*** Launching generated .should-vdj-fa tests (and accepts errors) -- Fine"
-cd tests/data/gen ; python ../../should-vdj-to-tap.py *.should-vdj.fa
@echo "*** Generated .should-vdj.fa tests finished -- Fine"
python tests/tap-stats.py tests/data/gen/0-*.1.tap
python tests/tap-stats.py tests/data/gen/5-*.1.tap
###
# dep.mk
###
forcedep:
$(CXX) $(CXXFLAGS) -M $(MAINCORE) > dep.mk
$(MAKE) -C core forcedep
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment