exercism / pharo-smalltalk

Exercism exercises in Pharo.
https://exercism.org/tracks/pharo-smalltalk
MIT License
34 stars 28 forks source link

Enhance TestResults.txt output with information about used environment #518

Closed Bajger closed 2 years ago

Bajger commented 2 years ago

Summary Currently, when student submits Pharo track exercise, submission command produces TestResults.txt which is supplemental inforamtion for mentor, if all tests related to exercise runned successfully. Maintainers would like to have also information about used environment, on which was exercise developed and submitted.

Description Enhance TestResults.txt with used OS environment (OS name, version), image version, VM version. proposed output:

Tested on: 2020-04-21 13:36
15 run, 15 passes, 0 skipped, 0 failures, 0 errors.
Used OS/Platform: Mac OS 1000 x86_64
Image version:  Pharo 9.0.0 build.10220 (64 bit)
VM version: v9.0.6 - Commit: 1ee76042

Implementation detail/Additional details Modify TestResult>>exercismSummary with following details: OS details

        nextPutAll: Smalltalk os platformName; space;
        nextPutAll: Smalltalk os version; space;
        nextPutAll: Smalltalk os subtype; cr

Image details:

SystemVersion current version.
SystemVersion current build asString. 
Smalltalk vm is32bit 
ifTrue: [ str nextPutAll: ' (32 Bit)' ]
ifFalse: [ str nextPutAll: ' (64 Bit)' ].   

VM detals:

Smalltalk vm interpreterSourceVersion 
Bajger commented 2 years ago

@glennj Please take a look, if this is what you'd need.

glennj commented 2 years ago

That looks perfect.

glennj commented 2 years ago

To pull the new commit into an existing image, do I re-execute this?

Metacello new
 baseline: 'Exercism';
 repository: 'github://exercism/pharo-smalltalk:main/releases/latest';
 load.

?

Bajger commented 2 years ago

@glennj: Yes, You can try simply (backup original image first) to load everything, but I didn't check it (it might fail since loading same project again into Pharo image can have some conflicts). I found Pharo upgrade instructions (see: https://github.com/exercism/pharo-smalltalk/blob/main/docs/UPGRADE.md) that might be more reliable. Either one or another should work, but you'd need to test.