-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combined GemStone/Squeak/Pharo tests - revisited #105
Comments
SGTM and great that there already is a second use-case for smalltalkCI config files :) language: smalltalk
sudo: false
os:
- linux
- osx
smalltalk_config:
- smalltalk_pharo-5.0.ston
- smalltalk_pharo-4.0.ston
- smalltalk_pharo-3.0.ston
smalltalk:
- GemStone-3.2.13
- GemStone-3.3.0
cache:
directories:
- $SMALLTALK_CI_CACHE This would mean that the client selection is encoded in the STON config which I think would make sense. What do you think? I guess I could start working on it if this would help here. |
Okay, I think I see what you are doing with the multiple config files and I agree that your proposal would be a useful feature, but I'm not sure that it addresses my use case ... The point of using the
So I am sensitive to over reliance on environment vars, but I extend that to where I want to minimize the proliferation of |
Continuing with the discussion of clients and smalltalkCI configuration file extensions...
However, if I want to be able to run a travis test involving the client, I need to create and start a stone; then create and start a client; run the stone tests and finally run the client tests all while producing coherent tests results for travis (otherwise known as producing one or more sunit test results files that are properly displayed by trvis/smalltalk.rb --- a problem for which I do not have a solution, regardless of how the tests get started and run). We've already taught SmalltalkCI how to create and start a stone, so I need to add additional attributes to config file to be able to create and start the client. Specifically, I need to supply the various arguments needed by both the My proposal is to add a SCIGemStoneClientConfigurationSpec class that is used to specify the necessary attributes for creating and starting the client and given the currently known attributes it would look like the following: SCIGemStoneClientConfigurationSpec {
#name : 'gciClient',
#clientVersion : 'Pharo-5.0',
#smalltalkCIConfig : '$GS_HOME/sys/local/pharo/gciClient.ston'
} In the current use case only the #clientVersion needs to be variable and would have a At the same time, I've hit some orthogonal requirements for being able to specify some configuration options for the stone itself, namely: gemConfPath and timeZone. In this case I propose to add a SCIGemStoneSystemConfigurationSpec class where stone-specific attributes may be specified and it would look like the following: SCIGemStoneSystemConfigurationSpec {
#stoneName : 'travis',
#gemConfPath : 'tests/gemstone/gem.conf',
#timeZone : 'Europe/Prague' } In the current use case all three of the attributes: #stoneName, #gemConfPath, and #timeZone; would have a Since clients are technically independent of the stones, the two configuration instances would be peers and a full SmalltalkCISpec {
#configuring: [
SCIGemStoneClientConfigurationSpec {
#name : 'gciClient',
#clientVersion : 'Pharo-5.0',
#smalltalkCIConfig : '$GS_HOME/sys/local/pharo/gciClient.ston' },
SCIGemStoneSystemConfigurationSpec {
#name : 'gciClientTest',
#gemConfPath : 'tests/gemstone/gem.conf',
#timeZone : 'Europe/Prague' }
],
#loading : ['...'],
#testing : {},
} If there is the likelihood that other platforms would need system configuration attributes specified, then perhaps an SCISystemConfigurationSpec class could be created for common attributes (perhaps #name?) Whew ... I know this is a lot, but as I have said, I have a couple of use cases that I am currently working on, so this is not based on conjecture, but real requirements .... So what do you think ... I will be starting work on this, because the projects needing this are at the top of my list (at the moment), but I want to hear what you think and we should definitely discuss alternatives --- shoot, I need to validate my assumptions about what is needed as well :) |
Have to think about this tomorrow. I will follow up asap |
I know its a lot to digest ... so thanks! |
…, SmalltalkCI class>>runCIFor:projectDirectory:, SmalltalkCI class>>testCIFor:projectDirectory: and supporting methods
Once again, I realized that I have very limited knowledge about GemStone, but I trust your judgement. I also understand you want to reference a config for the client in the system config (via SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'MySystemProject',
...
#platforms : [ #gemstone ]
},
SCIMetacelloLoadSpec {
#baseline : 'MyClientProject',
...
#platforms : [ #gemstoneClient ]
},
],
...
} This way you only have one config file. In addition, I'm not quite sold on the idea to be able to configure something in the smalltalkCI config file and then be able to override it using cmd line parameters and env vars. I'm also not sure how you want to use the options within the config file. Will you start a client from within the system GemStone image or how do you want to access these options within the bash script? Lots of questions, but I hope this is helpful. :) |
On 4/1/16 1:27 PM, Fabio Niephaus wrote:
Keep in mind that this is a rule of thumb. For example I don't think
Over the long haul, I expect that it will be useful to specify both the The second use case for the stone is the default TimeZone for the system In both of these cases, the developer cannot change the settings from [1]
For a Tugrik client, a tODE client is not used, so I must arrange to So the client must be run within the GsDevKit_home environment itself To be hosnest before SmalltalkCI came along and you invented the Dale |
For MongoDB, you might want to have a look at this as well. Sure, there is nothing wrong with using multiple STON configs, I just thought that for the system/client setup it might be handy to be able to also use just one file. I had no idea how many options there are for GemStone. I must admit that I never even had a look at the GemStone/S 64 Bit Programmer's Guide. But now I think it might be better to use a GemStone-specific config as well. One could provide this config via I'm also not quite sure yet how we could synchronize two builds (system and client). We could initiate two separate builds and tell the system build to keep the image open until the client build tells it to close the session. Multiple JUnit XML files within the build directory should already be picked up by the prettifier, so just make sure system and client tests generate a JUnit file each. ./run.sh -s GemStone system.ston client.ston Not sure if this would be helpful though. I'm glad that we're apparently able to solve a complex problem with this approach. I didn't invent anything myself here, I'd say that this was and continues to be a team effort. And as always, communication is the key ;) Having said that, I'm happy and flexible enough to jump on a quick video call if you think it'd be better to discuss this without writing yet another novel 😜 Fabio |
@fniephaus, I'm pretty comfortable with the basic solution that I have been proposing:
In the standard case, the When one runs smalltalkCI locally for either debugging a travis failure or using it as part of ones own local CI runs, the command line arguments are available for overriding any of If one wants to vary entries in the For GsDevKit_home, I am adopting the The important point here is:
I am trying to keep the GemStone-specific changes within the scope of smalltalkCI and travis and I think that my proposal does that ... |
…class>>testCIFor: and put calls into gemstone/run.sh ... add .smalltalk.ston file to args on createStone command
… GS_ prefix to avoid potential collisions with real GsDevKit_home env vars)
The above all sounds good to me, except that I haven't fully understood yet how you intend to trigger the client build using the second STON file defined in the first STON file. But I guess I will find out soon, since you are already working on it :) |
…o --gs-DEVKIT_BRANCH option
Good! I haven't quite figured out how myself ... part of it has to do with figuring out how to get the results displayed (sounds like I might have to arrange to use non-default xml log file names, or perhaps call |
… interface, so turn it off
… ensure the the gemstone _cache directories get unconditionally created ... add error handling for the case where copying to cache produces error
Maybe running a duo build already is such a special use case, so that we don't need to support three or more synchronous builds. By that I mean, maybe we can do both in one run of smalltalkCI which eliminates the need to overwrite |
Not sure what your point is here ... I have a relatively common use case (for GemStone) where I want to run both client and server tests in the same build using a single I'm just not sure what you are fretting about :) |
I was just thinking out loud 😄 and I guess my point was that I think it'd be enough to just add support for system/client duo tests to smalltalkCI and nothing more (e.g. my suggested |
Okay, I wan't paying that much attention to |
… custom directory
…nd servertests [ci skip]
…d servertests [ci skip]
…ncy cache is no longer correct ...
… USE dependency cache when working NON-STANDARD branch (i.e., a branch not shared by all builds)
fixed with PR #123 |
In Issue #29, I mentioned that I would eventually need this feature and at the time I figured that I could handle this requirement in GsDevKit_home and @fniephaus postulated that the following could be used to run the tests from travis:
However as I get into this in earnest, I am finding that things are not quite that simple.
To start with, here are the GsDevKit_home scripts that I'm using to create a Pharo client with the GemStone-GCI project loaded (NOTE: I am starting to use the
smalltalk.ston
file for more than just travis!!!):The file
$GS_HOME/sys/local/pharo/gciClient.ston
is basically the .smalltalk.ston file for GemStone-GCI, however, note that thesmalltalk.ston
file is not located in the GemStone-GCI git checkout.I actually have the above creation scripts "working", but I have to use the
.smalltalk.ston
file from the GemStone-GCI project to do the load ... and of course the tests are run as well because I have to use SmalltalkCI class>>runCIFor: -- it would be much more convenient if the creation protocol were a bit more diverse with the following additions to the class-side api:I expect that the GemStone-GCI
.travis.yml
file will eventually look like the following and allow me to test different combinations of clients and GemStone versions:This will also take some monkey business in the
gemstone/run.sh
implementation.I also have some proposals for extensions to the
smalltalk.ston
fields, but that will come in a separate messageThe text was updated successfully, but these errors were encountered: