This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmakefile
118 lines (89 loc) · 2.76 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
# Pull all dependencies for mtbf runner
mtbf-env = mtbf-env
virtual-env-exists = $(shell if [ -d "mtbf-env" ]; then echo "exists"; fi)
setup-combo: combo-runner virtual-env activate
delete-mtbf-env:
@rm -rf mtbf-env
utils: get-branch combo-runner virtual-env activate lib-install github-remove b2g-flash-tool b2g-tool
v2.1: mtbf-v2.1 utils custom-gaia
v2.2: mtbf-v2.2 utils custom-gaia
v2.5: mtbf-v2.5 utils custom-gaia
v2.2-nexus-sleep: mtbf-v2.2-nexus-sleep utils custom-gaia
vmaster: mtbf-vmaster utils custom-gaia
downloader: b2g-flash-tool
b2g-tool:
@git clone https://github.com/mozilla-b2g/B2G
@cp -r B2G/tools .
@rm -rf B2G
@touch tools/__init__.py
virtual-env:
ifneq ($(virtual-env-exists),exists)
@virtualenv ${mtbf-env}
else
@echo "virtual environment exists."
endif
custom-gaia:
ifdef gaiatest
cp -r ${gaiatest} .;\
chmod -R +w gaia-ui-tests;\
cp -r ${gaiatest}/../../atoms gaia-ui-tests/gaiatest/;\
chmod -R +w gaia-ui-tests;\
if [ -z "$$VIRTUAL_ENV" ];\
then . ./mtbf-env/bin/activate;\
fi;\
cd gaia-ui-tests;\
python setup.py clean;\
python setup.py install;\
cd ..;\
rm -rf gaia-ui-tests
else
@echo use default gaiatest
endif
lib-install: virtual-env
$(shell if [ -z "$$VIRTUAL_ENV" ]; then\
. ./mtbf-env/bin/activate;\
fi;\
pip install lockfile >/dev/null 2>&1;)
activate: mtbf-driver virtual-env
if [ -z "$$VIRTUAL_ENV" ]; then\
. ./mtbf-env/bin/activate;\
fi;\
cd MTBF-Driver;\
python setup.py clean;\
python setup.py install;\
cd ../combo-runner;\
python setup.py clean;\
python setup.py install;
github-remove:
@rm -rf MTBF-Driver combo-runner
get-branch:
@cd MTBF-Driver && branch=$(git branch | grep "\*" | awk '{print $2}') && cd ..;
mtbf-vmaster: mtbf-driver
@cd MTBF-Driver && git checkout master;
mtbf-v2.2-nexus-sleep: mtbf-driver
@cd MTBF-Driver && git checkout -b v2.2-nexus-sleep origin/v2.2-nexus-sleep;
mtbf-v2.5: mtbf-driver
@cd MTBF-Driver && git checkout -b v2.5 origin/v2.5;
mtbf-v2.2: mtbf-driver
@cd MTBF-Driver && git checkout -b v2.2 origin/v2.2;
mtbf-v2.1: mtbf-driver
@cd MTBF-Driver && git checkout -b v2.1 origin/v2.1;
combo-runner:
@git clone https://github.com/Mozilla-TWQA/combo-runner.git;
mtbf-driver:
@git clone https://github.com/Mozilla-TWQA/MTBF-Driver.git; \
cp -rf MTBF-Driver/mtbf_driver/conf .; \
cp -rf MTBF-Driver/mtbf_driver/tests .; \
cp -rf MTBF-Driver/mtbf_driver/runlist .;
update:
@cd MTBF-Driver; \
git pull -u; \
cd ../combo-runner; \
git pull -u;
b2g-flash-tool:
git clone https://github.com/Mozilla-TWQA/B2G-flash-tool.git; \
cp -r B2G-flash-tool flash_tool; \
cp -f b2g_download.py flash_tool; \
rm -rf B2G-flash-tool;
clean:
@rm -rf build conf runlist dist MTBF-Driver combo-runner B2G-flash-tool tools flash_tool gaia-ui-tests ${mtbf-env}