Skip to content

Commit

Permalink
Issue Metacello#273: logging for Pharo-4.0 test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Nov 10, 2014
1 parent 92a6172 commit bc2e023
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 67 deletions.
@@ -1,6 +1,5 @@
attributes
defaultPlatformAttributes

| stoneVersionAtts |
(stoneVersionAtts := self stoneVersionAttributes) ifNil: [^ #( #gemstone )].
^ stoneVersionAtts
| stoneVersionAtts |
(stoneVersionAtts := self stoneVersionAttributes) ifNil: [ ^ #(#'gemstone') ].
^ stoneVersionAtts , self devKitPlatformAttributes
@@ -0,0 +1,15 @@
attributes
devKitPlatformAttributes
| baselineClassName |
baselineClassName := 'BaselineOfDevKit'.
Smalltalk
at: baselineClassName
ifPresent: [ :ignored |
Smalltalk
at: #'MetacelloProjectRegistration'
ifPresent: [ :cls |
(cls registrationForClassNamed: baselineClassName ifAbsent: [ ])
ifNotNil: [ :registration |
registration loadedInImage
ifTrue: [ #(#'gsdevkit') ] ] ] ].
^ #(#'glass')
Expand Up @@ -9,8 +9,9 @@
"confirm:" : "dkh 01/06/2010 10:18",
"copyClass:as:inCategory:" : "dkh 11/10/2011 09:52",
"createRepository:" : "dkh 03/23/2013 08:50",
"defaultPlatformAttributes" : "dkh 11/13/2009 16:37",
"defaultPlatformAttributes" : "dkh 11/10/2014 15:49",
"defaultRepositoryDescription" : "dkh 09/28/2014 09:52",
"devKitPlatformAttributes" : "dkh 11/10/2014 15:48",
"downloadBasicFile:to:" : "dkh 10/15/2014 17:04",
"downloadBasicFile:to:username:pass:" : "dkh 10/15/2014 17:08",
"downloadJSON:username:pass:" : "dkh 10/16/2014 13:52",
Expand Down

Large diffs are not rendered by default.

@@ -1,30 +1,40 @@
tests
testCommitNewPackageSpec
| repoSpec repo project packagesNeedSaving allVersionsSize packageName |
project := self project.
repoSpec := self repositorySpec.
repo := repoSpec createRepository.
allVersionsSize := repo allVersionInfos size.
gofer repository: repo.
gofer
package: 'GoferFoo';
package: 'GoferBar';
metacelloLoad.
"Create new package"
packageName := 'GoferFaux'.
PackageInfo registerPackageName: packageName.
MCWorkingCopy forPackage: (MetacelloTestsMCPackage new name: packageName).
(MCClassDefinition
name: (packageName copyWithout: $-) asSymbol
superclassName: #Object
category: packageName asSymbol
instVarNames: #()
comment: '') createClass.
self assert: (packagesNeedSaving := project packagesNeedSaving: '1.0-baseline') notEmpty.
packagesNeedSaving do: [:assoc | | gof |
gof := Gofer new.
gof disablePackageCache.
gof repository: assoc value.
gof package: assoc key name.
gof commit: 'testing' ].
self assert: repo allVersionInfos size = (allVersionsSize + 1)
[
| repoSpec repo project packagesNeedSaving allVersionsSize packageName |
project := self project.
repoSpec := self repositorySpec.
repo := repoSpec createRepository.
allVersionsSize := repo allVersionInfos size.
gofer repository: repo.
gofer
package: 'GoferFoo';
package: 'GoferBar';
metacelloLoad. "Create new package"
packageName := 'GoferFaux'.
PackageInfo registerPackageName: packageName.
MCWorkingCopy forPackage: (MetacelloTestsMCPackage new name: packageName).
(MCClassDefinition
name: (packageName copyWithout: $-) asSymbol
superclassName: #'Object'
category: packageName asSymbol
instVarNames: #()
comment: '') createClass.
self
assert:
(packagesNeedSaving := project packagesNeedSaving: '1.0-baseline') notEmpty.
packagesNeedSaving
do: [ :assoc |
| gof |
gof := Gofer new.
gof disablePackageCache.
gof repository: assoc value.
gof package: assoc key name.
gof commit: 'testing' ].
self assert: repo allVersionInfos size = (allVersionsSize + 1) ]
on: Error
do: [ :ex |
Transcript
cr;
show: 'testCommitNewPackageSpec Error: ' , ex description.
ex pass ]
Expand Up @@ -8,7 +8,7 @@
"repositorySpec" : "dkh 6/12/2012 15:41:23.319",
"tearDown" : "dkh 6/12/2012 15:41:23.319",
"testBasics" : "dkh 6/12/2012 15:41:23.319",
"testCommitNewPackageSpec" : "dkh 6/12/2012 15:41:23.319",
"testCommitNewPackageSpec" : "dkh 11/10/2014 15:56",
"testCommitPackageSpec" : "dkh 6/12/2012 15:41:23.319",
"testCommitPackageVersion" : "dkh 6/12/2012 15:41:23.319",
"testComparison" : "dkh 6/12/2012 15:41:23.319",
Expand Down
@@ -1,23 +1,32 @@
tests
testImportFrom4
"change order of project attributes relative to import3...i.e., not reversed which is default"
"change order of project attributes relative to import3...i.e., not reversed which is default"

| toolbox source |
self createNested13Baseline.
(toolbox := MetacelloToolBox configurationNamed: self configurationName asString)
createVersionMethod: 'version13:' inCategory: 'versions' forVersion: '1.3';
importFrom: '1.3-baseline'
projectAttributes: #(#'common' #'other' #'nested' #'outer')
inactiveAttributes: #()
updateProjects: true
updatePackages: true
versionSpecsDo: [ :attributeOrPath :versionSpec |
attributeOrPath == #'common'
ifTrue: [ versionSpec blessing: #'development' ].
attributeOrPath = #(#(#'common') #(#'nested')) asMetacelloAttributePath
ifTrue: [ versionSpec description: 'nested for:do: section' ].
true ];
commitMethod.
self
assert:
(source := ((Smalltalk at: self configurationName) sourceCodeAt: #'version13:') asString) = self version13SourceString4
[
| toolbox source |
self createNested13Baseline.
(toolbox := MetacelloToolBox
configurationNamed: self configurationName asString)
createVersionMethod: 'version13:' inCategory: 'versions' forVersion: '1.3';
importFrom: '1.3-baseline'
projectAttributes: #(#'common' #'other' #'nested' #'outer')
inactiveAttributes: #()
updateProjects: true
updatePackages: true
versionSpecsDo: [ :attributeOrPath :versionSpec |
attributeOrPath == #'common'
ifTrue: [ versionSpec blessing: #'development' ].
attributeOrPath = #(#(#'common') #(#'nested')) asMetacelloAttributePath
ifTrue: [ versionSpec description: 'nested for:do: section' ].
true ];
commitMethod.
self
assert:
(source := ((Smalltalk at: self configurationName) sourceCodeAt: #'version13:')
asString) = self version13SourceString4 ]
on: Error
do: [ :ex |
Transcript
cr;
show: 'testImportFrom4 Error: ' , ex description.
ex pass ]
Expand Up @@ -43,7 +43,7 @@
"testImportFrom1" : "dkh 9/7/2012 14:00",
"testImportFrom2" : "dkh 09/17/2014 16:39",
"testImportFrom3" : "dkh 9/13/2012 16:06",
"testImportFrom4" : "dkh 9/13/2012 16:06",
"testImportFrom4" : "dkh 11/10/2014 15:57",
"testImportFrom5" : "dkh 9/14/2012 09:58",
"testImportFrom6A" : "dkh 9/13/2012 15:15",
"testImportFrom6B" : "dkh 9/13/2012 19:07",
Expand Down

0 comments on commit bc2e023

Please sign in to comment.