forked from Lucterios2/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
76 lines (72 loc) · 3.32 KB
/
build.xml
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
<project name="Lucterios2" default="all" basedir=".">
<property name="standard.path" value="${basedir}/../lct-standard" />
<property name="project.packagepath" value="lucterios/CORE,lucterios/framework,lucterios/install" />
<property name="project.packagename" value="lucterios.CORE lucterios.dummy" />
<property name="project.name" value="lucterios" />
<property name="project.pythonpath" value="${standard.path}:${env.PYTHONPATH}" />
<property name="project.packname" value="lucterios.egg-info" />
<property name="project.modules" value="lucterios.dummy" />
<property name="project.appli" value="lucterios.standard" />
<property name="web.path" value="lucterios/framework/static/lucterios.framework/web" />
<property name="web.version" value="1.0.6" />
<import file="${basedir}/utils/lib_build.xml" />
<taskdef name="jslint" classname="com.googlecode.jslint4java.ant.JSLintTask" classpath="${web.path}/jslint/jslint4java-2.0.5.jar" />
<target name="init_addon">
<delete file="${web.path}/conf/conf.js" />
<copy file="${web.path}/deployed/conf_template.js" tofile="${web.path}/conf/conf.js" />
<replace file="${web.path}/conf/conf.js" token="G_Version = 'X.X.X.X';" value="G_Version = '${web.version}.${build_number}';" />
<jslint encoding="UTF-8" options="white,browser,plusplus,newcap,sloppy,nomen,evil,indent=4" haltOnFailure='false'>
<predef>jQuery, setTimeout, history, window, document, btoa, atob, FileReader, Blob</predef>
<formatter type="xml" destfile="jslint_results.xml" />
<fileset dir="${web.path}" includes="js/*.js" />
</jslint>
</target>
<target name="test">
<echo message="-- test with ${testversion} --" />
<delete file=".converage" />
<delete file="converage.xml" />
<delete file="${testversion}.xml" />
<exec executable="${testversion}">
<arg value="erase" />
</exec>
<exec executable="${testversion}">
<env key="PYTHONPATH" value="${project.pythonpath}" />
<arg value="run" />
<arg value="--branch" />
<arg value="--source=lucterios" />
<arg value="--omit=lucterios/install/lucterios_gui.py" />
<arg value="./manage_${project.test.instance}.py" />
<arg value="test" />
<arg value="lucterios.CORE" />
<arg value="lucterios.dummy" />
</exec>
<if>
<equals arg1="${testversion}" arg2="coverage3" />
<then>
<exec executable="${testversion}">
<env key="PYTHONPATH" value="${basedir}:${project.pythonpath}" />
<arg value="run" />
<arg value="--append" />
<arg value="--branch" />
<arg value="--source=lucterios" />
<arg value="--omit=lucterios/install/lucterios_gui.py" />
<arg value="lucterios/install/admin_test.py" />
</exec>
<replace file="${basedir}/results.xml" token="__main__." value="lucterios-py3.TestAdmin." />
<move file="${basedir}/results.xml" tofile="junit_admin_py3.xml" />
</then>
<else>
<echo message="not addon test" />
</else>
</if>
<exec executable="${testversion}">
<arg value="report" />
</exec>
<exec executable="${testversion}">
<arg value="xml" />
</exec>
<move file="coverage.xml" tofile="${testversion}.xml" />
<replace file="${testversion}.xml" token='filename="lucterios' value='filename="${basedir}/lucterios' />
<replaceregexp file="${testversion}.xml" match="<source>.*</source>" replace="<source>/</source>" byline="true" />
</target>
</project>