Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/config/copyres.xml =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/config/copyres.xml (revision 488286) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/config/copyres.xml (working copy) @@ -17,6 +17,7 @@ + @@ -25,6 +26,14 @@ + + + + + + + + @@ -66,5 +75,20 @@ subject="${subject}"/> + + + + + + + + + + Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/modulesList =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/modulesList (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/modulesList (revision 0) @@ -0,0 +1,25 @@ +accessibility +archive +auth +awt +beans +crypto +instrument +jndi +lang-management +logging +luni +math +nio +nio_char +prefs +print +regex +rmi +security +sound +sql +swing +text +tools +x-net Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/config/config-HUT_iterative.xml =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/config/config-HUT_iterative.xml (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/config/config-HUT_iterative.xml (revision 0) @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.bat =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.bat (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.bat (revision 0) @@ -0,0 +1,57 @@ +@echo off + +set JRE=%1 +set VMNAME=%2 +set FORKMODE=%3 +set CLASSLIB=%4 +set ITER=%5 + +echo TESTEDVM %JRE% +echo VMNAME %VMNAME% +echo FORKMODE %FORKMODE% +echo CLASSLIB %CLASSLIB% +echo ITER %ITER% + +copy modulesList %CLASSLIB% + +cd %CLASSLIB% + +set ANT_COMMAND=%ANT_HOME%\bin\ant.bat +set start=1 +set step=1 + +for /F %%i in (modulesList) do ( + for /L %%A in (%start%,%step%,%ITER%) do ( + + echo %%i +call %ANT_COMMAND% -Dtest.jre.home=%JRE% -Dhy.test.vm.name=%VMNAME% -Dbuild.module=%%i -Dhy.test.forkmode=%FORKMODE% test 2>&1 > log_%%i_%%A.txt + +rem type log_%%i_%%A.txt + + move build\test_report build\test_report_%%i_%%A + ) +) + +for /F %%i in (modulesList) do ( + for /L %%A in (%start%,%step%,%ITER%) do ( + + echo test_report_%%i_%%A >> build\test_report_length.txt + dir build\test_report_%%i_%%A | find /C "Test.xml" >> build\test_report_length.txt + + ) +) + +cd build + +rem find errors + +findstr /RS "errors=\"[1-9]\" " *Test.xml >> ERRORS.txt + +rem find failures + +findstr /RS "failures=\"[1-9]*\"" *Test.xml >> FAILURES.txt + +rem find crash candidates + +dir /O /S | find "Test.xml" | find " 0 TEST" >> ZERO_LENGTH.txt + Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.sh =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.sh (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/HUT_iterative_run.sh (revision 0) @@ -0,0 +1,78 @@ +#!/bin/sh +#CLASSLIB=C:/Harmony-contribution/Harmony_svn/classlib +# get the list of all modules + +#ls -la | awk '{print ($9)}' | grep -v "\." > modulesList + +JRE=$1 +VMNAME=$2 +FORKMODE=$3 +CLASSLIB=$4 +ITER=$5 + +echo TESTEDVM ${JRE} +echo VMNAME ${VMNAME} +echo FORKMODE ${FORKMODE} +echo CLASSLIB ${CLASSLIB} +echo ITER ${ITER} + +cp modulesList ${CLASSLIB} + +cd ${CLASSLIB} + +#STAMP=`date +%Y%m%d%H%M%S` + +cat modulesList | while read moduleName; do + + A=0 + while [ "$A" -lt `expr ${ITER}` ]; do + + echo ITERATION $A + + + ant -Dtest.jre.home=${JRE} -Dhy.test.vm.name=${VMNAME}\ + -Dbuild.module=$moduleName -Dhy.test.forkmode=${FORKMODE} \ + test 2>&1 | tee log_${moduleName}_${A}.txt + + mv build/test_report build/test_report_${moduleName}_${A} + + A=`expr $A + 1` + + done + +done + +cat modulesList | while read moduleName; do + + echo $moduleName + + A=0 + + while [ "$A" -lt `expr ${ITER}` ]; do + + L=`ls -1 build/test_report_${moduleName}_${A} | grep xml | wc -l` + + echo build/test_report_${moduleName}_${A} $L >> build/test_report_length.txt + + A=`expr $A + 1` + + done + +done + +cd build + +# find errors + +find test_report_* -name *Test.xml -exec grep -l " ERRORS.txt + +# find failures + +find test_report_* -name *Test.xml -exec grep -l "failures=\"[1-9]*\"" {} \; > FAILURES.txt + +# find crash candidates + +find test_report_* -type f -size 0 | grep *.xml > ZERO_LENGTH.txt + +exit 0 + Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/cc.properties.example =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/cc.properties.example (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/cc.properties.example (revision 0) @@ -0,0 +1,29 @@ +## 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. +## ====================================================================================== +## +## example properties file. Please rename to "cc.properties" and configure +## appropriately +## +## +## -------------------------------------------------------------------- +## classlib tests iterative runs settings +## -------------------------------------------------------------------- +HUT_iterative_cycle_timeout=259200 +HUT_iterative_repetitions=50 +HUT_iterative_forkmode=once +## Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/README.txt =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/README.txt (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/README.txt (revision 0) @@ -0,0 +1,53 @@ + +HUT_iterative directory of Build-Test Intfrastructure +====================================================== + +This directory contains config and scripts to iteratively run +classlib tests of the Apache Harmony project. + +To Setup +-------- + +1) Copy cc.properties.example to cc.properties, and update file with actual values. + +2) With Java, Ant and SVN installed, change into the buildtest/trunk + directory and type + + ant -Dmodule=HUT_iterative setup + + This should fetch CruiseControl, set it up with the Apache Harmony + configuration, and checkout the software to be built and tested + from Apache Harmony. + Also, as part of setup command the external libs for classlib and drlvm modules + will be downloaded and these modules will be built first time. + + Note, JAVA_HOME and ANT_HOME environment variable should be correctly set up + in your environment. Also ANT_OPTS variable should be set up to something like + set/export ANT_OPTS=-Xmx400M to compile Harmony classes. + + +To kickoff CruiseControl with iterative classlib tests run, just type : +---------------------------------------------------------------------- + + ant + + in buildtest/trunk and that will launch CC with the test set. + + To check status, point your browser to + + http://localhost:8080/ + +Iterative test run results +-------------------------- +are accumulated in classlib/trunk/build/test_report_${moduleName}_${iteration} +directories. After test cycle is complete, the results are merged and e-mailed +to the address predefined in cc.properties file. The FAILURES, ERRORS, ZERO_LENGTH +statistics are attached. Zip file with test reports, logs and statistics is available: +classlib/trunk/results_drlvm_.zip + +FAQ +--- +1) Q.: The test runs OK, but no passed/ failed information available. Why? + A.: This script was tested and works over the sun jdk only. If you run +it over the BEA jdk it will fail. + Index: C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/build.xml =================================================================== --- C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/build.xml (revision 0) +++ C:/Harmony-contribution/Harmony_svn/buildtest/trunk/HUT_iterative/build.xml (revision 0) @@ -0,0 +1,66 @@ + + + + + + + CI/built/test system for Apache Harmony + http://incubator.apache.org/harmony + + + + + + +HUT_iterative_timeout=${HUT_iterative_cycle_timeout} +HUT_iterations=${HUT_iterative_repetitions} +HUT_forkmode=${HUT_iterative_forkmode} +fs=${file.separator} + + + + + + + + + + + + + + + + + + + +cmd_HUT_iterative=HUT_iterative_run.bat + + + + + +cmd_HUT_iterative=HUT_iterative_run.sh + + + +