Mailinglist Archive: yast-devel (36 mails)

< Previous Next >
[yast-devel] Executing our own code: inst-sys clients
While working on a bug related to the partitions_proposal client of y-storage-ng, I wondered why we don't have a simple way to call our own code.

I want to be able to start the stuff that I work on in my normal work environment.

I was told that "it just takes 4-5 lines of Ruby code", but that's not a useful answer; why don't we have a ready-made wrapper for those things if it's really so simple? I have no clue what I need to set up first before I can call that thing programatically. I need to see it in connection with the proposal because that's what it's used for.

We have a lot of infrastructure already in place:

- For storage scenarios, we have YAML files describing the existing disk setup; we use them in the unit tests.

- We have control XML files for all our products.

- We have a lot of AutoYaST files that we use for automated tests.

- We have an examples/ subdirectory in y-storage-ng, but that doesn't contain much.

It's a PITA to start a real installation and then modify the inst-sys with bind-mounts and whatnot, always copying files to that inst-sys after each change.

The easier we make it to call our code directly, the more it will be done which means much more thorough (manual!) testing, and the easier it will be to develop on that code.

Automated testing can only go so far; unit tests use a lot of mocking and assumptions, and OpenQA is limited in the number of scenarios that can reasonably be tested, and it isn't helpful for us during development: I need to see what I am doing, I can't wait for half a week for a test result, and I don't want to check in code that I never saw running (which for Ruby typically means that there will be one crash for every 3 lines of code written).

So, for simple things I propose we get into the habit of providing a simple example that can easily be called. Back when I wrote the UI, I did that for every single widget, and even in different degrees of difficulty and complexity: PushButton1.rb, PushButton2.rb, ...

This encourages people to execute the code, to see how it behaves, how it is supposed to be used, and to do some first level of testing. I don't know about you guys, but I cannot develop without that. Rspec and unit testing have limits, even more so with the arcane error messages that Rspec throws at you when you do anything wrong.

How can we get there? Don't you have the same problems? How do you develop code that will live in the inst-sys?

I suggest we set up a Jangouts call to discuss this.

Kind regards
Stefan Hundhammer <shundhammer@xxxxxxx>
YaST Developer

SUSE Linux GmbH
GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >