Skip to content

Commit

Permalink
MONDRIAN: Oops, forgot a file.
Browse files Browse the repository at this point in the history
    megatest now tests retroweaver on JDK 1.5 and 1.6 as well as 1.4.

[git-p4: depot-paths = "//open/mondrian/": change = 10007]
  • Loading branch information
julianhyde committed Oct 12, 2007
1 parent 5a49a36 commit a243646
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 17 deletions.
68 changes: 51 additions & 17 deletions bin/megatest
Expand Up @@ -56,6 +56,12 @@ doTest2() {
shift
fi

retroweave=
if [ "$1" = --retroweave ]; then
retroweave=true
shift
fi

jdk=$1
database=$2

Expand All @@ -70,7 +76,8 @@ doTest2() {

JAVA_HOME=$(chooseJavaHome $jdk)

# Use a version of ant (and in particular junit) compatible with JDK1.4.
# Use a version of ant (and in particular junit) compatible with the JDK.
# Some versions of ant don't work on JDK1.4.
export ANT_HOME=$(chooseAntHome $jdk)

rm -f megatest.properties
Expand Down Expand Up @@ -146,33 +153,44 @@ doTest2() {
cat megatest.properties >> build.properties
cat megatest.properties >> mondrian.properties

case $jdk in
jdk1.4) retroweave=true ;;
esac

echo
echo "========================================"
date
echo "Running test with JDK=$jdk database=$database props={$props}"
echo "Running test with JDK=$jdk retroweave=$retroweave database=$database props={$props}"
if [ "$build" ]; then
echo build=${build}
if [ "$retroweave" ]; then
case $jdk in
jdk1.4)
# Cannot build or retroweave under 1.4, so switch JDK briefly
(
export JAVA_HOME=$(chooseJavaHome jdk1.5)
export PATH="$JAVA_HOME/bin:$PATH"
export ANT_HOME=$(chooseAntHome jdk1.5)
$ANT_HOME/bin/ant $ANT_FLAGS clean all retroweave
)
$ANT_HOME/bin/ant $ANT_FLAGS test-nobuild
export JAVA_HOME=$(chooseJavaHome jdk1.4)
export PATH=$JAVA_HOME/bin:$PATH
;;
jdk1.5|jdk1.6)
*)
$ANT_HOME/bin/ant $ANT_FLAGS clean all retroweave
;;
esac
$ANT_HOME/bin/ant $ANT_FLAGS -Dmondrian.retroweave=true test-nobuild
else
export ANT_HOME=$(chooseAntHome $jdk)
case $database in
derby|access)
$ANT_HOME/bin/ant $ANT_FLAGS ;
$ANT_HOME/bin/ant $ANT_FLAGS clean all test
$ANT_HOME/bin/ant $ANT_FLAGS clean compile compile.tests unzip-databases test-nobuild
;;
*) $ANT_HOME/bin/ant $ANT_FLAGS clean compile test ;;
*) $ANT_HOME/bin/ant $ANT_FLAGS clean compile compile.tests test-nobuild ;;
esac
;;
esac
fi
fi

if [ "$olap4j" ]; then
Expand Down Expand Up @@ -220,22 +238,22 @@ chooseJavaHome() {
case $(uname -n) in
branston|mackerel)
case $jdk in
jdk1.5) export JAVA_HOME=/e/jdk1.5.0_08 ;;
jdk1.6) export JAVA_HOME=/c/jdk1.6.0_01 ;;
jdk1.5) echo /e/jdk1.5.0_08 ;;
jdk1.6) echo /c/jdk1.6.0_01 ;;
*) echo "Unknown java version $jdk"; exit 1 ;;
esac;;
mackerel-winxp)
case $jdk in
jdk1.4) export JAVA_HOME=/c/jdk1.4.2_15 ;;
jdk1.5) export JAVA_HOME=/c/jdk1.5.0_12 ;;
jdk1.6) export JAVA_HOME=/c/jdk1.6.0_02 ;;
jdk1.4) echo /c/jdk1.4.2_15 ;;
jdk1.5) echo /c/jdk1.5.0_12 ;;
jdk1.6) echo /c/jdk1.6.0_02 ;;
*) echo "Unknown java version $jdk"; exit 1 ;;
esac;;
*)
case $jdk in
jdk1.4) export JAVA_HOME=/usr/local/j2sdk1.4.2_13 ;;
jdk1.5) export JAVA_HOME=/usr/local/jdk1.5.0_12 ;;
jdk1.6) export JAVA_HOME=/usr/local/jdk1.6.0_01 ;;
jdk1.4) echo /usr/local/j2sdk1.4.2_13 ;;
jdk1.5) echo /usr/local/jdk1.5.0_12 ;;
jdk1.6) echo /usr/local/jdk1.6.0_01 ;;
*) echo "Unknown java version $jdk"; exit 1 ;;
esac;;
esac
Expand Down Expand Up @@ -299,6 +317,10 @@ doExoticTests()
# Test case-insensitive
doTest jdk1.5 oracle mondrian.olap.case.sensitive=false

# Retroweave against jdk1.5 and jdk1.6
doTest --retroweave jdk1.5 oracle
doTest --retroweave jdk1.6 oracle

# Configurations which have surfaced bugs
echo "This test caused a bug"
doTest jdk1.6 mysql \
Expand Down Expand Up @@ -385,7 +407,19 @@ maybe()
doRandom()
{
args=
args="$args $(chooseOne jdk1.4 jdk1.5 jdk1.6)"
jdk="$(chooseOne jdk1.4 jdk1.5 jdk1.6)"
args="$args $jdk"

# 20% of the time, run jdk1.5 and jdk1.6 against retrowoven code. jdk1.4
# is always retrowoven.
case $jdk in
jdk1.5|jdk1.6)
if [ "$(maybe 0.8 --retroweave)" ]; then
args="--retroweave $args"
fi
;;
esac

args="$args $(chooseOne ${databaseList})"

# Run JVM in server mode
Expand Down
6 changes: 6 additions & 0 deletions src/main/mondrian/olap/Mondrian.xml
Expand Up @@ -1701,6 +1701,12 @@ Revision is $Id$
the <code>HierarchyGrant.access</code> is "custom". If not
specified, role can see members down to the leaf level.</Doc>
</Attribute>
<Attribute name="rollupPolicy" required="false">
<Doc>Policy which determines how cell values are calculated if
not all of the children of the current cell are visible to
the current role. Allowable values are 'full' (the default),
'partial', and 'hidden'.</Doc>
</Attribute>
<Array name="memberGrants" type="MemberGrant"/>
</Element>

Expand Down

0 comments on commit a243646

Please sign in to comment.