quickSelfTest/Start.st
author Claus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 13:54:38 +0100
changeset 542 aa25a71be62a
parent 533 59170f299fc2
permissions -rw-r--r--
#DOCUMENTATION by cg
class: stx_goodies_builder_quickSelfTest
class definition

class: stx_goodies_builder_quickSelfTest class
added:18 methods
     1 |fn|
     2 "
     3 	install a global handler,
     4 	which suppresses the updating of the change file
     5 "
     6 Processor activeProcess exceptionHandlerSet
     7     on:(Class updateChangeFileQuerySignal)
     8     do:[:ex | ex proceedWith:false ].
     9 
    10 
    11 "
    12 	ensure that required packages are present
    13 "
    14 Smalltalk loadPackage:'stx:goodies/sunit'.
    15 (TestCase notNil and:[TestCase isLoaded]) ifFalse:[
    16 	Stdout showCR:'error: missing #TestCase class after sunit package load'.
    17 	Smalltalk exit:1.
    18 ].
    19 
    20 Smalltalk loadPackage:'stx:goodies/xml/xpath'.
    21 (XML::XPathParser notNil and:[XML::XPathParser isLoaded]) ifFalse:[
    22     Stdout showCR:'error: missing #XPathParser class after goodies/xml/xpath package load'.
    23     Smalltalk exit:1.
    24 ].
    25 
    26 Smalltalk
    27 	fileInClass:#'stx_goodies_regression'
    28 	package:'stx:goodies/regression'.
    29 (Smalltalk at:#'stx_goodies_regression') isNil ifTrue:[
    30 	Stdout showCR:'error: missing #stx_goodies_regression'.
    31     Smalltalk exit:1.
    32 ].
    33 
    34 fn := 'RunUnitTests.st' asFilename.
    35 fn exists ifFalse:[
    36     fn := '../RunUnitTests.st' asFilename.
    37 ].
    38 
    39 fn fileIn.
    40 
    41 (Smalltalk at:#'RunUnitTests') isNil ifTrue:[
    42 	Stdout showCR:'error: missing #RunUnitTests'.
    43     Smalltalk exit:1.
    44 ].
    45 
    46 Smalltalk loadPackage:'stx:libcompat'.
    47 Smalltalk loadPackage:'stx:libjavascript'.
    48 Smalltalk loadPackage:'stx:goodies/regex'.
    49 
    50 
    51 "
    52 	run the unit tests
    53 "
    54 RunUnitTests run.