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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
     1
|fn|
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     2
"
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
     3
	install a global handler,
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     4
	which suppresses the updating of the change file
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
     5
"
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     6
Processor activeProcess exceptionHandlerSet
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     7
    on:(Class updateChangeFileQuerySignal)
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     8
    do:[:ex | ex proceedWith:false ].
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
     9
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    10
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    11
"
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    12
	ensure that required packages are present
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    13
"
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    14
Smalltalk loadPackage:'stx:goodies/sunit'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    15
(TestCase notNil and:[TestCase isLoaded]) ifFalse:[
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    16
	Stdout showCR:'error: missing #TestCase class after sunit package load'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    17
	Smalltalk exit:1.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    18
].
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    19
531
224f4c82346c *** empty log message ***
sr
parents: 513
diff changeset
    20
Smalltalk loadPackage:'stx:goodies/xml/xpath'.
533
59170f299fc2 *** empty log message ***
sr
parents: 531
diff changeset
    21
(XML::XPathParser notNil and:[XML::XPathParser isLoaded]) ifFalse:[
531
224f4c82346c *** empty log message ***
sr
parents: 513
diff changeset
    22
    Stdout showCR:'error: missing #XPathParser class after goodies/xml/xpath package load'.
224f4c82346c *** empty log message ***
sr
parents: 513
diff changeset
    23
    Smalltalk exit:1.
224f4c82346c *** empty log message ***
sr
parents: 513
diff changeset
    24
].
224f4c82346c *** empty log message ***
sr
parents: 513
diff changeset
    25
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    26
Smalltalk
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    27
	fileInClass:#'stx_goodies_regression'
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    28
	package:'stx:goodies/regression'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    29
(Smalltalk at:#'stx_goodies_regression') isNil ifTrue:[
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    30
	Stdout showCR:'error: missing #stx_goodies_regression'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    31
    Smalltalk exit:1.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    32
].
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    33
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    34
fn := 'RunUnitTests.st' asFilename.
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    35
fn exists ifFalse:[
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    36
    fn := '../RunUnitTests.st' asFilename.
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    37
].
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    38
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    39
fn fileIn.
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    40
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    41
(Smalltalk at:#'RunUnitTests') isNil ifTrue:[
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    42
	Stdout showCR:'error: missing #RunUnitTests'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    43
    Smalltalk exit:1.
410
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    44
].
74a4f136cf81 *** empty log message ***
sr
parents: 330
diff changeset
    45
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    46
Smalltalk loadPackage:'stx:libcompat'.
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    47
Smalltalk loadPackage:'stx:libjavascript'.
513
9d572c1caefa *** empty log message ***
sr
parents: 410
diff changeset
    48
Smalltalk loadPackage:'stx:goodies/regex'.
330
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    49
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    50
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    51
"
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    52
	run the unit tests
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    53
"
6a3fe7cea4e1 *** empty log message ***
sr
parents:
diff changeset
    54
RunUnitTests run.