Skip to content

Commit c531e54

Browse files
committed
Remove generation of unused testProperties.php file
1 parent c8db979 commit c531e54

File tree

1 file changed

+9
-199
lines changed

1 file changed

+9
-199
lines changed

production/testScripts/runTests2.xml

Lines changed: 9 additions & 199 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,7 @@
328328
printProperty from anywhere, but seems best to centralize the function. -->
329329
<antcall target="printProductionProperties" />
330330

331-
<!-- The PHP properties are useful to display (directly or indirectly)
332-
on "test results" page (such as "testPlatform" headings). -->
333-
<antcall target="printMainPropertiesAsPHP" />
331+
<echo message="DEBUG ant.version: ${ant.version}" />
334332

335333
<!-- following are all required by "runtests" ... used to be part of it,
336334
but wanted these variables to print out, even if merely testing scripts,
@@ -395,7 +393,7 @@
395393
<printProperty property="testExecutable" />
396394
<printProperty property="testScript" />
397395
<printProperty property="jvm" />
398-
<printProperty property="javaversionEscaped" />
396+
<printProperty property="java.version" />
399397
<printProperty property="javaMajorVersion" />
400398
<printProperty property="testedPlatform" />
401399
<printProperty property="testedPlatformConfig" />
@@ -836,148 +834,6 @@
836834
</exec>
837835
</target>
838836

839-
<!-- Prints properties in "PHP form" to use on test results summary, to
840-
be sure accurate and meaningful. -->
841-
<target
842-
name="printMainPropertiesAsPHP"
843-
depends="init"
844-
unless="printedMainPHPProperties">
845-
846-
<property
847-
name="EOL"
848-
value="${line.separator}" />
849-
850-
851-
<property
852-
name="phpPropertyFile"
853-
value="${junit-report-output}/testProperties.php" />
854-
855-
<!-- on first write to php file, don't append -->
856-
<echo
857-
message="&lt;?php${EOL}"
858-
append="false"
859-
file="${phpPropertyFile}" />
860-
<escapeProperty property="ant.version" />
861-
<printPHPProperty
862-
phpvar="ANT_VERSION"
863-
value="ant.versionEscaped" />
864-
<printPHPProperty
865-
phpvar="ANT_JAVA_VERSION"
866-
value="ant.java.versionEscaped" />
867-
<printPHPProperty
868-
phpvar="INVOKED_JAVA_VERSION"
869-
value="javaversionEscaped" />
870-
<!-- Note: there might be times, the java.runtime.version at this point
871-
in time, may not be quite right ... such as if invoked with some other VM
872-
with the intent of using 'jvm' on "eclipse" command line ... which we currently
873-
do not do. -->
874-
<printPHPProperty
875-
phpvar="JAVA_VERSION"
876-
value="java.version" />
877-
<printPHPProperty
878-
phpvar="JAVA_MAJOR_VERSION"
879-
value="javaMajorVersion" />
880-
<printPHPProperty
881-
phpvar="JAVA_RUNTIME_VERSION"
882-
value="java.runtime.version" />
883-
<printPHPProperty
884-
phpvar="JAVA_VM_INFO"
885-
value="java.vm.info" />
886-
<printPHPProperty
887-
phpvar="JAVA_SPECIFICATION_VERSION"
888-
value="java.specification.version" />
889-
<printPHPProperty
890-
phpvar="JAVA_VENDOR"
891-
value="java.vendor" />
892-
<printPHPProperty
893-
phpvar="OSGI_OS"
894-
value="osgi.os" />
895-
<printPHPProperty
896-
phpvar="OSGI_WS"
897-
value="osgi.ws" />
898-
<printPHPProperty
899-
phpvar="OSGI_ARCH"
900-
value="osgi.arch" />
901-
<!-- NODE_NAME will be empty string, if on master -->
902-
<condition
903-
property="hudsonSlave"
904-
value="master">
905-
<or>
906-
<not>
907-
<isset property="env.NODE_NAME" />
908-
</not>
909-
<equals
910-
arg1="${env.NODE_NAME}"
911-
arg2="" />
912-
<equals
913-
arg1="${env.NODE_NAME}"
914-
arg2=" " />
915-
</or>
916-
</condition>
917-
<!-- if not set above, we'll set to the non blank NODE_NAME -->
918-
<property
919-
name="hudsonSlave"
920-
value="${env.NODE_NAME}" />
921-
922-
<printPHPProperty
923-
phpvar="HUDSON_NODE_NAME"
924-
value="hudsonSlave" />
925-
<!-- I believe all (common) platforms have env variable for HOSTNAME. If
926-
not, user might want to set/export to be meaningful. (Surprisingly, it doesn't
927-
seem obvious that Hudson makes this available in its process environment). -->
928-
<printPHPProperty
929-
phpvar="HOSTNAME"
930-
value="env.HOSTNAME" />
931-
<printPHPProperty
932-
phpvar="HUDSON_JOB_NAME"
933-
value="env.JOB_BASE_NAME" />
934-
<printPHPProperty
935-
phpvar="HUDSON_BUILD_NUMBER"
936-
value="env.BUILD_NUMBER" />
937-
<printPHPProperty
938-
phpvar="HUDSON_BUILD_URL"
939-
value="env.BUILD_URL" />
940-
<!-- With HUDSON_URL and WORKSPACE_PATH should be able to figure out URL
941-
to WORKSPACE, though only temporarily available (until next job is ran). -->
942-
<printPHPProperty
943-
phpvar="HUDSON_URL"
944-
value="env.HUDSON_URL" />
945-
<printPHPProperty
946-
phpvar="HUDSON_WORKSPACE"
947-
value="env.WORKSPACE" />
948-
<printPHPProperty
949-
phpvar="TESTED_RUNTIME_ID"
950-
value="buildIdToUse" />
951-
<printPHPProperty
952-
phpvar="TEST_TARGET"
953-
value="test.target" />
954-
<printPHPProperty
955-
phpvar="ECLIPSE_PERF_SAMPLES_OUT"
956-
value="eclipse.perf.samples.out" />
957-
<printPHPProperty
958-
phpvar="ECLIPSE_PERF_DBLOC"
959-
value="eclipse.perf.dbloc" />
960-
961-
<printPHPProperty
962-
phpvar="ECLIPSE_PERF_CONFIG"
963-
value="eclipse.perf.config" />
964-
<printPHPProperty
965-
phpvar="ECLIPSE_PERF_ASSERTAGAINST"
966-
value="eclipse.perf.assertAgainst" />
967-
968-
<!-- We end with an empty line, but it is recommended to not end included
969-
PHP files with "end PHP" marker. -->
970-
<echo
971-
message="${EOL}"
972-
append="true"
973-
file="${phpPropertyFile}" />
974-
975-
<!-- set property so we only print these variables once -->
976-
<property
977-
name="printedMainPHPProperties"
978-
value="true" />
979-
980-
</target>
981837
<target
982838
name="setJVMProperties"
983839
depends="initPlatformSpecificProperties,setJVMfromUserSpecified"
@@ -986,51 +842,40 @@
986842
name="VMSource"
987843
value="VM used for tests, is same that invoked Ant: '${java.home}/bin/java' (that is, 'jvm' not specified by caller)." />
988844
<echo message="VMSource: ${VMSource}" />
989-
<!-- Remember, we don't want J2SE-X.0 set at all, if there is nothing that
990-
can run tests that require that level. -->
991845
<property
992846
name="jvm"
993847
value="${java.home}/bin/java" />
994848

849+
<echo message="full output from 'java -version' of ${jvm} is" />
995850
<exec
996-
executable="${jvm}"
997-
outputproperty="javaversion">
851+
executable="${jvm}">
998852
<arg line="-version" />
999853
</exec>
1000-
<echo message="full output from 'java -version' of ${jvm} is " />
1001-
<echo message="${javaversion}" />
1002-
<escapeProperty property="javaversion" />
1003854
</target>
1004855
<target
1005856
name="setJVMfromUserSpecified"
1006-
if="jvm"
1007-
unless="javaversionEscaped">
857+
if="jvm">
1008858

1009859
<property
1010860
name="VMSource"
1011861
value="VM used for tests, specified by caller: 'jvm'=${jvm}" />
1012862
<echo message="VMSource: ${VMSource}" />
1013-
<!-- Remember, we don't want J2SE-X.0 set at all, if there is nothing that
1014-
can run tests that require that level. -->
863+
<echo message="full output from 'java -version' of ${jvm} is" />
1015864
<exec
1016-
executable="${jvm}"
1017-
outputproperty="javaversion">
865+
executable="${jvm}">
1018866
<arg line="-version" />
1019867
</exec>
1020-
<echo message="full output from 'java -version' of ${jvm} is " />
1021-
<echo message="${javaversion}" />
1022-
<escapeProperty property="javaversion" />
1023868
</target>
869+
1024870
<!-- function to centralize how we get (that is, set) the value of 'javaMajorVersion'.
1025871
(expected to be integer, such as 5,6,7,8,9, or will be "0" if the version
1026872
could not be determined, for some reason. -->
1027-
1028873
<target
1029874
name="setJavaMajorVersion"
1030875
depends="setJVMProperties"
1031876
unless="javaMajorVersion">
1032877

1033-
<echo message="javaversion in setJavaMajorVersion: ${javaversionEscaped}" />
878+
<echo message="javaversion in setJavaMajorVersion: ${java.version}" />
1034879

1035880
<loadresource property="javaMajorVersion">
1036881
<string value="${java.version}"/>
@@ -1043,39 +888,4 @@
1043888
<echo message="javaMajorVersion: ${javaMajorVersion}"/>
1044889
</target>
1045890

1046-
<macrodef name="printPHPProperty">
1047-
<attribute name="phpvar" />
1048-
<attribute name="value" />
1049-
<sequential>
1050-
<!-- DEBUG <echo message="@{value}" /> -->
1051-
<condition
1052-
property="printValue@{value}"
1053-
value="${@{value}}"
1054-
else="NotSet">
1055-
<isset property="@{value}" />
1056-
</condition>
1057-
<echo
1058-
message="$@{phpvar}=&quot;${printValue@{value}}&quot;;${EOL}"
1059-
file="${phpPropertyFile}"
1060-
append="true" />
1061-
</sequential>
1062-
</macrodef>
1063-
<macrodef name="escapeProperty">
1064-
<!-- the use of propertyfile and local require at least Ant 1.8 -->
1065-
<attribute name="property" />
1066-
<sequential>
1067-
<echo message="DEBUG @{property}: ${@{property}}" />
1068-
<loadresource property="@{property}Escaped">
1069-
<propertyresource name="@{property}" />
1070-
<filterchain>
1071-
<tokenfilter>
1072-
<filetokenizer />
1073-
<replacestring
1074-
from='"'
1075-
to='\"' />
1076-
</tokenfilter>
1077-
</filterchain>
1078-
</loadresource>
1079-
</sequential>
1080-
</macrodef>
1081891
</project>

0 commit comments

Comments
 (0)