forked from SUSE-Cloud/automation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (50 loc) · 1.43 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
SHELL := /bin/bash
test: bashate perlcheck rubycheck pythoncheck rounduptest flake8 python_unittest
bashate:
cd scripts && \
for f in \
*.sh mkcloud mkchroot repochecker \
jenkins/{update_automation,*.sh} \
jenkins/ci1/*; \
do \
echo "checking $$f"; \
bash -n $$f || exit 3; \
bashate --ignore E006,E010,E011,E020,E042 $$f || exit 4; \
! grep $$'\t' $$f || exit 5; \
done
perlcheck:
cd scripts && \
for f in `find -name \*.pl` jenkins/{apicheck,grep,japi,jenkins-job-trigger}; \
do \
perl -wc $$f || exit 2; \
done
rubycheck:
for f in `find -name \*.rb` scripts/jenkins/jenkinslog; \
do \
ruby -wc $$f || exit 2; \
done
pythoncheck:
for f in `find -name \*.py` scripts/lib/libvirt/{admin-config,cleanup,compute-config,net-config,net-start,vm-start} ; \
do \
python -m py_compile $$f || exit 22; \
done
rounduptest:
cd scripts && roundup
flake8:
flake8 scripts/
python_unittest:
python -m unittest discover -v -s scripts/lib/libvirt/
# for travis-CI:
install: debianinstall genericinstall
debianinstall:
sudo apt-get update -qq
sudo apt-get -y install libxml-libxml-perl libjson-xs-perl python-libvirt
suseinstall:
sudo zypper install perl-JSON-XS perl-libxml-perl python-pip libvirt-python
genericinstall:
sudo pip install bashate flake8 flake8-import-order
git clone https://github.com/SUSE-Cloud/roundup && \
cd roundup && \
./configure && \
make && \
sudo make install