-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
138 lines (102 loc) · 4.55 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
SHELL=/bin/bash
STRESS_RUNS=1
SOURCE_DB=test-data/smrtserver-testdata/database/latest
STRESS_NAME=run
clean:
rm -f secondary-smrt-server*.log
rm -rf smrt-server-analysis/{db,jobs-root}
rm -rf smrt-server-link/{db,jobs-root}
rm -rf smrt-server-analysis-internal/{db,jobs-root}
sbt clean
dataclean:
rm -rf test-data
build:
sbt compile
tools:
sbt clean pack
tools-smrt-analysis:
sbt smrt-analysis/{compile,pack}
tools-smrt-analysis-internal:
sbt smrt-server-analysis-internal/{compile,pack}
tools-smrt-server-analysis:
sbt smrt-server-analysis/pack
tools-tarball:
$(eval SHA := "`git rev-parse --short HEAD`")
@echo SHA is ${SHA}
rm -f pbscala*.tar.gz
sbt clean smrt-analysis/pack smrt-server-base/pack smrt-server-analysis/pack
cp -r smrt-server-base/target/pack/* smrt-analysis/target/pack/
cp -r smrt-server-analysis/target/pack/* smrt-analysis/target/pack/
rm -rf smrt-analysis/target/pack/bin/*.bat
cd smrt-analysis && tar cvfz ../pbscala-packed-${SHA}.tar.gz target/pack
generate-test-pipeline-json:
pbsmrtpipe show-templates --output-templates-json smrt-server-analysis/src/main/resources/resolved-pipeline-templates
repl:
sbt smrtflow/test:console
get-pbdata: PacBioTestData
PacBioTestData:
git clone https://github.com/PacificBiosciences/PacBioTestData.git
import-pbdata: insert-pbdata
insert-pbdata:
pbservice import-dataset PacBioTestData --debug
insert-mock-data:
sbt "smrt-server-analysis/run-main com.pacbio.secondary.smrtlink.tools.InsertMockData"
insert-mock-data-summary: tools-smrt-server-analysis
./smrt-server-analysis/target/pack/bin/smrt-db-tool
start-smrt-server-analysis:
sbt "smrt-server-analysis/run"
start-smrt-server-analysis-jar:
sbt "smrt-server-analysis/assembly"
java -jar smrt-server-analysis/target/scala-2.11/smrt-server-analysis-assembly-*-SNAPSHOT.jar
test:
sbt -batch "test-only -- junitxml html console"
test-int-install-pytools:
@echo "This should be done in a virtualenv!"
@echo "assuming virtualenvwrapper is installed"
virtualenv ./ve
. ./ve/bin/activate
pip install -r INT_REQUIREMENTS.txt
@echo "successfully installed integration testing tools"
test-data/smrtserver-testdata:
mkdir -p test-data
rsync --progress -az --delete login14-biofx01:/mnt/secondary/Share/smrtserver-testdata test-data/
test-int-import-references:
pbservice import-dataset --debug --port=8070 test-data/smrtserver-testdata/ds-references/
test-int-import-subreads:
pbservice import-dataset --debug --port=8070 test-data/smrtserver-testdata/ds-subreads/
test-int-import-data: test-int-import-references test-int-import-subreads
test-int-run-analysis:
pbservice run-analysis --debug --port=8070 --block ./smrt-server-analysis/src/test/resources/analysis-dev-diagnostic-01.json
test-int-run-analysis-stress:
pbservice run-analysis --debug --port=8070 --block ./smrt-server-analysis/src/test/resources/analysis-dev-diagnostic-stress-01.json
test-int-run-analysis-trigger-failure:
pbservice run-analysis --debug --port=8070 --block ./smrt-server-analysis/src/test/resources/analysis-dev-diagnostic-stress-trigger-fail-01.json
test-int-get-status:
pbservice status --debug --port=8070
test-int-run-sanity: test-int-get-status test-int-import-data test-int-run-analysis
test-sim:
sbt "smrt-server-analysis/assembly"
sbt "smrt-server-sim/pack"
python extras/run_sim_local.py DataSetScenario
validate-report-view-rules:
find ./smrt-server-analysis/src/main/resources/report-view-rules -name "*.json" -print0 | xargs -0L1 python -m json.tool
validate-pipeline-view-rules:
find ./smrt-server-analysis/src/main/resources/pipeline-template-view-rules -name "*.json" -print0 | xargs -0L1 python -m json.tool
validate-resources: validate-report-view-rules validate-pipeline-view-rules
# e.g., make full-stress-run STRESS_RUNS=2 SOURCE_DB=~/analysis_services_beta_3.1.1.db
full-stress-run: test-data/smrtserver-testdata $(SOURCE_DB)
@for i in `seq 1 $(STRESS_RUNS)`; do \
RUN=$(STRESS_NAME)-$$(date +%F-%T) && \
RUNDIR=test-output/stress-runs && \
OUTDIR=$$RUNDIR/$$RUN && \
mkdir -p $$OUTDIR && \
rm -f $$RUNDIR/latest && \
ln -s $$RUN $$RUNDIR/latest && \
sbt smrt-server-analysis/compile && \
SERVERPID=$$(bash -i -c "sbt -no-colors \"smrt-server-analysis/run --log-file $(CURDIR)/$$OUTDIR/secondary-smrt-server.log\" > $$OUTDIR/smrt-server-analysis.out 2> $$OUTDIR/smrt-server-analysis.err & echo \$$!") && \
sleep 360 && \
./stress.py -x 10 --nprocesses 20 --profile $$OUTDIR/profile.json > $$OUTDIR/stress.out 2> $$OUTDIR/stress.err ; \
sleep 2 ; \
pkill -g $$SERVERPID ; \
sleep 2 ; \
done