| 1 |
# |
| 2 |
# makefile |
| 3 |
# |
| 4 |
|
| 5 |
TMP = /tmp |
| 6 |
USER := $(shell whoami) |
| 7 |
THIS_DIR := ${shell pwd} |
| 8 |
RESULTS = ${TMP}/${USER}/starch_regression_test/results/unsortable_elements |
| 9 |
SRC = ${THIS_DIR}/src |
| 10 |
START_INPUT = ${THIS_DIR}/data/test_start.bed |
| 11 |
STOP_INPUT = ${THIS_DIR}/data/test_stop.bed |
| 12 |
STARCH_BZIP2 = ${RESULTS}/test_output.bz2starch |
| 13 |
STARCH_GZIP = ${RESULTS}/test_output.gzstarch |
| 14 |
PLATFORM := ${shell uname} |
| 15 |
BIN_DIR = ${THIS_DIR}/../binaries |
| 16 |
LINUX_BINDIR = ${BIN_DIR}/linux |
| 17 |
OSX_BINDIR = ${BIN_DIR}/osx |
| 18 |
VERSION = v2.1 |
| 19 |
VERSIONP = 2p1p0 |
| 20 |
|
| 21 |
all: tests |
| 22 |
|
| 23 |
tests: tests_bzip2 tests_gzip |
| 24 |
|
| 25 |
tests_bzip2: tests_start_bzip2 tests_stop_bzip2 |
| 26 |
|
| 27 |
tests_start_bzip2: |
| 28 |
@echo "[STARCH] testing (bzip2-starch) start elements..." |
| 29 |
if [ ! -d ${RESULTS} ]; then mkdir -p ${RESULTS}; fi |
| 30 |
ifeq (${PLATFORM},Linux) |
| 31 |
@${SRC}/isUnsortable.py ${LINUX_BINDIR}/${VERSION}/bin/starch ${STARCH_BZIP2} ${START_INPUT} > ${RESULTS}/start_bz2.starch |
| 32 |
endif |
| 33 |
ifeq (${PLATFORM},Darwin) |
| 34 |
@${SRC}/isUnsortable.py ${OSX_BINDIR}/${VERSION}/bin/starch ${STARCH_BZIP2} ${START_INPUT} > ${RESULTS}/start_bz2.starch |
| 35 |
endif |
| 36 |
@echo "[STARCH] (bzip2-starch) element start test passed!" |
| 37 |
|
| 38 |
tests_stop_bzip2: |
| 39 |
@echo "[STARCH] testing (bzip2-starch) stop elements..." |
| 40 |
if [ ! -d ${RESULTS} ]; then mkdir -p ${RESULTS}; fi |
| 41 |
ifeq (${PLATFORM},Linux) |
| 42 |
@${SRC}/isUnsortable.py ${LINUX_BINDIR}/${VERSION}/bin/starch ${STARCH_BZIP2} ${STOP_INPUT} > ${RESULTS}/stop_bz2.starch |
| 43 |
endif |
| 44 |
ifeq (${PLATFORM},Darwin) |
| 45 |
@${SRC}/isUnsortable.py ${OSX_BINDIR}/${VERSION}/bin/starch ${STARCH_BZIP2} ${STOP_INPUT} > ${RESULTS}/stop_bz2.starch |
| 46 |
endif |
| 47 |
@echo "[STARCH] (bzip2-starch) element stop test passed!" |
| 48 |
|
| 49 |
tests_gzip: tests_start_gzip tests_stop_gzip |
| 50 |
|
| 51 |
tests_start_gzip: |
| 52 |
@echo "[STARCH] testing (gzip-starch) start elements..." |
| 53 |
if [ ! -d ${RESULTS} ]; then mkdir -p ${RESULTS}; fi |
| 54 |
ifeq (${PLATFORM},Linux) |
| 55 |
@${SRC}/isUnsortable.py ${LINUX_BINDIR}/${VERSION}/bin/starch ${STARCH_GZIP} ${START_INPUT} > ${RESULTS}/start_gz.starch |
| 56 |
endif |
| 57 |
ifeq (${PLATFORM},Darwin) |
| 58 |
@${SRC}/isUnsortable.py ${OSX_BINDIR}/${VERSION}/bin/starch ${STARCH_GZIP} ${START_INPUT} > ${RESULTS}/start_gz.starch |
| 59 |
endif |
| 60 |
@echo "[STARCH] (gzip-starch) element start test passed!" |
| 61 |
|
| 62 |
tests_stop_gzip: |
| 63 |
@echo "[STARCH] testing (gzip-starch) stop elements..." |
| 64 |
if [ ! -d ${RESULTS} ]; then mkdir -p ${RESULTS}; fi |
| 65 |
ifeq (${PLATFORM},Linux) |
| 66 |
@${SRC}/isUnsortable.py ${LINUX_BINDIR}/${VERSION}/bin/starch ${STARCH_GZIP} ${STOP_INPUT} > ${RESULTS}/stop_gz.starch |
| 67 |
endif |
| 68 |
ifeq (${PLATFORM},Darwin) |
| 69 |
@${SRC}/isUnsortable.py ${OSX_BINDIR}/${VERSION}/bin/starch ${STARCH_GZIP} ${STOP_INPUT} > ${RESULTS}/stop_gz.starch |
| 70 |
endif |
| 71 |
@echo "[STARCH] (gzip-starch) element stop test passed!" |
| 72 |
|
| 73 |
clean: |
| 74 |
@echo "[STARCH] cleaning up intermediate stuff..." |
| 75 |
@rm -rf ${RESULTS} |
| 76 |
@echo "[STARCH] all clean!" |