changeset 14:711b58cbbb72 draft

Sync with work copy.
author Pavel Tisnovsky <ptisnovs@redhat.com>
date Thu, 17 Apr 2014 17:12:39 +0200
parents 7577d55a0e30
children a88ff1d75e71
files ChangeLog tck7/build_all.sh tck7/clean_all.sh
diffstat 3 files changed, 73 insertions(+), 72 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 17 10:00:43 2014 +0200
+++ b/ChangeLog	Thu Apr 17 17:12:39 2014 +0200
@@ -1,3 +1,9 @@
+2014-04-17  Pavel Tisnovsky  <ptisnovs@redhat.com>
+
+	* tck7/build_all.sh:
+	* tck7/clean_all.sh:
+	Sync with work copy.
+
 2014-04-17  Pavel Tisnovsky  <ptisnovs@redhat.com>
 
 	* tck7/build_all.sh:
--- a/tck7/build_all.sh	Thu Apr 17 10:00:43 2014 +0200
+++ b/tck7/build_all.sh	Thu Apr 17 17:12:39 2014 +0200
@@ -41,66 +41,20 @@
 # Author: Pavel Tisnovsky
 # e-mail: ptisnovs@redhat.com
 
-JCK_DIR=`cat jck.dir`
+JCK_ROOT_DIR=`cat jck.dir`
+JCK_VERSION=7
+JCK_DIR=${JCK_ROOT_DIR}/${JCK_VERSION}
+WORK_DIR=${JCK_ROOT_DIR}/work
+RESULT_DIR=${JCK_ROOT_DIR}/results
 DAILY_TESTS_DIR=`cat dailytests.dir`
 
-TESTS="compiler devtools runtime"
-JCKVERSION=7
-WORKROOT=${JCK_DIR}/work
-JCKROOT==${JCK_DIR}/7
 DATE=`date +%Y%m%d`
 
 exec > logs/build_$DATE.log 2>&1
 
-function run_tck()
-{
-    REPORTDIR=${JCK_DIR}/results/${DATE}-${1}
-    export DISPLAY=:0.0
-    for tst in ${TESTS}
-    do
-        test_name=JCK-${tst}-${JCKVERSION}
-        WORKDIR=${WORKROOT}/${DATE}-${1}/${tst}
-        mkdir -p ${REPORTDIR}/${tst}
-        mkdir -p ${workdir}
-
-        ORIG_PATH="${PATH}"
-        export PATH="${JCKROOT}/${test_name}/linux/bin;${ORIG_PATH}"
-
-        java -Xms128m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=512m -jar ${JCKROOT}/${test_name}/lib/javatest.jar \
-         -workdir ${WORKDIR} \
-         -open ${JCKROOT}/${tst}-config.jti \
-         -verbose:progress -runtests \
-         -writeReport ${REPORTDIR}/${tst}
-        rc=$?
-        if [ $rc -ne 0 ]; then
-            log "${RED}test failed ${BLUE}${tst}${RESET}"
-        else
-            log "${GREEN}test passed ${BLUE}${tst}${RESET}"
-        fi
-
-        export PATH="${ORIG_PATH}"
-    done
-}
-
-function finish_tck()
-{
-    REPORTDIR=${JCK_DIR}/results/${DATE}-${1}
-    echo "Processing ${REPORTDIR}"
-    for tst in ${TESTS}
-    do
-        test_name=JCK-${tst}-${JCKVERSION}
-        echo "    Test: ${tst}"
-        WORKDIR=${WORKROOT}/${DATE}-${1}/${tst}
-        CONFIG=${JCKROOT}/${tst}-config.jti
-        java -Xms128m -Xmx512m -XX:PermSize=256m -XX:MaxPermSize=512m -jar ${JCKROOT}/${test_name}/lib/javatest.jar \
-             -workDir ${WORKDIR} \
-             -config ${CONFIG} \
-             -verbose:progress \
-             -priorStatus passed,fail,error \
-             -writeReport ${REPORTDIR}/${tst}
-    done
-}
-
+# We need to preserve only image of JRE and SDK.
+# Other files and directories could be deleted not to waste disk space
+# (it will be filled by JCK work files, after all :)
 function remove_other_dirs()
 {
     rm -rf $1/corba
@@ -139,15 +93,49 @@
     rm -rf $1/build/linux-amd64/j2sdk-server-image
 }
 
-cp cfg/repo_url_icedtea7_forest.txt cfg/repo_urls.txt
-./run.lua
-remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest/openjdk
+# Prints version of the JVM built by this script.
+function print_java_version()
+{
+    $!/build/linux-amd64/j2sdk-image//bin/java -version
+}
+
+# Builds IcedTea7 forest.
+function build_icedtea7_forest()
+{
+    cp cfg/repo_url_icedtea7_forest.txt cfg/repo_urls.txt
+    # This script should report all failures etc.
+    ./run.lua
+    remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest/openjdk
+    print_java_version ${DAILY_TESTS_DIR}/builds/Icedtea7_forest/openjdk
+}
 
-cp cfg/repo_url_icedtea7_forest_2_3.txt cfg/repo_urls.txt
-./run.lua
-remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest_2_3/openjdk
+# Builds IcedTea7_2_3.
+function build_icedtea7_2_3()
+{
+    cp cfg/repo_url_icedtea7_forest_2_3.txt cfg/repo_urls.txt
+    # This script should report all failures etc.
+    ./run.lua
+    remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest_2_3/openjdk
+    print_java_version ${DAILY_TESTS_DIR}/builds/Icedtea7_forest/openjdk
+}
 
-cp cfg/repo_url_icedtea7_forest_2_4.txt cfg/repo_urls.txt
-./run.lua
-remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest_2_4/openjdk
+# Builds IcedTea7_2_4.
+function build_icedtea7_2_4()
+{
+    cp cfg/repo_url_icedtea7_forest_2_4.txt cfg/repo_urls.txt
+    # This script should report all failures etc.
+    ./run.lua
+    remove_other_dirs ${DAILY_TESTS_DIR}/builds/Icedtea7_forest_2_4/openjdk
+    print_java_version ${DAILY_TESTS_DIR}/builds/Icedtea7_forest/openjdk
+}
 
+# Builds all required IcedTea7.
+function build_all()
+{
+    build_icedtea7_forest
+    build_icedtea7_2_3
+    build_icedtea7_2_4
+}
+
+build_all
+
--- a/tck7/clean_all.sh	Thu Apr 17 10:00:43 2014 +0200
+++ b/tck7/clean_all.sh	Thu Apr 17 17:12:39 2014 +0200
@@ -41,7 +41,11 @@
 # Author: Pavel Tisnovsky
 # e-mail: ptisnovs@redhat.com
 
-JCK_DIR=`cat jck.dir`
+JCK_ROOT_DIR=`cat jck.dir`
+JCK_VERSION=7
+JCK_DIR=${JCK_ROOT_DIR}/${JCK_VERSION}
+WORK_DIR=${JCK_ROOT_DIR}/work
+RESULT_DIR=${JCK_ROOT_DIR}/results
 DAILY_TESTS_DIR=`cat dailytests.dir`
 
 echo "Cleaning builds"
@@ -55,12 +59,15 @@
 echo "Cleaning jtr"
 rm -rf  ${DAILY_TESTS_DIR}/jtr/20*
 
-echo "Cleaning ${JCK_DIR}/log/"
-rm -rf ${JCK_DIR}/log/*
-echo "Cleaning ${JCK_DIR}/logs/"
-rm -rf ${JCK_DIR}/logs/*
-echo "Cleaning ${JCK_DIR}/work/"
-rm -rf ${JCK_DIR}/work/*
-echo "Cleaning ${JCK_DIR}/results/"
-rm -rf ${JCK_DIR}/results/*
+echo "Cleaning ${JCK_ROOT_DIR}/log/"
+rm -rf ${JCK_ROOT_DIR}/log/*
+
+echo "Cleaning ${JCK_ROOT_DIR}/logs/"
+rm -rf ${JCK_ROOT_DIR}/logs/*
 
+echo "Cleaning ${WORK_DIR}"
+rm -rf ${WORK_DIR}/*
+
+echo "Cleaning ${RESULT_DIR}/"
+rm -rf ${RESULT_DIR}/*
+