Merge jv
authorMerge Script
Thu, 24 Mar 2016 07:06:09 +0100
branchjv
changeset 3139c15d2d4d8e2
parent 303 e217bb7aacf4 (current diff)
parent 312 2cc5a7dc36b6 (diff)
child 315 bba470ae763f
Merge
     1.1 --- a/.hgtags	Tue Mar 15 14:36:37 2016 +0000
     1.2 +++ b/.hgtags	Thu Mar 24 07:06:09 2016 +0100
     1.3 @@ -16,6 +16,7 @@
     1.4  678217bcd5d84be8c9f292ec6ee637cecee7a075 expecco_2_1_0
     1.5  7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0
     1.6  7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0a
     1.7 +7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0b
     1.8  7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_5
     1.9  7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_6
    1.10  7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_7
     2.1 --- a/quickSelfTest/SelfTest.st	Tue Mar 15 14:36:37 2016 +0000
     2.2 +++ b/quickSelfTest/SelfTest.st	Thu Mar 24 07:06:09 2016 +0100
     2.3 @@ -3,9 +3,13 @@
     2.4  "/ execute this script using the following command line:
     2.5  "/
     2.6  "/ stx --noBanner -I --execute SelfTest.st
     2.7 -"/   use --debug to debug failed test cases.
     2.8  "/
     2.9 -"/ to use with jenkins (+ jUnit plugin):
    2.10 +"/   use
    2.11 +"/      --debug to debug failed test cases.
    2.12 +"/      --skipTests to skip tests
    2.13 +"/      --skipMetrics to metric reports tests
    2.14 +"/
    2.15 +"/ To use with jenkins (+ jUnit plugin):
    2.16  "/ use the following buildscript (in jenkins):
    2.17  "/ (after checkout of stx)
    2.18  "/      cd stx
    2.19 @@ -14,12 +18,15 @@
    2.20  "/      ..\..\projects\smalltalk\stx.com --noBanner -I --execute SelfTest.st
    2.21  "/
    2.22  "/ and configure the jenkins junit plugin, to scan for "testresult.xml"
    2.23 +"/ ------------------------------------------------------------------------------------
    2.24  
    2.25  "/ tell the system, where stx is...
    2.26  ParserFlags initializeSTCFlagsForTopDirectory:'../../..'.
    2.27  
    2.28  Object infoPrinting:false.
    2.29  ObjectMemory infoPrinting:false.
    2.30 +
    2.31 +"/ install a global handler, which suppresses the updating of the change file
    2.32  Processor activeProcess exceptionHandlerSet
    2.33      on:(Class updateChangeFileQuerySignal)
    2.34      do:[:ex | ex proceedWith:false ].
    2.35 @@ -28,6 +35,9 @@
    2.36  Stdout showCR:'Selftest Started'.
    2.37  !
    2.38  
    2.39 +Smalltalk packagePath addFirst:'../../../..'.
    2.40 +
    2.41 +"/ ensure that some packages are present
    2.42  Stdout showCR:'Loading sunit...'.
    2.43  Smalltalk loadPackage:'stx:goodies/sunit'.
    2.44  self assert:(TestCase notNil and:[TestCase isLoaded]) message:'[Error]: Missing TestCase class after sunit package load'.
    2.45 @@ -46,18 +56,22 @@
    2.46  Stdout showCR:'Loading regression tests...'.
    2.47  
    2.48  "To add a new test please edit exept_regression>>testCaseNamesWithoutNamespace"
    2.49 -Smalltalk packagePath addFirst:'../../../..'.
    2.50  Smalltalk fileInClass:#'exept_regression' package:'exept:regression'.
    2.51  (Smalltalk at: #'exept_regression') isNil ifTrue:[
    2.52      Stdout showCR:('ERROR: Ouch - missing class: "exept_regression"').
    2.53      Smalltalk exit: 1.
    2.54  ].
    2.55 +
    2.56  (Smalltalk at: #'exept_regression') testCaseNamesWithoutNamespace do:[:className |
    2.57      |fullName|
    2.58  
    2.59      fullName := ('RegressionTests::',className).
    2.60 -    Stdout showCR:('Loading ',className,'...').
    2.61 -    Smalltalk fileInClass:fullName package:'exept:regression'.
    2.62 +    Stdout showCR:('  loading ',className,'...').
    2.63 +    Error handle:[:ex |
    2.64 +	Stdout showCR:('**** Ouch - error while loading class: "',className,'"').
    2.65 +    ] do:[
    2.66 +	Smalltalk fileInClass:fullName package:'exept:regression'.
    2.67 +    ].
    2.68      (Smalltalk classNamed:fullName) isNil ifTrue:[
    2.69  	Stdout showCR:('**** Ouch - missing class: "',fullName,'"').
    2.70      ] ifFalse:[
    2.71 @@ -65,53 +79,78 @@
    2.72      ]
    2.73  ].
    2.74  
    2.75 -Stdout showCR:'Running suite...'.
    2.76 -debugging := (Smalltalk commandLineArgumentNamed:'--debug') notNil.
    2.77 -result := suite
    2.78 -	    run:TestResultStX new beforeEachDo:[:test |
    2.79 -		Stdout showCR:('- running ',test printString).
    2.80 -	    ]
    2.81 -	    afterEachDo:[:test|
    2.82 -		Stdout showCR:('- done ',test printString).
    2.83 -	    ]
    2.84 -	    debug:debugging.
    2.85 +"/
    2.86 +"/ run the suite
    2.87 +"/
    2.88 +(Smalltalk commandLineArguments includes:'--skipTests') ifTrue:[
    2.89 +    Stdout showCR:'Skipping suite.'.
    2.90 +] ifFalse:[
    2.91 +    Stdout showCR:'Running suite...'.
    2.92 +    debugging := (Smalltalk commandLineArguments includes:'--debug').
    2.93 +    result := suite
    2.94 +		run:TestResultStX new
    2.95 +		beforeEachDo:[:test |
    2.96 +		    Stdout showCR:('- running ',test printString).
    2.97 +		]
    2.98 +		afterEachDo:[:test|
    2.99 +		    Stdout showCR:('- done ',test printString).
   2.100 +		]
   2.101 +		debug:debugging.
   2.102  
   2.103 -Stdout showCR:'Generating report...'.
   2.104 -TestResultReporter
   2.105 -    report:result
   2.106 -    format:#xml_jUnit
   2.107 -    as:'testresult.xml'.
   2.108 +    Stdout showCR:'Generating report...'.
   2.109 +    TestResultReporter
   2.110 +	report:result
   2.111 +	format:#xml_jUnit
   2.112 +	as:'testresult.xml'.
   2.113  
   2.114 -Stdout showCR:'Summary:'.
   2.115 -Stdout showCR:('  %1 tests;' bindWith:result runCount).
   2.116 -Stdout show:('  %1 passed,' bindWith:result passedCount).
   2.117 -Stdout show:(' %1 failed,' bindWith:result failureCount).
   2.118 -Stdout showCR:(' %1 errors.' bindWith:result errorCount).
   2.119 +    Stdout showCR:'Summary:'.
   2.120 +    Stdout showCR:('  %1 tests;' bindWith:result runCount).
   2.121 +    Stdout show:('  %1 passed,' bindWith:result passedCount).
   2.122 +    Stdout show:(' %1 failed,' bindWith:result failureCount).
   2.123 +    Stdout showCR:(' %1 errors.' bindWith:result errorCount).
   2.124 +].
   2.125  
   2.126 -'metrics.xml' asFilename writingFileDo:[:stream |
   2.127 -    MetricsReporter new
   2.128 -	stream: stream;
   2.129 -	packages:{
   2.130 -	    'stx:libbasic'       .
   2.131 -	    'stx:libbasic2'      .
   2.132 -	    'stx:libbasic3'      .
   2.133 -	    'stx:libcomp'        .
   2.134 -	    'stx:libview'        .
   2.135 -	    'stx:libview2'       .
   2.136 -	    'stx:libwidg'        .
   2.137 -	    'stx:libwidg2'       .
   2.138 -	    'stx:libtool'        .
   2.139 -	    'stx:libtool2'       .
   2.140 -	    'stx:libui'          .
   2.141 -	    'stx:libhtml'        .
   2.142 -	    'stx:goodies/xml/vw' .
   2.143 -	    'stx:goodies/soap'   .
   2.144 -	    'stx:libjavascript'  .
   2.145 -	};
   2.146 -	classMetricNames: #();
   2.147 -	methodMetricNames: #();
   2.148 -	packageMetricNames: #( 'LOC' 'NOM' 'NOC');
   2.149 -	reportXml_metrics.
   2.150 +"/
   2.151 +"/ generate a metrics report
   2.152 +"/
   2.153 +#(
   2.154 +	    'stx:libbasic'
   2.155 +	    'stx:libbasic2'
   2.156 +	    'stx:libbasic3'
   2.157 +	    'stx:libcomp'
   2.158 +	    'stx:libview'
   2.159 +	    'stx:libview2'
   2.160 +	    'stx:libwidg'
   2.161 +	    'stx:libwidg2'
   2.162 +	    'stx:libtool'
   2.163 +	    'stx:libtool2'
   2.164 +	    'stx:libui'
   2.165 +	    'stx:libhtml'
   2.166 +	    'stx:libjavascript'
   2.167 +	    'stx:goodies/xml/stx'
   2.168 +	    'stx:goodies/xml/yaxo'
   2.169 +	    'stx:goodies/xml/xsl'
   2.170 +	    'stx:goodies/xml/xpath'
   2.171 +	    'stx:goodies/net'
   2.172 +	    'stx:goodies/communication'
   2.173 +	    'stx:goodies/webServer'
   2.174 +	    'stx:goodies/soap'
   2.175 +) do:[:p | Smalltalk loadPackage:p].
   2.176 +
   2.177 +(Smalltalk commandLineArguments includes:'--skipMetrics') ifTrue:[
   2.178 +    Stdout showCR:'Skipping metrics.'.
   2.179 +] ifFalse:[
   2.180 +    'metrics.xml' asFilename writingFileDo:[:stream |
   2.181 +	MetricsReporter new
   2.182 +	    stream: stream;
   2.183 +	    packages:{
   2.184 +		'stx:*'       .
   2.185 +	    };
   2.186 +	    classMetricNames: #();
   2.187 +	    methodMetricNames: #();
   2.188 +	    packageMetricNames: #( 'LOC' 'NOM' 'NOC');
   2.189 +	    reportXml_metrics.
   2.190 +    ].
   2.191  ].
   2.192  
   2.193  !
     3.1 --- a/quickSelfTest/run.bat	Tue Mar 15 14:36:37 2016 +0000
     3.2 +++ b/quickSelfTest/run.bat	Thu Mar 24 07:06:09 2016 +0100
     3.3 @@ -1,1 +1,1 @@
     3.4 -..\..\..\projects\smalltalk\stx --noInfoPrint --noBanner --exitOnInternalError --exitOnMessageSendError -I --execute SelfTest.st
     3.5 +..\..\..\projects\smalltalk\stx -I --noInfoPrint --noBanner --abortOnInternalError --abortOnMessageSendError --debug --ignoreHalt --execute SelfTest.st
     4.1 --- a/quickSelfTest/run.sh	Tue Mar 15 14:36:37 2016 +0000
     4.2 +++ b/quickSelfTest/run.sh	Thu Mar 24 07:06:09 2016 +0100
     4.3 @@ -1,4 +1,4 @@
     4.4  #!/bin/sh
     4.5  # use --debug as arg to debug failed test cases
     4.6  
     4.7 -../../../projects/smalltalk/stx --noInfoPrint --noBanner --exitOnInternalError --exitOnMessageSendError -I $* --execute SelfTest.st
     4.8 +../../../projects/smalltalk/stx -I --noInfoPrint --noBanner --ignoreHalt --abortOnInternalError --abortOnMessageSendError $* --execute SelfTest.st