Debian Codegraph @

applications/bed/starch/test/makefile

raw
1 TMP = /tmp
2 USER := $(shell whoami)
3 ORIGINAL_DATA := ${TMP}/${USER}/starch_regression_test
4 THIS_DIR := ${shell pwd}
5
6 all: input_data tests
7 @echo "Congratulations, all Starch tests passed!"
8
9 input_data: random.bed
10
11 tests: compression_and_extraction_tests concatenation_tests metadata_integrity_tests nested_and_duplicate_element_tests unsortable_element_tests updating_tests
12
13 #
14 # setup of original (random) BED data
15 #
16
17 ORIGINAL_DIR = ${THIS_DIR}/original_data
18 RANDOM_BED = ${ORIGINAL_DATA}/data/random.bed
19
20 random.bed:
21 @if [ -f ${RANDOM_BED} ]; then make -C ${ORIGINAL_DIR} -f makefile clean; fi;
22 @make -C ${ORIGINAL_DIR} -f makefile random.bed
23
24 #
25 # compression and extraction
26 #
27
28 COMPEXT_DIR = ${THIS_DIR}/compression_and_extraction
29 COMPEXTRES_DIR = ${TMP}/${USER}/starch_regression_test/results/compression_and_extraction
30
31 compression_and_extraction_tests: random.bed
32 @if [ -d ${COMPEXTRES_DIR} ]; then make -C ${COMPEXT_DIR} -f makefile clean; fi;
33 @make -C ${COMPEXT_DIR} -f makefile all
34
35 #
36 # concatenation
37 #
38
39 CONCAT_DIR = ${THIS_DIR}/concatenation
40 CONCATRES_DIR = ${TMP}/${USER}/starch_regression_test/results/concatenation
41
42 concatenation_tests: random.bed compression_and_extraction_tests
43 @if [ -d ${CONCATRES_DIR} ]; then make -C ${CONCAT_DIR} -f makefile clean; fi;
44 @make -C ${CONCAT_DIR} -f makefile all
45
46 #
47 # updating
48 #
49
50 UPDATING_DIR = ${THIS_DIR}/updating
51 UPDATINGRES_DIR = ${TMP}/${USER}/starch_regression_test/results/updating
52
53 updating_tests: random.bed compression_and_extraction_tests
54 @if [ -d ${UPDATINGRES_DIR} ]; then make -C ${UPDATING_DIR} -f makefile clean; fi;
55 @make -C ${UPDATING_DIR} -f makefile all
56
57 #
58 # metadata integrity
59 #
60
61 MD_INTEG_DIR = ${THIS_DIR}/metadata_integrity
62 MD_INTEG_RES_DIR = ${TMP}/${USER}/starch_regression_test/results/metadata_integrity
63
64 metadata_integrity_tests: random.bed compression_and_extraction_tests
65 @if [ -d ${MD_INTEG_RES_DIR} ]; then make -C ${MD_INTEG_DIR} -f makefile clean; fi;
66 @make -C ${MD_INTEG_DIR} -f makefile all
67
68 #
69 # nested and duplicate element tests
70 #
71
72 ND_ELEM_DIR = ${THIS_DIR}/nested_and_duplicate_elements
73 ND_ELEM_RES_DIR = ${TMP}/${USER}/starch_regression_test/results/nested_and_duplicate_elements
74
75 nested_and_duplicate_element_tests:
76 @if [ -d ${ND_ELEM_RES_DIR} ]; then make -C ${ND_ELEM_DIR} -f makefile clean; fi;
77 @make -C ${ND_ELEM_DIR} -f makefile all
78
79 #
80 # unsortable element tests
81 #
82
83 US_ELEM_DIR = ${THIS_DIR}/unsortable_elements
84 US_ELEM_RES_DIR = ${TMP}/${USER}/starch_regression_test/results/unsortable_elements
85
86 unsortable_element_tests:
87 @if [ -d ${US_ELEM_RES_DIR} ]; then make -C ${US_ELEM_DIR} -f makefile clean; fi;
88 @make -C ${US_ELEM_DIR} -f makefile all
89
90 #
91 # clean-up
92 #
93
94 clean:
95 @echo "[STARCH] cleaning up files..."
96 @make -C ${ORIGINAL_DIR} -f makefile clean
97 @make -C ${COMPEXT_DIR} -f makefile clean
98 @make -C ${CONCAT_DIR} -f makefile clean
99 @make -C ${UPDATING_DIR} -f makefile clean
100 @make -C ${MD_INTEG_DIR} -f makefile clean
101 @make -C ${ND_ELEM_DIR} -f makefile clean
102 @rm -rf ${ORIGINAL_DATA}