Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 136 lines (111 sloc) 4.147 kB
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
1 # Makefile for Pyccuracy
2 SHELL := /bin/bash
3
4 # Internal variables.
5 root_dir=.
6 build_dir=${root_dir}/build
7 src_dir=${root_dir}/pyccuracy
8
9 tests_dir=${root_dir}/tests
10 unit_tests_dir=${tests_dir}/unit
11 functional_tests_dir=${tests_dir}/functional
12
13 compile_log_file=${build_dir}/compile.log
14 unit_log_file=${build_dir}/unit.log
15 functional_log_file=${build_dir}/functional.log
16
896cf95 @guilhermechapiewski Convenience to execute acceptance tests in different browsers.
guilhermechapiewski authored
17 browser="firefox"
b6912e8 @guilhermechapiewski Convenience to execute specific patterns on acceptance test.
guilhermechapiewski authored
18 pattern="*"
896cf95 @guilhermechapiewski Convenience to execute acceptance tests in different browsers.
guilhermechapiewski authored
19
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
20 help:
33e8739 @guilhermechapiewski Mechanism to auto generate actions docs in textile format.
guilhermechapiewski authored
21 @echo "Please use 'make <target>' where <target> is one of"
183cb1b Acceptance tests run selenium now.
Bernardo Heynemann authored
22 @echo " all to run a complete build"
23 @echo " clean to clear the build dir"
24 @echo " compile to compile all python files"
25 @echo " test to run all the tests"
26 @echo " unit to run all the unit tests"
27 @echo " functional to run all the functional tests"
28 @echo " acceptance to run all the acceptance tests"
29 @echo " docs to build documentation"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
30
31 all: prepare_build compile test report_success
32 test: prepare_build compile run_unit run_functional acceptance report_success
33 unit: prepare_build compile run_unit report_success
34 functional: prepare_build compile run_functional report_success
35 prepare_build: clean create_build_dir
36 clean: remove_build_dir remove_dist_dir
37 @find . -name '*.pyc' -delete
38
39 # action targets
40
41 report_success:
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
42 @echo "================"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
43 @echo "Build succeeded!"
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
44 @echo "================"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
45
46 remove_build_dir:
47 @rm -fr ${build_dir}
48
49 remove_dist_dir:
50 @rm -fr dist/
d7e8dfe @guilhermechapiewski Fixed build/release to use bdist instead of sdist.
guilhermechapiewski authored
51 @rm -fr Pyccuracy.egg-info/
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
52
53 create_build_dir:
54 @mkdir -p ${build_dir}
55
56 compile:
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
57 @echo "========================"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
58 @echo "Compiling source code..."
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
59 @echo "========================"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
60 @rm -f ${compile_log_file} >> /dev/null
61 @rm -f -r ${src_dir}/*.pyc >> /dev/null
62 @python -tt -m compileall ${src_dir} >> ${compile_log_file} 2>> ${compile_log_file}
63 @python -tt -m compileall ${unit_tests_dir} >> ${compile_log_file} 2>> ${compile_log_file}
64
65 run_all_tests: compile
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
66 @echo "===================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
67 @echo "Running all tests..."
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
68 @echo "===================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
69 @nosetests -s --verbose --with-coverage --cover-package=pyccuracy
70
71 run_unit: compile
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
72 @echo "====================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
73 @echo "Running unit tests..."
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
74 @echo "====================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
75 @rm -f ${unit_log_file} >> /dev/null
76 @nosetests -s --verbose --with-coverage --cover-package=pyccuracy ${unit_tests_dir}
77
78 run_functional: compile
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
79 @echo "==========================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
80 @echo "Running functional tests..."
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
81 @echo "==========================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
82 @rm -f ${functional_log_file} >> /dev/null
83 @nosetests -s --verbose --with-coverage --cover-package=pyccuracy ${functional_tests_dir}
84
183cb1b Acceptance tests run selenium now.
Bernardo Heynemann authored
85 selenium_up:
86 @echo "===================="
87 @echo "Starting selenium..."
88 @echo "===================="
89 @java -jar ${root_dir}/lib/selenium-server.jar 2> /dev/null > /dev/null &
90 @echo "Started."
91
92 selenium_down:
93 @echo "==================="
94 @echo "Killing selenium..."
95 @echo "==================="
96 @-ps aux | egrep selenium | egrep -v egrep | awk '{ print $$2 }' | xargs kill -9
97 @echo "Killed."
98
d7f68ff Added wait to Makefile.
Bernardo Heynemann authored
99 wait:
100 @echo "=========="
101 @echo "Waiting..."
102 @echo "=========="
be2ff41 Fixed make file.
Bernardo Heynemann authored
103 @sleep 10
d7f68ff Added wait to Makefile.
Bernardo Heynemann authored
104
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
105 acceptance:
183cb1b Acceptance tests run selenium now.
Bernardo Heynemann authored
106 @make selenium_up
d7f68ff Added wait to Makefile.
Bernardo Heynemann authored
107 @make wait
15732d3 @diogobaeder Improving Makefile output formatting for better feedback
diogobaeder authored
108 @echo "==========================="
109 @echo "Running acceptance tests..."
110 @echo "==========================="
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
111
931b425 @diogobaeder Fixing PYTHONPATH for acceptance tests
diogobaeder authored
112 @PYTHONPATH=`pwd`/:$$PYTHONPATH python pyccuracy/pyccuracy_console.py -d ${root_dir}/tests/acceptance/action_tests/ -p "${pattern}en-us.acc" -l en-us -v 3 -b ${browser}
113 @PYTHONPATH=`pwd`/:$$PYTHONPATH python pyccuracy/pyccuracy_console.py -d ${root_dir}/tests/acceptance/action_tests/ -p "${pattern}pt-br.acc" -l pt-br -v 3 -b ${browser}
478cf03 Fixed pyccuracy makefile to return status 0.
Bernardo Heynemann authored
114 @-make selenium_down
2c6348d @heynemann Release of version 1.0.0
authored
115
d7e8dfe @guilhermechapiewski Fixed build/release to use bdist instead of sdist.
guilhermechapiewski authored
116 dist: clean
2c6348d @heynemann Release of version 1.0.0
authored
117 @echo "Running a build..."
ea8d2c3 @guilhermechapiewski Fixed build/relase again, returning to sdist.
guilhermechapiewski authored
118 @python setup.py sdist
2c6348d @heynemann Release of version 1.0.0
authored
119 @echo "Build finished successfully!"
120
d7e8dfe @guilhermechapiewski Fixed build/release to use bdist instead of sdist.
guilhermechapiewski authored
121 upload: clean
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
122 @echo "Running a build..."
ea8d2c3 @guilhermechapiewski Fixed build/relase again, returning to sdist.
guilhermechapiewski authored
123 @python setup.py sdist upload
2c6348d @heynemann Release of version 1.0.0
authored
124 @echo "Build finished successfully and uploaded!"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
125
126 docs:
33e8739 @guilhermechapiewski Mechanism to auto generate actions docs in textile format.
guilhermechapiewski authored
127 @python pyccuracy/actions/core/__init__.py > actions_reference.textile
128 @echo -e "\nFile 'actions_reference.textile' was generated.\n"
8caf5c3 @diogobaeder Fixing URLs from old website to wiki at github
diogobaeder authored
129 @echo -e "Don't forget to update https://github.com/heynemann/pyccuracy/wiki/Actions-Reference.\n"
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
130
131 deb:
132 mv .git /tmp/pyccuracy_git
b94fc61 Make and logfile.
Bernardo Heynemann authored
133 python -c 'import os;os.system("debuild -tc")'
912d939 Introducing Pyccuracy 0.6.0 !
Gabriel Falcão authored
134 mv /tmp/pyccuracy_git .git
af2ba2e Release 1.2.13
Bernardo Heynemann authored
135 mv ../python-pyccuracy_*.deb ./releases
Something went wrong with that request. Please try again.