| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <project name="Harmony SAMSA Test" default="test" basedir="."> |
| |
| <property name="hy.hdk" location="../../.." /> |
| <property name="test.jre.home" location="${hy.hdk}/jdk/jre" /> |
| <property file="../test.properties" /> |
| |
| <property name="work.dir" value=".." /> |
| <property name="hy.test.root" value=".." /> |
| <property name="hy.component" value="jdktools" /> |
| <property name="hy.module" value="samsa" /> |
| <property name="tests.output" location="../report" /> |
| <property name="junit.jar" location="../junit.jar" /> |
| |
| <import file="../../ant/properties.xml" /> |
| |
| <target name="test" depends="test-module" /> |
| |
| <target name="test-module" depends="test-jre-vm-info"> |
| <echo message="Running SAMSA tests" /> |
| <echo message="test.jre.home=${test.jre.home}" /> |
| |
| <mkdir dir="${tests.output}" /> |
| |
| <echo message="Run jdk/bin/java -version in ${tests.output}"/> |
| <exec failonerror="true" |
| executable="${test.jre.home}/../bin/java${exe.suffix}" |
| dir="${tests.output}" |
| outputproperty="java.out.text"> |
| <arg line="-version" /> |
| </exec> |
| <fail message="java -version should contain a copyright statement"> |
| <condition> |
| <not> |
| <contains string="${java.out.text}" |
| substring="Copyright 1991"/> |
| </not> |
| </condition> |
| </fail> |
| <fail message="java -version should contain svn revision information"> |
| <condition> |
| <not> |
| <contains string="${java.out.text}" substring="svn = r"/> |
| </not> |
| </condition> |
| </fail> |
| |
| <echo message="Run jdk/bin/javac -version in ${tests.output}"/> |
| <exec failonerror="true" |
| executable="${test.jre.home}/../bin/javac${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="-version" /> |
| </exec> |
| |
| <echo message="Run jdk/bin/javah in ${tests.output}"/> |
| <exec failonerror="false" |
| executable="${test.jre.home}/../bin/javah${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="" /> |
| </exec> |
| |
| <echo message="Run jdk/bin/javadoc in ${tests.output}"/> |
| <exec failonerror="false" |
| executable="${test.jre.home}/../bin/javadoc${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="" /> |
| </exec> |
| |
| <echo message="Run jdk/bin/jarsigner in ${tests.output}"/> |
| <exec failonerror="false" |
| executable="${test.jre.home}/../bin/jarsigner${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="" /> |
| </exec> |
| |
| <echo message="Run jdk/jre/bin/keytool -help in ${tests.output}"/> |
| <exec failonerror="true" |
| executable="${test.jre.home}/bin/keytool${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="-help" /> |
| </exec> |
| |
| <echo message="Run jdk/jre/bin/unpack200 in ${tests.output}"/> |
| <exec failonerror="true" |
| executable="${test.jre.home}/bin/unpack200${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="" /> |
| </exec> |
| |
| <echo message="Run jdk/jre/bin/pack200 in ${tests.output}"/> |
| <exec failonerror="true" |
| executable="${test.jre.home}/bin/pack200${exe.suffix}" |
| dir="${tests.output}"> |
| <arg line="" /> |
| </exec> |
| </target> |
| |
| </project> |