Skip to content

Commit 6a8cfbf

Browse files
committed
moving files to a subdirectory 'trunk'
1 parent b921810 commit 6a8cfbf

File tree

70 files changed

+9121
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+9121
-0
lines changed

README.txt

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
GETTING SETUP
2+
3+
This document and the OpenEJB TCK setup can be checked out from here:
4+
5+
svn co https://svn.apache.org/repos/tck/openejb-tck
6+
7+
The Java EE 6 TCK and RI can be downloaded from here:
8+
9+
svn export https://svn.apache.org/repos/tck/sun-tcks/javaee/6/javaeetck-6.0_25-Oct-2010.zip
10+
svn export https://svn.apache.org/repos/tck/sun-tcks/javaee/6/javaee6_ri-3.0.1-b22.zip
11+
12+
Both are required to run the TCK. The TCK is 813M, beware.
13+
14+
Once unpacked, they can be "hooked" up via the maven settings.xml
15+
file like so:
16+
17+
<settings>
18+
<profiles>
19+
<profile>
20+
<id>javaee-tck-environment</id>
21+
22+
<activation>
23+
<activeByDefault>true</activeByDefault>
24+
</activation>
25+
26+
<properties>
27+
<javaee6.cts.home>/Users/dblevins/work/javaeetck</javaee6.cts.home>
28+
<javaee6.ri.home>/Users/dblevins/work/javaeetck/glassfishv3</javaee6.ri.home>
29+
</properties>
30+
</profile>
31+
</profiles>
32+
</settings>
33+
34+
The TCK will unzip into a directory called 'javaeetck/'. The RI will
35+
unzip into a directory called 'glassfishv3'. As you can see above
36+
we've unzipped the RI inside the javaeetck directory just to keep
37+
things tidy. This is not required for the TCK to function properly.
38+
39+
TEST RUN
40+
41+
From inside the openejb-tck directory, a command like this will get
42+
you a little taste of running the TCK:
43+
44+
./runtests com.sun.ts.tests.ejb30.bb.localaccess.statelessclient
45+
46+
We don't yet pass all of the TCK, but the above tests should be among
47+
the passing sections and are a good way to validate all is setup
48+
properly.
49+
50+
TOMCAT
51+
52+
By default the `runtests` command will execute the tests against an
53+
OpenEJB standalone server.
54+
55+
To run in Tomcat, a command like the following will work:
56+
57+
./runtests --tomcat-version 6.0.32 com.sun.ts.tests.ejb30.bb.localaccess.statelessclient
58+
59+
Any Tomcat version can be specfified and it will be downloaded prior
60+
to running the tck. The are stored in the $HOME/.m2/repository, but
61+
with the group id org.apache.openejb.tck as to discourage accidental
62+
dependence in other projects.
63+
64+
TOMEE
65+
66+
To run in Tomee, specify the webcontainer is "tomee".
67+
68+
./runtests --web tomee com.sun.ts.tests.ejb30.bb.localaccess.statelessclient
69+
70+
MISC
71+
72+
The target directory is not cleaned out at the beginning of a test
73+
run. There are a few thousand tests and sometimes multiple
74+
executions are required to get complete results. It's also nice to
75+
be able to look back on older log files when tracking down and fixing
76+
bugs that the tests uncover.
77+
78+
Bottom line is you have to clear out the target directory manually.
79+
On occasion some bad state will get into the server install in the
80+
target/ directory. If you start getting weirld maven or groovy
81+
errors, clean out the target dir and try again.
82+
83+
TAB COMPLETION
84+
85+
There is a nice little script in the root directory called
86+
runtests.completer which, when sourced, can give be a great
87+
time-saver when trying to navigate to run a specific test.
88+
89+
In bash just source the file like so:
90+
91+
source runtests.completer
92+
93+
LOGS
94+
95+
The TCK for the most part runs as a client in a separate vm. The
96+
test results are sent to this vm and then logged here:
97+
98+
target/logs/javatest.log
99+
100+
When looking at exceptions in that log file often come from the
101+
remote deployer tool -- the same tool we use on the command line for
102+
deployment. Most of the deployment related exceptions were generated
103+
on the server and sent to the client and that's why the show up in
104+
that log.
105+
106+
The server logs are in the usual place:
107+
108+
target/openejb-3.2-SNAPSHOT/logs/openejb.log
109+
target/apache-tomcat-6.0.32/logs/openejb.log
110+

Sections.class

1.95 KB
Binary file not shown.

Sections.java

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
import java.io.IOException;
3+
import java.io.File;
4+
import java.io.FileReader;
5+
import java.io.BufferedReader;
6+
import java.util.List;
7+
import java.util.ArrayList;
8+
9+
/**
10+
* @version $Rev$ $Date$
11+
*/
12+
public class Sections {
13+
public static void main(String[] args) throws Exception {
14+
if (args.length != 2){
15+
System.err.println("args: <current> <sectionsFile>");
16+
}
17+
18+
complete(args[0], args[1]);
19+
}
20+
21+
public static void complete(String cur, String sectionsFile) throws IOException {
22+
List<String> options = new ArrayList();
23+
String[] parts = cur.split("\\.");
24+
25+
File file = new File(sectionsFile);
26+
27+
FileReader fileReader = new FileReader(file);
28+
BufferedReader in = new BufferedReader(fileReader);
29+
30+
String section = in.readLine();
31+
32+
boolean moreOptions = false;
33+
34+
while (section != null){
35+
try {
36+
if (!section.startsWith(cur)) continue;
37+
38+
String[] p = section.split("\\.");
39+
40+
int pos = parts.length + 1;
41+
42+
if (!cur.endsWith(".")){
43+
pos--;
44+
}
45+
46+
String packge = "";
47+
for (int i = 0; i < p.length && i < pos; i++) {
48+
String s = p[i];
49+
packge += s;
50+
if (!section.equals(packge)){
51+
packge += ".";
52+
}
53+
}
54+
55+
if (!section.equals(packge)){
56+
moreOptions = true;
57+
}
58+
59+
if (!options.contains(packge)) options.add(packge);
60+
} finally {
61+
section = in.readLine();
62+
}
63+
}
64+
65+
if (moreOptions && options.size() > 0){
66+
options.add(options.get(options.size()-1)+"...");
67+
}
68+
for (String s : options) {
69+
System.out.println(s);
70+
}
71+
}
72+
73+
}

download.xml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
-->
19+
<!-- $Revision: 579817 $ $Date: 2007-09-26 14:56:30 -0700 (Wed, 26 Sep 2007) $ -->
20+
21+
<project name="Test OpenEJB" default="download" basedir=".">
22+
23+
<property name="maven.repo" value="${user.home}/.m2/repository"/>
24+
<property name="tomcat.version" value="6.0.32"/>
25+
26+
<target name="download">
27+
28+
<condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-7/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip">
29+
<matches pattern="^7\." string="${tomcat.version}"/>
30+
</condition>
31+
<condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-6/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip">
32+
<matches pattern="^6\." string="${tomcat.version}"/>
33+
</condition>
34+
<condition property="tomcat.url" value="http://archive.apache.org/dist/tomcat/tomcat-5/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.zip">
35+
<matches pattern="^5\.5" string="${tomcat.version}"/>
36+
</condition>
37+
38+
<fail message="Unknown Tomcat version ${tomcat.version}" unless="tomcat.url"/>
39+
40+
<property name="tomcat.file" value="${maven.repo}/org/apache/openejb/tck/tomcat/${tomcat.version}/tomcat-${tomcat.version}.zip"/>
41+
42+
<antcall target="download.file">
43+
<param name="download.url" value="${tomcat.url}"/>
44+
<param name="download.file" value="${tomcat.file}"/>
45+
</antcall>
46+
</target>
47+
48+
<target name="download.uptodate">
49+
<available file="${download.file}" property="download.uptodate"/>
50+
</target>
51+
52+
<target name="download.file" depends="download.uptodate" unless="download.uptodate">
53+
<dirname property="download.dir" file="${download.file}"/>
54+
<mkdir dir="${download.dir}"/>
55+
<get src="${download.url}" dest="${download.file}"/>
56+
</target>
57+
</project>

0 commit comments

Comments
 (0)