comparison src/MPipeline2/nbproject/profiler-build-impl.xml @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
5
6 For the purpose of easier reading the script
7 is divided into following sections:
8
9 - initialization
10 - profiling
11 - applet profiling
12
13 -->
14 <project name="-profiler-impl" default="profile" basedir="..">
15 <target name="default" depends="profile" description="Build and profile the project."/>
16 <!--
17 ======================
18 INITIALIZATION SECTION
19 ======================
20 -->
21 <target name="profile-init" depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check"/>
22 <target name="-profile-pre-init">
23 <!-- Empty placeholder for easier customization. -->
24 <!-- You can override this target in the ../build.xml file. -->
25 </target>
26 <target name="-profile-post-init">
27 <!-- Empty placeholder for easier customization. -->
28 <!-- You can override this target in the ../build.xml file. -->
29 </target>
30 <target name="-profile-init-macrodef-profile">
31 <macrodef name="resolve">
32 <attribute name="name"/>
33 <attribute name="value"/>
34 <sequential>
35 <property name="@{name}" value="${env.@{value}}"/>
36 </sequential>
37 </macrodef>
38 <macrodef name="profile">
39 <attribute name="classname" default="${main.class}"/>
40 <element name="customize" optional="true"/>
41 <sequential>
42 <property environment="env"/>
43 <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
44 <java fork="true" classname="@{classname}" dir="${profiler.info.dir}" jvm="${profiler.info.jvm}">
45 <jvmarg value="${profiler.info.jvmargs.agent}"/>
46 <jvmarg line="${profiler.info.jvmargs}"/>
47 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
48 <arg line="${application.args}"/>
49 <classpath>
50 <path path="${run.classpath}"/>
51 </classpath>
52 <syspropertyset>
53 <propertyref prefix="run-sys-prop."/>
54 <mapper type="glob" from="run-sys-prop.*" to="*"/>
55 </syspropertyset>
56 <customize/>
57 </java>
58 </sequential>
59 </macrodef>
60 </target>
61 <target name="-profile-init-check" depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile">
62 <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
63 <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
64 </target>
65 <!--
66 =================
67 PROFILING SECTION
68 =================
69 -->
70 <target name="profile" if="netbeans.home" depends="profile-init,compile" description="Profile a project in the IDE.">
71 <nbprofiledirect>
72 <classpath>
73 <path path="${run.classpath}"/>
74 </classpath>
75 </nbprofiledirect>
76 <profile/>
77 </target>
78 <target name="profile-single" if="netbeans.home" depends="profile-init,compile-single" description="Profile a selected class in the IDE.">
79 <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
80 <nbprofiledirect>
81 <classpath>
82 <path path="${run.classpath}"/>
83 </classpath>
84 </nbprofiledirect>
85 <profile classname="${profile.class}"/>
86 </target>
87 <!--
88 =========================
89 APPLET PROFILING SECTION
90 =========================
91 -->
92 <target name="profile-applet" if="netbeans.home" depends="profile-init,compile-single">
93 <nbprofiledirect>
94 <classpath>
95 <path path="${run.classpath}"/>
96 </classpath>
97 </nbprofiledirect>
98 <profile classname="sun.applet.AppletViewer">
99 <customize>
100 <arg value="${applet.url}"/>
101 </customize>
102 </profile>
103 </target>
104 <!--
105 =========================
106 TESTS PROFILING SECTION
107 =========================
108 -->
109 <target name="profile-test-single" if="netbeans.home" depends="profile-init,compile-test-single">
110 <nbprofiledirect>
111 <classpath>
112 <path path="${run.test.classpath}"/>
113 </classpath>
114 </nbprofiledirect>
115 <junit showoutput="true" fork="true" dir="${profiler.info.dir}" jvm="${profiler.info.jvm}" failureproperty="tests.failed" errorproperty="tests.failed">
116 <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
117 <jvmarg value="${profiler.info.jvmargs.agent}"/>
118 <jvmarg line="${profiler.info.jvmargs}"/>
119 <test name="${profile.class}"/>
120 <classpath>
121 <path path="${run.test.classpath}"/>
122 </classpath>
123 <syspropertyset>
124 <propertyref prefix="test-sys-prop."/>
125 <mapper type="glob" from="test-sys-prop.*" to="*"/>
126 </syspropertyset>
127 <formatter type="brief" usefile="false"/>
128 <formatter type="xml"/>
129 </junit>
130 </target>
131 </project>