# HG changeset patch # User Merge Script # Date 1458799569 -3600 # Node ID 9c15d2d4d8e204d72655d35f323763fd0172305f # Parent e217bb7aacf4e84a502e0678f843054c2e7e4ae3# Parent 2cc5a7dc36b66c4fe45ebf5909edee18f5c48afa Merge diff -r e217bb7aacf4 -r 9c15d2d4d8e2 .hgtags --- a/.hgtags Tue Mar 15 14:36:37 2016 +0000 +++ b/.hgtags Thu Mar 24 07:06:09 2016 +0100 @@ -16,6 +16,7 @@ 678217bcd5d84be8c9f292ec6ee637cecee7a075 expecco_2_1_0 7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0 7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0a +7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_2_8_0b 7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_5 7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_6 7798bf9ef44b2c230b69edb123f6b8613655ae08 expecco_ALM_1_9_7 diff -r e217bb7aacf4 -r 9c15d2d4d8e2 quickSelfTest/SelfTest.st --- a/quickSelfTest/SelfTest.st Tue Mar 15 14:36:37 2016 +0000 +++ b/quickSelfTest/SelfTest.st Thu Mar 24 07:06:09 2016 +0100 @@ -3,9 +3,13 @@ "/ execute this script using the following command line: "/ "/ stx --noBanner -I --execute SelfTest.st -"/ use --debug to debug failed test cases. "/ -"/ to use with jenkins (+ jUnit plugin): +"/ use +"/ --debug to debug failed test cases. +"/ --skipTests to skip tests +"/ --skipMetrics to metric reports tests +"/ +"/ To use with jenkins (+ jUnit plugin): "/ use the following buildscript (in jenkins): "/ (after checkout of stx) "/ cd stx @@ -14,12 +18,15 @@ "/ ..\..\projects\smalltalk\stx.com --noBanner -I --execute SelfTest.st "/ "/ and configure the jenkins junit plugin, to scan for "testresult.xml" +"/ ------------------------------------------------------------------------------------ "/ tell the system, where stx is... ParserFlags initializeSTCFlagsForTopDirectory:'../../..'. Object infoPrinting:false. ObjectMemory infoPrinting:false. + +"/ install a global handler, which suppresses the updating of the change file Processor activeProcess exceptionHandlerSet on:(Class updateChangeFileQuerySignal) do:[:ex | ex proceedWith:false ]. @@ -28,6 +35,9 @@ Stdout showCR:'Selftest Started'. ! +Smalltalk packagePath addFirst:'../../../..'. + +"/ ensure that some packages are present Stdout showCR:'Loading sunit...'. Smalltalk loadPackage:'stx:goodies/sunit'. self assert:(TestCase notNil and:[TestCase isLoaded]) message:'[Error]: Missing TestCase class after sunit package load'. @@ -46,18 +56,22 @@ Stdout showCR:'Loading regression tests...'. "To add a new test please edit exept_regression>>testCaseNamesWithoutNamespace" -Smalltalk packagePath addFirst:'../../../..'. Smalltalk fileInClass:#'exept_regression' package:'exept:regression'. (Smalltalk at: #'exept_regression') isNil ifTrue:[ Stdout showCR:('ERROR: Ouch - missing class: "exept_regression"'). Smalltalk exit: 1. ]. + (Smalltalk at: #'exept_regression') testCaseNamesWithoutNamespace do:[:className | |fullName| fullName := ('RegressionTests::',className). - Stdout showCR:('Loading ',className,'...'). - Smalltalk fileInClass:fullName package:'exept:regression'. + Stdout showCR:(' loading ',className,'...'). + Error handle:[:ex | + Stdout showCR:('**** Ouch - error while loading class: "',className,'"'). + ] do:[ + Smalltalk fileInClass:fullName package:'exept:regression'. + ]. (Smalltalk classNamed:fullName) isNil ifTrue:[ Stdout showCR:('**** Ouch - missing class: "',fullName,'"'). ] ifFalse:[ @@ -65,53 +79,78 @@ ] ]. -Stdout showCR:'Running suite...'. -debugging := (Smalltalk commandLineArgumentNamed:'--debug') notNil. -result := suite - run:TestResultStX new beforeEachDo:[:test | - Stdout showCR:('- running ',test printString). - ] - afterEachDo:[:test| - Stdout showCR:('- done ',test printString). - ] - debug:debugging. +"/ +"/ run the suite +"/ +(Smalltalk commandLineArguments includes:'--skipTests') ifTrue:[ + Stdout showCR:'Skipping suite.'. +] ifFalse:[ + Stdout showCR:'Running suite...'. + debugging := (Smalltalk commandLineArguments includes:'--debug'). + result := suite + run:TestResultStX new + beforeEachDo:[:test | + Stdout showCR:('- running ',test printString). + ] + afterEachDo:[:test| + Stdout showCR:('- done ',test printString). + ] + debug:debugging. -Stdout showCR:'Generating report...'. -TestResultReporter - report:result - format:#xml_jUnit - as:'testresult.xml'. + Stdout showCR:'Generating report...'. + TestResultReporter + report:result + format:#xml_jUnit + as:'testresult.xml'. -Stdout showCR:'Summary:'. -Stdout showCR:(' %1 tests;' bindWith:result runCount). -Stdout show:(' %1 passed,' bindWith:result passedCount). -Stdout show:(' %1 failed,' bindWith:result failureCount). -Stdout showCR:(' %1 errors.' bindWith:result errorCount). + Stdout showCR:'Summary:'. + Stdout showCR:(' %1 tests;' bindWith:result runCount). + Stdout show:(' %1 passed,' bindWith:result passedCount). + Stdout show:(' %1 failed,' bindWith:result failureCount). + Stdout showCR:(' %1 errors.' bindWith:result errorCount). +]. -'metrics.xml' asFilename writingFileDo:[:stream | - MetricsReporter new - stream: stream; - packages:{ - 'stx:libbasic' . - 'stx:libbasic2' . - 'stx:libbasic3' . - 'stx:libcomp' . - 'stx:libview' . - 'stx:libview2' . - 'stx:libwidg' . - 'stx:libwidg2' . - 'stx:libtool' . - 'stx:libtool2' . - 'stx:libui' . - 'stx:libhtml' . - 'stx:goodies/xml/vw' . - 'stx:goodies/soap' . - 'stx:libjavascript' . - }; - classMetricNames: #(); - methodMetricNames: #(); - packageMetricNames: #( 'LOC' 'NOM' 'NOC'); - reportXml_metrics. +"/ +"/ generate a metrics report +"/ +#( + 'stx:libbasic' + 'stx:libbasic2' + 'stx:libbasic3' + 'stx:libcomp' + 'stx:libview' + 'stx:libview2' + 'stx:libwidg' + 'stx:libwidg2' + 'stx:libtool' + 'stx:libtool2' + 'stx:libui' + 'stx:libhtml' + 'stx:libjavascript' + 'stx:goodies/xml/stx' + 'stx:goodies/xml/yaxo' + 'stx:goodies/xml/xsl' + 'stx:goodies/xml/xpath' + 'stx:goodies/net' + 'stx:goodies/communication' + 'stx:goodies/webServer' + 'stx:goodies/soap' +) do:[:p | Smalltalk loadPackage:p]. + +(Smalltalk commandLineArguments includes:'--skipMetrics') ifTrue:[ + Stdout showCR:'Skipping metrics.'. +] ifFalse:[ + 'metrics.xml' asFilename writingFileDo:[:stream | + MetricsReporter new + stream: stream; + packages:{ + 'stx:*' . + }; + classMetricNames: #(); + methodMetricNames: #(); + packageMetricNames: #( 'LOC' 'NOM' 'NOC'); + reportXml_metrics. + ]. ]. ! diff -r e217bb7aacf4 -r 9c15d2d4d8e2 quickSelfTest/run.bat --- a/quickSelfTest/run.bat Tue Mar 15 14:36:37 2016 +0000 +++ b/quickSelfTest/run.bat Thu Mar 24 07:06:09 2016 +0100 @@ -1,1 +1,1 @@ -..\..\..\projects\smalltalk\stx --noInfoPrint --noBanner --exitOnInternalError --exitOnMessageSendError -I --execute SelfTest.st +..\..\..\projects\smalltalk\stx -I --noInfoPrint --noBanner --abortOnInternalError --abortOnMessageSendError --debug --ignoreHalt --execute SelfTest.st diff -r e217bb7aacf4 -r 9c15d2d4d8e2 quickSelfTest/run.sh --- a/quickSelfTest/run.sh Tue Mar 15 14:36:37 2016 +0000 +++ b/quickSelfTest/run.sh Thu Mar 24 07:06:09 2016 +0100 @@ -1,4 +1,4 @@ #!/bin/sh # use --debug as arg to debug failed test cases -../../../projects/smalltalk/stx --noInfoPrint --noBanner --exitOnInternalError --exitOnMessageSendError -I $* --execute SelfTest.st +../../../projects/smalltalk/stx -I --noInfoPrint --noBanner --ignoreHalt --abortOnInternalError --abortOnMessageSendError $* --execute SelfTest.st