forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test-ldap.xml
153 lines (125 loc) · 3.89 KB
/
build-test-ldap.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?xml version="1.0"?>
<project name="portal-test-ldap" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="prepare-ldap-apache">
<if>
<or>
<not>
<isset property="apache.directory.win32.dir" />
</not>
<not>
<isset property="apache.directory.win32.zip" />
</not>
</or>
<then>
<fail>
.
Please set "apache.directory.win32.dir" and "apache.directory.win32.zip" in
test.properties to point to an ApacheDS installation file.
</fail>
</then>
</if>
<antcall target="install-vm-java" />
<echo>Restarting ${vm.host}.</echo>
<exec dir="${vm.drive}/${vm.host}" executable="${vmware-cmd.executable}">
<arg line="${vm.drive}\${vm.host}\${vm.host}.vmx reset" />
</exec>
<sleep seconds="60" />
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${apache.directory.win32.dir}${apache.directory.win32.zip} ${vm.username}@${vm.host}:/" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} ${unzip.executable} -oq C:\${apache.directory.win32.zip} -d C:\" />
</exec>
</target>
<target name="run-ldap-tomcat">
<antcall target="prepare-vm-server">
<param name="build.war" value="false" />
<param name="vm.vmdk.suffix" value="alpha-2010-02-02" />
</antcall>
<antcall target="prepare-ldap-apache" />
<parallel>
<daemons>
<echo file="execute-remote-command.bat">
cd C:\apacheds_1.5.7
apacheds.bat
</echo>
<antcall target="execute-remote-command" />
</daemons>
<sequential>
<waitfor>
<socket port="10389" server="${vm.host}" />
</waitfor>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<echo file="${tstamp.value}">version: 1
dn: dc=example,dc=com
objectClass: domain
objectClass: extensibleObject
objectClass: top
dc: example
dn: ou=users,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
ou: users
dn: ou=groups,dc=example,dc=com
objectClass: organizationalUnit
objectClass: top
ou: groups
dn: cn=janesmith,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: janesmith
givenname: Jane
mail: janesmith@liferay.com
sn: Smith
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
businessCategory: cn=usergroup,ou=groups,dc=example,dc=com
dn: cn=lukeskywalker,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: lukeskywalker
givenname: Luke
mail: lukeskywalker@liferay.com
sn: Skywalker
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
dn: cn=martinluther,ou=users,dc=example,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: martinluther
givenname: Martin
mail: martinluther@liferay.com
sn: Luther
userpassword:: e1NIQX1xVXFQNWN5eG02WWNUQWh6MDVIcGg1Z3Z1OU09
dn: cn=usergroup,ou=groups,dc=example,dc=com
objectClass: groupOfUniqueNames
objectClass: top
cn: usergroup
uniqueMember: cn=janesmith,ou=users,dc=example,dc=com
businessCategory: cn=janesmith,ou=users,dc=example,dc=com</echo>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${tstamp.value} ${vm.username}@${vm.host}:/" />
</exec>
<delete file="${tstamp.value}" />
<echo file="execute-remote-command.bat">
cd C:\apacheds_1.5.7\bin
java -jar apacheds-tools.jar import -e -f C:/${tstamp.value}
</echo>
<antcall target="execute-remote-command" />
<ant antfile="build-test-tomcat.xml" target="run-selenium-tomcat">
<property name="test.class" value="${test.name}" />
</ant>
</sequential>
</parallel>
<exec dir="${vm.drive}/${vm.host}" executable="${vmware-cmd.executable}">
<arg line="${vm.drive}\${vm.host}\${vm.host}.vmx stop hard" />
</exec>
</target>
</project>