Mailinglist Archive: yast-devel (100 mails)

< Previous Next >
Re: [yast-devel] Change in yast-rake and fragile tests
On Tue, 20 Jan 2015 12:51:08 +0100
Ancor Gonzalez Sosa <ancor@xxxxxxx> wrote:

On 01/20/2015 12:24 PM, Ancor Gonzalez Sosa wrote:
On 01/15/2015 05:53 PM, Ancor Gonzalez Sosa wrote:
This change introduced in our test:unit task has caused the tests
in yast-yast2 to break.

It's actually not a fault of the change in the task. The problem
is that the tests are fragile because they pollute the global
namespace in several ways. To be honest, I'd expect test from some
other repositories to also break. Specially those written when we
were still newbies with RSpec.

I did some changes in order to fix it but found another problem.
Here is the patch, not intended to enhance or refactor the tests
in any way, just to fix the minimum needed to make them run again.

The weird thing is that I needed to introduce the line marked with
a FIXME, which means that closing the default SCR is not as secure
as all our tests assume. Looking at the yast2-core source code I'd
say that the line is actually needed and we need to update quite
some tests and the documentation. But it's the core, so of course
I could be wrong.

That's the question I was trying to open in the phone call. We need
to fix the broken tests in yast-yast2 and, for sure, in many other
modules. How to proceed about the branches?

1) For maintenance branches like SLE12 and 13.2

Do we want to fix it?

They work with the version of yast-rake present in SLE12 and 13.2,
but we cannot run "rake test:unit" for those branches with
yast-rake>0.1.8 (in Tumbleweed at the moment).

I think as long as fix works with both version of yast-rake we should
backport it to maintenance branches, so it will work without problems.
For me it is bug, not feature of old versions :)

2) For master

We have to fix it (not a question) but I think that fixing, for
example, chrooting of SCR in every single module is wrong. We need
to extract this functionality to the ruby bindings and then use
them in the different modules. So in my opinion it's time to
introduce RSpec helpers for SCR in the ruby bindings.

Like this, that I will commit to the proper repositories/branches once
we answer the question above.

I agree. It should be in ruby bindings, but as I commented, it is not
so easy to do it properly generic. So maybe we start with small one and
then extending it. I prefer to have it close for changes and open for
extension principle here, as this should be really backward compatible,
otherwise every change can cause breakage of all testsuite, which I
would like to avoid.

3) For both (or only for master if we decide not to fix maint.

Do we want to fix all the modules right now or only yast-yast2 and
wait to see errors in the rest? Keep in mind that in order to
experiment the errors you need to be using yast-rake>0.1.8 so the
errors could persist unnoticed for quite some time unless we all
update the dev tools.


As long as we can release and deliver yast to users and customers it is
not so critical. So I think we can go with evolution way, not
revolution which changes it in all modules. Maybe we just need to check
it for new code...BTW what version use travis? It should use latest,

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >