[opensuse-buildservice] Running testsuite only on local build?
Is it possible to check in the spec file whether I'm building with osc locally or in obs? Or whether it's in Factory or in my home project? The following did not work for me: # Enable testsuite runs for local builds %if 0%{?opensuse_bs} %define run_testsuite 0 %else %define run_testsuite 1 %endif It disabled the testsuite with osc as well. I want to run the testsuite for glibc not as part of openSUSE:Factory but have it run e.g. locally. How can I achieve this best? Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2012-04-06 13:03:52 +0200, Andreas Jaeger wrote:
Is it possible to check in the spec file whether I'm building with osc locally or in obs? Or whether it's in Factory or in my home project?
The following did not work for me: # Enable testsuite runs for local builds %if 0%{?opensuse_bs} %define run_testsuite 0 %else %define run_testsuite 1 %endif
It disabled the testsuite with osc as well.
I want to run the testsuite for glibc not as part of openSUSE:Factory but have it run e.g. locally. How can I achieve this best?
Hmm you could define the "testsuite" macro when running a local build: "osc build --define 'testsuite 1'" and in the spec just add something like this: %if 0%{?testsuite} # run testsuite %endif Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 04/06/2012 01:27 PM, Marcus Hüwe wrote:
On 2012-04-06 13:03:52 +0200, Andreas Jaeger wrote:
Is it possible to check in the spec file whether I'm building with osc locally or in obs? Or whether it's in Factory or in my home project?
The following did not work for me: # Enable testsuite runs for local builds %if 0%{?opensuse_bs} %define run_testsuite 0 %else %define run_testsuite 1 %endif
It disabled the testsuite with osc as well.
I want to run the testsuite for glibc not as part of openSUSE:Factory but have it run e.g. locally. How can I achieve this best?
Hmm you could define the "testsuite" macro when running a local build: "osc build --define 'testsuite 1'" and in the spec just add something like this: %if 0%{?testsuite} # run testsuite %endif
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite? Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 2012-04-06 16:56:45 +0200, Andreas Jaeger wrote:
On 04/06/2012 01:27 PM, Marcus Hüwe wrote:
On 2012-04-06 13:03:52 +0200, Andreas Jaeger wrote:
Is it possible to check in the spec file whether I'm building with osc locally or in obs? Or whether it's in Factory or in my home project?
The following did not work for me: # Enable testsuite runs for local builds %if 0%{?opensuse_bs} %define run_testsuite 0 %else %define run_testsuite 1 %endif
It disabled the testsuite with osc as well.
I want to run the testsuite for glibc not as part of openSUSE:Factory but have it run e.g. locally. How can I achieve this best?
Hmm you could define the "testsuite" macro when running a local build: "osc build --define 'testsuite 1'" and in the spec just add something like this: %if 0%{?testsuite} # run testsuite %endif
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite?
Of course you can also define this macro in your devel project (via "osc meta prjconf <devel project>"). Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite? have look at e.g. "gstreamer-0_10-plugins-ugly" spec. I do rebuild them on my local obs, but with options that are not allowed on obs. But the spec is already prepared for doing this. So I do not need to modify the spec. I just need to modify my "prjconf"
prjconf: %define BUILD_ORIG 1 %define BUILD_ORIG_ADDON 1 Macros: %BUILD_ORIG 1 %BUILD_ORIG_ADDON 1 Perhaps this is a good example. Cheers -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- Der ultimative shop für Sportbekleidung und Zubehör http://www.sc24.de ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 04/06/2012 06:14 PM, Christian wrote:
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite? have look at e.g. "gstreamer-0_10-plugins-ugly" spec. I do rebuild them on my local obs, but with options that are not allowed on obs. But the spec is already prepared for doing this. So I do not need to modify the spec. I just need to modify my "prjconf"
prjconf: %define BUILD_ORIG 1 %define BUILD_ORIG_ADDON 1
Macros: %BUILD_ORIG 1 %BUILD_ORIG_ADDON 1
thanks - but this does not seem to work for me in home:a_jaeger:my-factory-packages and package glibc I have set now in prjconf: %define glibc_run_testsuite 1 %define with_glibc_run_testsuite 1 %define _with_glibc_run_testsuite 1 And neither of the following works for me in glibc.spec: %bcond_with glibc_run_testsuite %if %{with glibc_run_testsuite} %define run_testsuite 1 %else %define run_testsuite 0 %endif %build %if %{with glibc_run_testsuite} echo glibc_run_testsuite is set %endif %if 0%{?glibc_run_testsuite} echo glibc_run_testsuite is defined %endif I want to have both in obs and my local build the testsuite running... Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Andreas Jaeger wrote:
On 04/06/2012 06:14 PM, Christian wrote:
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite? have look at e.g. "gstreamer-0_10-plugins-ugly" spec. I do rebuild them on my local obs, but with options that are not allowed on obs. But the spec is already prepared for doing this. So I do not need to modify the spec. I just need to modify my "prjconf"
prjconf: %define BUILD_ORIG 1 %define BUILD_ORIG_ADDON 1
Macros: %BUILD_ORIG 1 %BUILD_ORIG_ADDON 1
thanks - but this does not seem to work for me in home:a_jaeger:my-factory-packages and package glibc
You forgot the Macros part. ---->8---- %define _with_glibc_run_testsuite 1 Macros: %_with_glibc_run_testsuite 1 ---->8---- See also http://lizards.opensuse.org/2008/09/12/conditional-features-aka-use-flags/ cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wednesday, April 11, 2012 12:01:06 you wrote:
Andreas Jaeger wrote:
On 04/06/2012 06:14 PM, Christian wrote:
Thanks - but is there no way that everybody running it locally - or in the devel project - automatically gets to run the testsuite?
have look at e.g. "gstreamer-0_10-plugins-ugly" spec. I do rebuild them on my local obs, but with options that are not allowed on obs. But the spec is already prepared for doing this. So I do not need to modify the spec. I just need to modify my "prjconf"
prjconf: %define BUILD_ORIG 1 %define BUILD_ORIG_ADDON 1
Macros: %BUILD_ORIG 1 %BUILD_ORIG_ADDON 1
thanks - but this does not seem to work for me in home:a_jaeger:my-factory-packages and package glibc
You forgot the Macros part.
---->8----
%define _with_glibc_run_testsuite 1
Macros: %_with_glibc_run_testsuite 1
Those two lines above were indeed missing - thanks a lot! Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Am 06.04.2012 13:03, schrieb Andreas Jaeger:
Is it possible to check in the spec file whether I'm building with osc locally or in obs? Or whether it's in Factory or in my home project?
The following did not work for me: # Enable testsuite runs for local builds %if 0%{?opensuse_bs} %define run_testsuite 0 %else %define run_testsuite 1 %endif %bcond_with testsuite
%if 0%{?with testsuite} .... %endif then you can do on local builds osc build .... --with testsuite I used this several times on different perl packages. -- Christian ---------------------------------------------------- - Please do not 'CC' me on list mails. Just reply to the list :) ---------------------------------------------------- Der ultimative shop für Sportbekleidung und Zubehör http://www.sc24.de ---------------------------------------------------- -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Andreas Jaeger
-
Christian
-
Ludwig Nussel
-
Marcus Hüwe