author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 30 May 2018 14:48:57 +0100 | |
branch | jv |
changeset 1972 | 0d55f748fc8b |
parent 1971 | de93bc901dba |
child 1973 | edac63045d4a |
--- a/RegressionTests__MakefileTests.st Tue Apr 17 16:24:47 2018 +0100 +++ b/RegressionTests__MakefileTests.st Wed May 30 14:48:57 2018 +0100 @@ -9,7 +9,7 @@ category:'tests-Regression' ! -StandaloneStartup subclass:#TestApplication01 +StandaloneStartup subclass:#TestApplication01StartUp instanceVariableNames:'' classVariableNames:'' poolDictionaries:'' @@ -117,11 +117,11 @@ - self setUpForPackage:'tmp:makefiletests'. + self setUpForPackage:('tmp:', testSelector) asSymbol. "Created: / 19-11-2013 / 12:57:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" - "Modified: / 24-11-2013 / 22:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" "Modified: / 23-11-2017 / 20:34:37 / jv" + "Modified: / 30-05-2018 / 14:25:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" ! setUpForPackage: pkg @@ -142,33 +142,35 @@ !MakefileTests methodsFor:'tests'! -test_application_01 - +test_application_01a <timeout: 600> "600sec = 10min" - self run:#'test_application_01' type:ProjectDefinition nonGuiApplicationType toolchain:nil + self compile:(Array with:TestApplication01StartUp) type:ProjectDefinition nonGuiApplicationType. - "Created: / 19-11-2013 / 14:05:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" + "Created: / 30-05-2018 / 14:22:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" ! -test_application_02 - - <timeout: 600> "600sec = 10min" +test_application_01b + <timeout: 600> "600sec = 10min" - self setUpForPackage: 'tmp:makefiletests2/test_application_02'. - self run:#'test_application_01' type:ProjectDefinition nonGuiApplicationType toolchain:nil + self setUpForPackage:('tmp:' , testSelector , '/' , testSelector) asSymbol. + self compile:(Array with:TestApplication01StartUp) type:ProjectDefinition nonGuiApplicationType. - "Created: / 24-11-2013 / 22:23:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" + "Created: / 30-05-2018 / 14:23:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" ! ! !MakefileTests methodsFor:'tests-helpers'! -run:packageIdent type:packageType toolchain:toolchain - | packageDef startup | +compile: classes type:packageType + " + Create a new application package with copy of given classes + and compile it. Return the path to compiled executable. + " + | packageDef startup executable | "/ Compile all classes... Class packageQuerySignal answer:package do:[ - (self class privateClasses select:[:cls | cls packageIdent = packageIdent ]) do:[:cls | + classes do:[:cls | | copy | copy := cls superclass @@ -237,20 +239,15 @@ ]. self make. + executable := (Smalltalk getPackageDirectoryForPackage: package) / (OperatingSystem isMSWINDOWSlike ifTrue:[packageDef applicationNameConsole] ifFalse:[ packageDef applicationName ]). + self assert: executable exists. + self assert:(OperatingSystem canExecuteCommand: executable pathName). + ^ executable pathName - "Created: / 19-11-2013 / 14:07:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" - "Modified: / 12-02-2016 / 15:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" + "Created: / 30-05-2018 / 14:22:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" ! ! -!MakefileTests::TestApplication01 class methodsFor:'accessing'! - -packageIdent - ^ #test_application_01 - - "Created: / 19-11-2013 / 14:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" -! ! - -!MakefileTests::TestApplication01 class methodsFor:'startup-to be redefined'! +!MakefileTests::TestApplication01StartUp class methodsFor:'startup-to be redefined'! main:args args isEmpty ifTrue:[