forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-test-gogo-shell-client.xml
51 lines (39 loc) · 1.63 KB
/
build-test-gogo-shell-client.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
<?xml version="1.0"?>
<project basedir="." name="portal-test-gogo-shell" xmlns:antelope="antlib:ise.antelope.tasks" xmlns:if="ant:if">
<import file="build-test.xml" />
<target name="enable-access-to-gogo-shell-command">
<antcall inheritAll="false" target="prepare-log4j-ext-xml" />
<antcall if:set="env.JENKINS_HOME" inheritAll="false" target="prepare-portal-ext-properties" />
<antcall inheritall="false" target="start-app-server" />
<exec executable="/bin/bash" outputproperty="gogo.shell.content.out">
<redirector inputstring="telnet 127.0.0.1 11312" />
</exec>
<echo>${gogo.shell.content.out}</echo>
<if>
<contains string="${gogo.shell.content.out}" substring="Connected to 127.0.0.1." />
<then>
<echo>'Connected to 127.0.0.1.' is present.</echo>
</then>
<else>
<fail message="'Connected to 127.0.0.1.' is not present." />
</else>
</if>
</target>
<target name="no-default-access-to-gogo-shell-command">
<delete file="${app.server.tomcat.classes.portal.dir}/portal-ext.properties" />
<antcall inheritall="false" target="start-app-server" />
<exec executable="/bin/bash" outputproperty="gogo.shell.content.out">
<redirector inputstring="telnet 127.0.0.1 11311" />
</exec>
<echo>${gogo.shell.content.out}</echo>
<if>
<contains string="${gogo.shell.content.out}" substring="telnet: connect to address 127.0.0.1: Connection refused" />
<then>
<echo>'telnet: connect to address 127.0.0.1: Connection refused' is present.</echo>
</then>
<else>
<fail message="'telnet: connect to address 127.0.0.1: Connection refused' is not present." />
</else>
</if>
</target>
</project>