Skip to content

Commit

Permalink
Move test parameters out of source code and into a file. 'test.proper…
Browse files Browse the repository at this point in the history
…ties' should be the only file you need to edit. Provided 'test.properties.example'. First cut README.txt.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@42 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Nov 21, 2007
1 parent 6909980 commit ba29a42
Show file tree
Hide file tree
Showing 12 changed files with 438 additions and 309 deletions.
42 changes: 42 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Contents of this distribution
-----------------------------

This is a binary distribution of olap4j.
For version information, see VERSION.txt.
For licensing, see LICENSE.html.

It contains the following external libraries:

lib/asm-2.2.3.jar Part of retroweaver.
lib/asm-commons-2.2.3.jar Part of retroweaver.
lib/javacup.jar Javacup 0.10k
lib/log4j-1.2.9.jar
lib/mondrian-2.1.1.jar From mondrian project, change xxxx. (Not an
official release of mondrian.)
lib/pdfdoclet-1.0.2-all.jar PDF doclet is a utility to generate javadoc
in Adobe Acrobat format.
lib/retroweaver-1.2.4.jar Retroweaver 1.2.4, compile-time library
lib/retroweaver-rt-1.2.4.jar Retroweaver 1.2.4, runtime library
lib/spring.jar Spring. Used for code samples only
testlib/junit.jar Junit. Used for test
testlib/servlet.jar Servlet. Used for code samples only

mondrian.jar


Running the test suite
----------------------

To run the test suite:

1. create a test.properties file describing your environment. The easiest way
to this is to copy test.properties.example and customize it.
2. execute 'ant test'

JDK 1.4
-------

This distribution does not include JDK 1.4-compatible binaries. To create them,
run 'ant retroweave'.

End README.txt
17 changes: 16 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
retroweaver.dir=E:/retroweaver-1.2.4
# $Id: DefaultMdxParser.cup 40 2007-11-18 01:13:26Z jhyde $
# This software is subject to the terms of the Common Public License
# Agreement, available at the following URL:
# http://www.opensource.org/licenses/cpl.html.
# Copyright (C) 2007-2007 Julian Hyde and others.
# All Rights Reserved.
# You must accept the terms of that agreement to use this software.
#
# Modify this file to override build settings. It is read by ant's build.xml.
# See also 'test.properties', which contains settings for the regression
# suite.
#

# retroweaver.dir=E:/retroweaver-1.2.4

# End build.properties
12 changes: 9 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
<property name="dist.src.file" value="${dist.dir}/${dist.name}-src.zip" />
<property name="dist.doc.file" value="${dist.dir}/doc.tar.gz" />

<property name="generated.java.files" value="
${src.dir}/org/olap4j/mdx/parser/impl/DefaultMdxParser.java,
${src.dir}/org/olap4j/mdx/parser/impl/DefaultMdxParserSym.java"/>

<property name="generated.lib.files" value="
${jar.file},
${jar-jdk14.file}"/>

<path id="project.classpath">
<pathelement location="${classes.dir}"/>
<!-- <pathelement location="${lib.dir}/retroweaver-1.2.4.jar"/> -->
Expand Down Expand Up @@ -73,9 +81,6 @@
<pathelement location="${testclasses.dir}"/>
</path>

<!-- verify that required dependencies are defined -->
<fail unless="retroweaver.dir" />

<!-- Arguments to the java process spawned by the junit task. -->
<property name="junit.jvmargs" value="-ea -esa"/>

Expand All @@ -96,6 +101,7 @@
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${classes.dir}" includes="**/*.class,**/*.properties"/>
<fileset dir="${testclasses.dir}" includes="**/*.class,**/*.properties"/>
<fileset dir="." includes="${generated.java.files},${generated.lib.files},VERSION.txt"/>
<fileset dir="${build.dir}" />
</delete>
</target>
Expand Down
1 change: 0 additions & 1 deletion src/org/olap4j/mdx/parser/impl/DefaultMdxParser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,6 @@ axis_specification ::=
// Legal axis ordinals run from 0 (COLUMS) to 4 (SECTIONS),
// inclusive.
if (index < 0 || index != d || index > Axis.MAX_ORDINAL) {
System.out.println("nleft=" + nleft + ", nright=" + nright);
throw new MdxParseException(
createRegion(nleft, nright),
"Invalid axis specification. The axis number must be an integer between 0 and " +
Expand Down
25 changes: 25 additions & 0 deletions test.properties.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# $Id$
# This software is subject to the terms of the Common Public License
# Agreement, available at the following URL:
# http://www.opensource.org/licenses/cpl.html.
# Copyright (C) 2007-2007 Julian Hyde and others.
# All Rights Reserved.
# You must accept the terms of that agreement to use this software.
#
# Sample "test.properties" file. Rename to "test.properties" and modify
# for your environment.

# Connect string olap4j test suite should use to connect to the foodmart
# database. Examples are shown for mondrian connecting to Apache Derby on
# Linux, Oracle on Linux, and Microsoft Access on Windows. Must be specified;
# there is no default.
#org.olap4j.test.connectUrl=jdbc:mondrian:Jdbc='jdbc:derby:/home/jvs/open/mondrian/demo/derby/foodmart';JdbcUser=sa;JdbcPassword=sa;Catalog='file:///home/jvs/open/mondrian/demo/FoodMart.xml';JdbcDrivers=org.apache.derby.jdbc.EmbeddedDriver;
#org.olap4j.test.connectUrl=jdbc:mondrian:Jdbc=jdbc:oracle:thin:foodmart/foodmart@//marmalade.hydromatic.net:1521/XE;JdbcUser=foodmart;JdbcPassword=foodmart;Catalog=../mondrian/demo/FoodMart.xml;JdbcDrivers=oracle.jdbc.OracleDriver;
#org.olap4j.test.connectUrl=jdbc:mondrian:Jdbc='jdbc:odbc:MondrianFoodMart';Catalog='file://c:/open/mondrian/demo/FoodMart.xml';JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver;

# Name of class which targets the olap4j test suite to a particular driver
# implementation. Must implement org.olap4j.test.TestContext.Tester interface.
# Default is "org.olap4j.MondrianTester".
org.olap4j.test.helperClassName=org.olap4j.MondrianTester

# End test.properties.example
Loading

0 comments on commit ba29a42

Please sign in to comment.