Nous avons procédé ce jeudi matin 08 avril 2021 à une MAJ de sécurité urgente. Nous sommes passé de la version 13.9.3 à la version 13.9.5 les releases notes correspondantes sont ici:
https://about.gitlab.com/releases/2021/03/17/security-release-gitlab-13-9-4-released/
https://about.gitlab.com/releases/2021/03/31/security-release-gitlab-13-10-1-released/

Makefile 3.66 KB
Newer Older
1
CXX?=g++
Mikaël Salson's avatar
Mikaël Salson committed
2
INCLUDE=-I ..
3
OPTIM=-g -O0 $(COVERAGE)
Mathieu Giraud's avatar
Mathieu Giraud committed
4
override CXXFLAGS += -std=c++11 -W -Wall $(OPTIM)
5
LDLIBS=-lz
6
SRC= unit-tests/tests.cpp
Mikaël Salson's avatar
Mikaël Salson committed
7
EXEC=$(SRC:.cpp=)
8
OBJ=$(SRC:.cpp=.o)
Mathieu Giraud's avatar
Mathieu Giraud committed
9
OTHER_SRC=$(wildcard *.cpp)
10
LIB=../core/vidjil.a ../lib/lib.a
11 12
SHOULD=$(wildcard should-get-tests/*.should-get)
SHOULD_LOG=$(SHOULD:.should-get=.tap)
13
SHOULD_VDJ=$(wildcard should-vdj-tests/*.should-vdj.fa)
14
SHOULD_LOCUS=$(wildcard should-vdj-tests/*.should-locus.fa)
15
REPORTS_PATH := $(patsubst %/Makefile,%,$(abspath $(lastword $(MAKEFILE_LIST))))/../../reports
16
VALGRIND=valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --undef-value-errors=yes --track-origins=yes --xml=yes --xml-file="$$(mktemp "$(REPORTS_PATH)/valgrind.xml.XXXXXX")"
Mikaël Salson's avatar
Mikaël Salson committed
17

18
#should-vdj that should not be published in our public curated dataset (just internal tests)
19
EXCLUDE_SHOULD_VDJ=bug20151006-rc.should-vdj.fa cdr3-indels.should-vdj.fa ext-nucleotides-N.should-vdj.fa segment_simul.should-vdj.fa trd-dd2-dd3.should-vdj.fa trd-dd2up-dd3down.should-vdj.fa igh-vdj.should-vdj.fa Demo-X5.should-vdj.fa
20 21
SHOULD_VDJ_ARCHIVE:=$(filter-out $(addprefix should-vdj-tests/,$(EXCLUDE_SHOULD_VDJ)), $(SHOULD_VDJ))

22
DATE=$(shell date +%Y-%m-%d--%H:%M:%S)
23
SNAPSHOTS_DIR=./snapshots
24
SNAPSHOT=$(SNAPSHOTS_DIR)/snapshot-log--$(DATE)
25

Mikaël Salson's avatar
Mikaël Salson committed
26
.PHONY: all force clean forcedep
Mikaël Salson's avatar
Mikaël Salson committed
27 28 29 30

test: all
	@echo
	@echo "*** Launching unit tests..."
31 32
	./unit-tests/tests
	cat ./unit-tests/tests.cpp.tap
Mikaël Salson's avatar
Mikaël Salson committed
33 34 35 36 37
	@echo "*** All unit tests passed"

all: core $(EXEC)
	@echo "All tests compiled."

38
snapshot:
39
	mkdir -p $(SNAPSHOTS_DIR)
40
	grep . should-get-tests/*.log should-vdj-tests/*.log > $(SNAPSHOT)
41 42
	touch snapshot-last ; mv snapshot-last snapshot-prev
	ln -s $(SNAPSHOT) snapshot-last
43
	diff -I "20..-..-.." snapshot-prev snapshot-last | diffstat -cC
44

45
should: vidjil $(SHOULD_LOG)
Mikaël Salson's avatar
Mikaël Salson committed
46

47
shouldvdj_if_python:
48
	if python ../../tools/check_python_version.py ; \
49
	then $(MAKE) shouldlocus_and_vdj ; \
50 51
	else echo "!!! Bad python version, we skip .should-vdj.fa tests..." ; \
	fi
52

53
shouldlocus_and_vdj: vidjil
54
	@echo "*** Launching .should-vdj-fa tests..."
55
	python should-vdj-to-tap.py -2q -r $(SHOULD_VDJ) $(SHOULD_LOCUS)
56
	$(MAKE) shouldvdj_with_rc
57
	@echo "*** All .should-vdj.fa tests passed"
58

59 60 61
shouldvdj:
	python should-vdj-to-tap.py $(SHOULD_VDJ)

62 63 64
shouldvdj_with_rc:
	python should-vdj-to-tap.py -r $(SHOULD_VDJ)

65 66 67 68
shouldvdj_with_rc_merged:
	cat $(SHOULD_VDJ) > should-vdj-tests/should-vdj.merged.fa
	python should-vdj-to-tap.py -r should-vdj-tests/should-vdj.merged.fa

69 70 71 72 73 74 75 76 77
shouldvdj_archive: should-vdj.zip
should-vdj.zip: $(SHOULD_VDJ_ARCHIVE)
	$(eval tmpdir := $(shell mktemp -d))
	mkdir $(tmpdir)/should-vdj
	cp --parents --preserve $(SHOULD_VDJ_ARCHIVE) $(tmpdir)
	sed -ri 's/\s*BUG//' $(tmpdir)/should-vdj-tests/*
	cwd=`pwd` && cd $(tmpdir) && zip $$cwd/$@ $(SHOULD_VDJ_ARCHIVE)
	rm -rf $(tmpdir)

78
%.tap: %.should-get force
Mikaël Salson's avatar
Mikaël Salson committed
79
	./should-to-tap.sh $<
80 81

valgrind_should:
Mikaël Salson's avatar
Mikaël Salson committed
82 83
	$(MAKE) -C $(REPORTS_PATH) clean_valgrind
	LAUNCHER="$(VALGRIND)" $(MAKE) should
84

85
valgrind_%:
Mikaël Salson's avatar
Mikaël Salson committed
86
	LAUNCHER="$(VALGRIND)" $(MAKE) $(patsubst valgrind_%,%,$@)
87

88
valgrind_tests: vidjil ./unit-tests/tests
89
	$(VALGRIND) ./unit-tests/tests
Mikaël Salson's avatar
Mikaël Salson committed
90

Mathieu Giraud's avatar
Mathieu Giraud committed
91
$(EXEC): % : %.o $(LIB) 
92
	$(CXX) -o $@ $< $(LIB) $(LDLIBS) $(LDFLAGS) $(CXXFLAGS)
Mikaël Salson's avatar
Mikaël Salson committed
93 94 95 96


../core.a: core

97
vidjil:
Mikaël Salson's avatar
Mikaël Salson committed
98 99
	$(MAKE) -C ../ clean
	$(MAKE) -C ../ OPTIM="$(OPTIM)"
100

Mikaël Salson's avatar
Mikaël Salson committed
101
core:
Mikaël Salson's avatar
Mikaël Salson committed
102
	$(MAKE) -C ../core
Mikaël Salson's avatar
Mikaël Salson committed
103

Mathieu Giraud's avatar
Mathieu Giraud committed
104
%.o: %.cpp $(OTHER_SRC)
105
	$(CXX) -o $@ $(INCLUDE) -c $< $(CXXFLAGS)
Mikaël Salson's avatar
Mikaël Salson committed
106 107

clean:
108
	rm -f $(OBJ) $(EXEC)
109 110
cleancoverage:
	rm -f *.gcda *.gcno *.gcov
111 112 113 114 115
cleantests:
	rm -f *.tap *.log should-vdj-tests/*.tap should-vdj-tests/*.log
	rm -rf out/

cleanall: clean cleancoverage cleantests
116

Mikaël Salson's avatar
Mikaël Salson committed
117
forcedep:
118
	$(CXX) $(CXXFLAGS) $(INCLUDE) -M $(SRC) > dep.mk
Mikaël Salson's avatar
Mikaël Salson committed
119

Mikaël Salson's avatar
Mikaël Salson committed
120 121
force:

Mikaël Salson's avatar
Mikaël Salson committed
122 123 124
DEP=$(wildcard dep.mk)

ifeq (${DEP},)
125
$(shell	$(CXX) $(CXXFLAGS) $(INCLUDE) -M $(SRC) > dep.mk)
Mikaël Salson's avatar
Mikaël Salson committed
126 127 128
endif
include dep.mk