0
|
1 |
"/
|
87
|
2 |
"/ runs a number of tests from the exept:regression package (see list below)
|
0
|
3 |
"/ execute this script using the following command line:
|
|
4 |
"/
|
8
|
5 |
"/ stx --noBanner -I --execute SelfTest.st
|
87
|
6 |
"/ use --debug to debug failed test cases.
|
0
|
7 |
"/
|
47
|
8 |
"/ to use with jenkins (+ jUnit plugin):
|
8
|
9 |
"/ use the following buildscript (in jenkins):
|
3
|
10 |
"/ (after checkout of stx)
|
|
11 |
"/ cd stx
|
|
12 |
"/ call bmake
|
|
13 |
"/ cd goodies\selftest
|
|
14 |
"/ ..\..\projects\smalltalk\stx.com --noBanner -I --execute SelfTest.st
|
|
15 |
"/
|
33
|
16 |
"/ and configure the jenkins junit plugin, to scan for "testresult.xml"
|
3
|
17 |
|
34
|
18 |
"/ tell the system, where stx is...
|
|
19 |
ParserFlags initializeSTCFlagsForTopDirectory:'../../..'.
|
|
20 |
|
0
|
21 |
Object infoPrinting:false.
|
|
22 |
ObjectMemory infoPrinting:false.
|
|
23 |
Processor activeProcess exceptionHandlerSet
|
|
24 |
on:(Class updateChangeFileQuerySignal)
|
|
25 |
do:[:ex | ex proceedWith:false ].
|
|
26 |
!
|
|
27 |
|
9
|
28 |
Stdout showCR:'Selftest Started'.
|
0
|
29 |
!
|
|
30 |
|
9
|
31 |
Stdout showCR:'Loading sunit...'.
|
0
|
32 |
Smalltalk loadPackage:'stx:goodies/sunit'.
|
26
|
33 |
self assert:(TestCase notNil and:[TestCase isLoaded]).
|
0
|
34 |
|
22
|
35 |
"/ Smalltalk loadPackage:'stx:goodies/xml/vw'.
|
|
36 |
"/ Smalltalk loadPackage:'stx:goodies/xml/stx'.
|
87
|
37 |
Smalltalk loadPackage:'stx:libcompat'.
|
47
|
38 |
Smalltalk loadPackage:'stx:libjavascript'.
|
10
|
39 |
!
|
|
40 |
|
27
|
41 |
|suite result|
|
0
|
42 |
|
15
|
43 |
Stdout showCR:'Creating suite...'.
|
4
|
44 |
suite := TestSuite named:'SelfTest'.
|
23
|
45 |
|
|
46 |
Stdout showCR:'Loading regression tests...'.
|
|
47 |
#(
|
96
|
48 |
"/ 'SunitXMLOutputTest'
|
43
|
49 |
'CoverageInstrumentationTest'
|
23
|
50 |
'AssociationTests'
|
38
|
51 |
'BinaryIOTests'
|
23
|
52 |
'BinaryTreeTester'
|
|
53 |
"/ 'BlockTest'
|
|
54 |
'CharacterTests'
|
|
55 |
'CollectionTests'
|
42
|
56 |
'CompilerTest'
|
23
|
57 |
'ComplexTest'
|
49
|
58 |
'STCCompilerTests'
|
23
|
59 |
"/ 'DebuggerTest'
|
|
60 |
"/ 'DeepCopyTests'
|
42
|
61 |
'DelayTest'
|
|
62 |
'DictionaryTest'
|
50
|
63 |
'EnumerationTests'
|
42
|
64 |
'ExceptionTest'
|
23
|
65 |
"/ 'ExternalInterfaceTests'
|
|
66 |
"/ 'FileOpenTest'
|
42
|
67 |
'FileStreamTest'
|
|
68 |
'FloatTest'
|
|
69 |
'FractionTest'
|
23
|
70 |
"/ 'GCTest'
|
|
71 |
"/ 'GraphicDrawingTest'
|
|
72 |
"/ 'HTMLParserTests'
|
|
73 |
"/ 'ImageReaderTest'
|
42
|
74 |
'IntegerTest'
|
|
75 |
'JavaScriptTests'
|
23
|
76 |
"/ 'MeasurementValueTests'
|
|
77 |
"/ 'MemoryTest'
|
|
78 |
'NumberTest'
|
|
79 |
"/ 'ParserTest'
|
42
|
80 |
'ScaledDecimalTest'
|
23
|
81 |
"/ 'SemaphoreTest'
|
|
82 |
"/ 'SharedQueueTest'
|
|
83 |
'SmallIntegerTest'
|
|
84 |
"/ 'SortTests'
|
93
|
85 |
'StringTests'
|
48
|
86 |
'StreamTests'
|
44
|
87 |
'TimeAndDateTest'
|
|
88 |
'TimeDurationTest'
|
23
|
89 |
"/ 'URLTest'
|
|
90 |
"/ 'XMLCoderTests'
|
|
91 |
"/ 'ZipArchiveTests'
|
|
92 |
) do:[:className |
|
|
93 |
|fullName|
|
|
94 |
|
|
95 |
fullName := ('RegressionTests::',className).
|
|
96 |
Stdout showCR:('Loading ',className,'...').
|
|
97 |
Smalltalk fileInClass:fullName package:'exept:regression'.
|
95
|
98 |
(Smalltalk classNamed:fullName) isNil ifTrue:[
|
|
99 |
Stdout showCR:('**** Ouch - missing class: "',fullName,'"').
|
|
100 |
] ifFalse:[
|
|
101 |
suite addTest:(Smalltalk classNamed:fullName) suite.
|
|
102 |
]
|
23
|
103 |
].
|
4
|
104 |
|
15
|
105 |
Stdout showCR:'Running suite...'.
|
8
|
106 |
result := suite
|
94
|
107 |
run:TestResultStX new beforeEachDo:[:test |
|
15
|
108 |
Stdout showCR:('- running ',test printString).
|
87
|
109 |
]
|
|
110 |
afterEachDo:[:test| ]
|
|
111 |
debug:(Smalltalk commandLineArgumentNamed:'--debug') notNil.
|
23
|
112 |
|
38
|
113 |
Stdout showCR:'Generating report...'.
|
8
|
114 |
TestResultReporter
|
|
115 |
report:result
|
29
|
116 |
format:#xml_jUnit
|
8
|
117 |
as:'testresult.xml'.
|
38
|
118 |
|
|
119 |
Stdout showCR:'Summary:'.
|
|
120 |
Stdout showCR:(' %1 tests;' bindWith:result runCount).
|
|
121 |
Stdout show:(' %1 passed,' bindWith:result passedCount).
|
|
122 |
Stdout show:(' %1 failed,' bindWith:result failureCount).
|
|
123 |
Stdout showCR:(' %1 errors.' bindWith:result errorCount).
|
0
|
124 |
!
|