author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 19 Apr 2013 13:50:19 +0200 | |
branch | development |
changeset 2532 | 64a784c73d1e |
parent 2429 | ebece4dcaab9 |
child 2578 | fc6186a4961f |
permissions | -rw-r--r-- |
749 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
3 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
5 |
|
749 | 6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
19 |
as of 1.9.2010 |
749 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
TestResource subclass:#JavaLookupTestsResource |
|
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
27 |
category:'Languages-Java-Tests-Interop' |
749 | 28 |
! |
29 |
||
30 |
JavaLookupTestsResource class instanceVariableNames:'projectDir projectBuilded' |
|
31 |
||
32 |
" |
|
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
33 |
No other class instance variables are inherited by this class. |
749 | 34 |
" |
35 |
! |
|
36 |
||
37 |
!JavaLookupTestsResource class methodsFor:'documentation'! |
|
38 |
||
39 |
copyright |
|
40 |
" |
|
41 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
42 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
43 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
44 |
|
749 | 45 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
46 |
SWING Research Group, Czech Technical University in Prague |
|
47 |
||
48 |
This software is furnished under a license and may be used |
|
49 |
only in accordance with the terms of that license and with the |
|
50 |
inclusion of the above copyright notice. This software may not |
|
51 |
be provided or otherwise made available to, or used by, any |
|
52 |
other person. No title to or ownership of the software is |
|
53 |
hereby transferred. |
|
54 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
55 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
56 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
57 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
58 |
as of 1.9.2010 |
749 | 59 |
|
60 |
" |
|
61 |
! ! |
|
62 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
63 |
|
749 | 64 |
!JavaLookupTestsResource class methodsFor:'initialization'! |
65 |
||
66 |
initialize |
|
67 |
"Invoked at system start or when the class is dynamically loaded." |
|
68 |
||
69 |
"/ please change as required (and remove this comment) |
|
70 |
||
71 |
projectDir := |
|
72 |
(Smalltalk packageDirectoryForPackageId: 'stx:libjava') asFilename |
|
73 |
/ 'java' / 'libjava-projects/MethodLookupTests' . |
|
74 |
||
75 |
projectBuilded := false. |
|
76 |
||
77 |
"Modified: / 16-03-2011 / 14:33:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
78 |
"Modified: / 11-04-2011 / 19:30:29 / kursjan <kursjan@fit.cvut.cz>" |
|
79 |
! ! |
|
80 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
81 |
|
749 | 82 |
!JavaLookupTestsResource class methodsFor:'accessing'! |
83 |
||
84 |
projectBuilded:aBoolean |
|
85 |
||
86 |
" |
|
87 |
JavaTestsResource projectBuilded: true. |
|
88 |
JavaTestsResource projectBuilded: false. |
|
89 |
" |
|
90 |
||
91 |
projectBuilded := aBoolean. |
|
92 |
||
93 |
"Modified: / 16-03-2011 / 15:20:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
94 |
! |
|
95 |
||
96 |
projectDir |
|
97 |
^ projectDir |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
98 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
99 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
100 |
resources |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
101 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
102 |
^ { JavaInitializedResource } |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
103 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
104 |
"Created: / 01-01-2012 / 17:24:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
749 | 105 |
! ! |
106 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
107 |
|
749 | 108 |
!JavaLookupTestsResource class methodsFor:'running'! |
109 |
||
110 |
buildProject |
|
111 |
||
112 |
" |
|
113 |
JavaTestsResource projectBuilded: true. |
|
114 |
JavaTestsResource projectBuilded: false. |
|
115 |
" |
|
116 |
||
117 |
||
118 |
projectBuilded == true ifFalse:[ |
|
119 |
"Check for ant" |
|
120 |
self assert: (OperatingSystem canExecuteCommand:'ant') |
|
121 |
description: 'Cannot execute ant'. |
|
122 |
||
123 |
self assert: (self projectDir / 'build.xml') exists |
|
124 |
description: 'No build.xml in ' , self projectDir asString. |
|
125 |
||
126 |
||
127 |
"Launch ant" |
|
128 |
Transcript show:'Running ant in '; showCR: self projectDir asString. |
|
129 |
OperatingSystem |
|
130 |
executeCommand:'ant -f build.xml' |
|
131 |
inputFrom:nil |
|
132 |
outputTo:Stdout |
|
133 |
errorTo:Stderr |
|
134 |
inDirectory: self projectDir |
|
135 |
onError: |
|
136 |
[:status | |
|
137 |
Transcript showCR:'ANT FAILED!!!!!!'. |
|
138 |
self error:'ant failed'. |
|
139 |
^self]. |
|
140 |
||
141 |
Transcript show:'Ant finished']. |
|
142 |
^ projectBuilded |
|
143 |
||
144 |
"Modified: / 16-03-2011 / 15:20:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
145 |
! ! |
|
146 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
147 |
|
749 | 148 |
!JavaLookupTestsResource methodsFor:'running'! |
149 |
||
150 |
setUp |
|
151 |
self class buildProject. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
152 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
153 |
"/ Java flushAllJavaResources. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
154 |
"/ Java initialize. "Initialize classPath and other stuff" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
155 |
"/ JavaVM initializeVM. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
156 |
|
749 | 157 |
Java addToClassPath: (self class projectDir / 'bin') asString. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
158 |
JavaLookup cleanup. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
159 |
"/ JavaObject lookupObject: JavaLookup instance. |
749 | 160 |
|
161 |
"Created: / 06-03-2011 / 14:50:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
162 |
"Modified: / 16-03-2011 / 14:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
163 |
"Modified: / 11-04-2011 / 20:15:15 / kursjan <kursjan@fit.cvut.cz>" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
164 |
"Modified: / 05-09-2011 / 20:15:27 / Jan Kurs <kursjan@fit.cvut.cz>" |
749 | 165 |
! |
166 |
||
167 |
tearDown |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
168 |
"/ JavaObject lookupObject: nil |
749 | 169 |
|
170 |
"Modified: / 16-03-2011 / 14:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
171 |
"Created: / 11-04-2011 / 20:15:28 / kursjan <kursjan@fit.cvut.cz>" |
|
172 |
! ! |
|
173 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
174 |
|
749 | 175 |
!JavaLookupTestsResource class methodsFor:'documentation'! |
176 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
177 |
version_CVS |
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
178 |
^ '$Header: /cvs/stx/stx/libjava/JavaLookupTestsResource.st,v 1.5 2013-02-25 11:15:31 vrany Exp $' |
2288
5af9886de3b4
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2223
diff
changeset
|
179 |
! |
5af9886de3b4
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2223
diff
changeset
|
180 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
181 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
182 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
183 |
^ '$Changeset: <not expanded> $' |
2223 | 184 |
! |
185 |
||
749 | 186 |
version_SVN |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
187 |
^ '§Id§' |
749 | 188 |
! ! |
189 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2288
diff
changeset
|
190 |
|
2152 | 191 |
JavaLookupTestsResource initialize! |