Skip to content

Commit

Permalink
Move suite naming into image
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Oct 9, 2016
1 parent 2db0d61 commit 3b6a15d
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 26 deletions.
12 changes: 0 additions & 12 deletions helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,6 @@ is_spur_image() {
[[ $((image_format_number>>(spur_bit-1) & 1)) -eq 1 ]]
}

get_build_name() {
local name="${config_smalltalk} with $(basename $config_ston)"

if is_travis_build; then
echo "${name} on TravisCI (${TRAVIS_JOB_NUMBER})"
elif is_appveyor_build; then
echo "${name} on Appveyor (${APPVEYOR_JOB_NAME})"
else
echo "${name}"
fi
}

debug_enabled() {
[[ "${config_debug}" = "true" ]]
}
Expand Down
2 changes: 1 addition & 1 deletion pharo/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ pharo::test_project() {

travis_wait "${SMALLTALK_CI_VM}" "$(resolve_path ${SMALLTALK_CI_IMAGE})" \
eval ${vm_flags} "
(Smalltalk at: #SmalltalkCI) test: '$(resolve_path "${config_ston}")' named: '$(get_build_name)'
(Smalltalk at: #SmalltalkCI) test: '$(resolve_path "${config_ston}")'
" || status=$?

return "${status}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
constants
defaultSuiteName: aFilenameString
| suiteName |
suiteName := (self getEnv: 'config_smalltalk'), ' with ', (aFilenameString copyAfterLast: $/).
self isTravisBuild ifTrue: [
suiteName := suiteName, ' on TravisCI (', (self getEnv: 'TRAVIS_JOB_NUMBER'), ')' ].
self isAppVeyorBuild ifTrue: [
suiteName := suiteName, ' on AppVeyor (', (self getEnv: 'APPVEYOR_JOB_NAME'), ')' ].
^ suiteName

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
public-api
test: aFilenameString
^ self test: aFilenameString named: self defaultSuiteName
^ self test: aFilenameString named: (self defaultSuiteName: aFilenameString)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
suiteName
^ suiteName ifNil: [ ^ self class defaultSuiteName ]
^ suiteName
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"classesWithPackageNames:" : "fn 6/21/2016 23:42",
"closeImageWithExitCode:" : "fn 7/2/2016 16:03",
"codeCoverageClass" : "fn 10/8/2016 14:56",
"defaultSuiteName" : "fn 4/14/2016 22:04",
"defaultSuiteName:" : "fn 10/9/2016 22:51",
"escape" : "fn 9/26/2016 16:12",
"fileExists:" : "fn 4/14/2016 00:56",
"fold:block:" : "fn 10/7/2016 21:26",
Expand Down Expand Up @@ -59,7 +59,7 @@
"stdout" : "fn 9/27/2016 20:38",
"stepsToReproduceLocally" : "fn 10/8/2016 13:16",
"stringFor:maxDecimalPlaces:" : "fn 9/28/2016 11:46",
"test:" : "fn 9/26/2016 17:27",
"test:" : "fn 10/9/2016 22:48",
"test:named:" : "fn 10/9/2016 21:36",
"testRunnerClass" : "fn 10/4/2016 17:21",
"timeToRun:" : "fn 9/28/2016 13:03",
Expand Down Expand Up @@ -90,7 +90,7 @@
"runTests" : "fn 9/27/2016 15:14",
"spec" : "EstebanLorenzano 1/26/2016 16:20",
"spec:" : "fn 1/31/2016 18:59",
"suiteName" : "fn 4/14/2016 22:04",
"suiteName" : "fn 10/9/2016 22:52",
"suiteName:" : "dkh 04/07/2016 15:27",
"test" : "fn 10/8/2016 15:52",
"testCI" : "fn 6/13/2016 14:31" } }

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
testing
testSuiteName
self assert: self sci suiteName equals: SmalltalkCI defaultSuiteName.
self sci suiteName: 'fooSuite'.
self assert: self sci suiteName equals: 'fooSuite'

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"testNew" : "fn 4/15/2016 14:44",
"testResolveAllWith" : "fn 6/22/2016 00:01",
"testResolveWith" : "fn 6/21/2016 23:53",
"testSuiteName" : "fn 4/14/2016 22:05",
"testSuiteName" : "fn 10/9/2016 22:52",
"testTravisDetection" : "fn 9/27/2016 20:13",
"testTravisFold" : "fn 10/7/2016 21:50" } }

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ main() {
ensure_ston_config_exists "${!#}" # Use last argument for custom STON
check_clean_up
select_smalltalk
export config_smalltalk # Make Smalltalk selection available in image
validate_configuration
prepare_folders
export_coveralls_data
Expand Down
2 changes: 1 addition & 1 deletion squeak/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ squeak::test_project() {
local build_name=""

cat >"${SMALLTALK_CI_BUILD}/test.st" <<EOL
SmalltalkCI test: '$(resolve_path "${config_ston}")' named: '$(get_build_name)'
SmalltalkCI test: '$(resolve_path "${config_ston}")'
EOL

squeak::run_script "test.st" || status=$?
Expand Down

0 comments on commit 3b6a15d

Please sign in to comment.