[libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck

Daniel P. Berrangé posted 4 patches 7 years, 2 months ago
[libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Daniel P. Berrangé 7 years, 2 months ago
Running "make distcheck" ensures that we have CLEANFILES and uninstall
rules setup correctly, as well as validating VPATH builds succeeed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .travis.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 3f26a1eeee..4bdf034829 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,8 +6,13 @@ matrix:
   include:
     - compiler: gcc
       dist: precise
+    # Special scenario to run distcheck, so we don't waste time duplicating
+    # work in all the other scenarios. Doesn't work on precise due to the
+    # CVE-2012-3386 flaw being present on that Ubuntu version
     - compiler: gcc
       dist: trusty
+      script:
+      - make -j3 distcheck
     - compiler: clang
       dist: precise
     - compiler: clang
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Andrea Bolognani 7 years, 2 months ago
On Fri, 2018-02-23 at 12:00 +0000, Daniel P. Berrangé wrote:
> Running "make distcheck" ensures that we have CLEANFILES and uninstall
> rules setup correctly, as well as validating VPATH builds succeeed.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  .travis.yml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 3f26a1eeee..4bdf034829 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -6,8 +6,13 @@ matrix:
>    include:
>      - compiler: gcc
>        dist: precise
> +    # Special scenario to run distcheck, so we don't waste time duplicating
> +    # work in all the other scenarios. Doesn't work on precise due to the
> +    # CVE-2012-3386 flaw being present on that Ubuntu version
>      - compiler: gcc
>        dist: trusty
> +      script:
> +      - make -j3 distcheck
>      - compiler: clang
>        dist: precise
>      - compiler: clang

This will override the default script, and make it so the
precise/gcc build only runs distcheck rather than the usual all,
check, syntax-check. So we need something else.

My first idea was to have something like

  matrix:
    include:
      - compiler: gcc
        dist: precise
        env:
          - OS=precise
      - compiler: gcc
        dist: trusty
        env:
          - OS=trusty
      - compiler: clang
        dist: precise
        env:
          - OS=precise
      - compiler: clang
        dist: trusty
        env:
          - OS=trusty
      - compiler: clang
        os: osx
        env:
          - OS=macos
  
  script:
    - make -j3 && if [ "$OS" != "macos" ]; then make -j3 syntax-check && make -j3 check; fi && if [ "$OS" = "trusty" ]; then make -j3 distcheck; fi

with the new env variable being introduced because, for whatever
reason, Travis defines $TRAVIS_OS_NAME for telling Linux and macOS
apart but no equivalent for telling precise and trusty apart :/

However, I've later realized that precise has already been EOL'd
for almost a year and is already in the process of being (slowly)
decommissioned on Travis too. So I say just rip out the damn
obsolete thing already and move on with our lives :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 04:02:19PM +0100, Andrea Bolognani wrote:
> On Fri, 2018-02-23 at 12:00 +0000, Daniel P. Berrangé wrote:
> > Running "make distcheck" ensures that we have CLEANFILES and uninstall
> > rules setup correctly, as well as validating VPATH builds succeeed.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >  .travis.yml | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/.travis.yml b/.travis.yml
> > index 3f26a1eeee..4bdf034829 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -6,8 +6,13 @@ matrix:
> >    include:
> >      - compiler: gcc
> >        dist: precise
> > +    # Special scenario to run distcheck, so we don't waste time duplicating
> > +    # work in all the other scenarios. Doesn't work on precise due to the
> > +    # CVE-2012-3386 flaw being present on that Ubuntu version
> >      - compiler: gcc
> >        dist: trusty
> > +      script:
> > +      - make -j3 distcheck
> >      - compiler: clang
> >        dist: precise
> >      - compiler: clang
> 
> This will override the default script, and make it so the
> precise/gcc build only runs distcheck rather than the usual all,
> check, syntax-check. So we need something else.

Yes, that's intentional and not a problem IMHO.

'check' is run as part of 'distcheck' so that's a non-issue.

Running syntax-check in all 5 scenarios isn't buying us anything,
as the syntax-check rules don't depend on what is installed in the
host. IOW, running syntax-check in 1 scenario is sufficient to get
us the coverage we need. 

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Andrea Bolognani 7 years, 2 months ago
On Tue, 2018-02-27 at 15:06 +0000, Daniel P. Berrangé wrote:
> > >      - compiler: gcc
> > >        dist: precise
> > > +    # Special scenario to run distcheck, so we don't waste time duplicating
> > > +    # work in all the other scenarios. Doesn't work on precise due to the
> > > +    # CVE-2012-3386 flaw being present on that Ubuntu version
> > >      - compiler: gcc
> > >        dist: trusty
> > > +      script:
> > > +      - make -j3 distcheck
> > 
> > This will override the default script, and make it so the
> > precise/gcc build only runs distcheck rather than the usual all,
> > check, syntax-check. So we need something else.
> 
> Yes, that's intentional and not a problem IMHO.
> 
> 'check' is run as part of 'distcheck' so that's a non-issue.
> 
> Running syntax-check in all 5 scenarios isn't buying us anything,
> as the syntax-check rules don't depend on what is installed in the
> host. IOW, running syntax-check in 1 scenario is sufficient to get
> us the coverage we need.

Okay, fair enough. The change still "obfuscates" the Travis
configuration though, because now you can't just look at a single
script entry but you have to explode the matrix in your head and
convince yourself you're covering all bases, so I'm not too happy
with it.

Moreover, there was a whole thing about just dropping support for
precise (as Canonical already did) and making our lives easier
later in the mail, but you snipped it without replying...

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 04:35:32PM +0100, Andrea Bolognani wrote:
> On Tue, 2018-02-27 at 15:06 +0000, Daniel P. Berrangé wrote:
> > > >      - compiler: gcc
> > > >        dist: precise
> > > > +    # Special scenario to run distcheck, so we don't waste time duplicating
> > > > +    # work in all the other scenarios. Doesn't work on precise due to the
> > > > +    # CVE-2012-3386 flaw being present on that Ubuntu version
> > > >      - compiler: gcc
> > > >        dist: trusty
> > > > +      script:
> > > > +      - make -j3 distcheck
> > > 
> > > This will override the default script, and make it so the
> > > precise/gcc build only runs distcheck rather than the usual all,
> > > check, syntax-check. So we need something else.
> > 
> > Yes, that's intentional and not a problem IMHO.
> > 
> > 'check' is run as part of 'distcheck' so that's a non-issue.
> > 
> > Running syntax-check in all 5 scenarios isn't buying us anything,
> > as the syntax-check rules don't depend on what is installed in the
> > host. IOW, running syntax-check in 1 scenario is sufficient to get
> > us the coverage we need.
> 
> Okay, fair enough. The change still "obfuscates" the Travis
> configuration though, because now you can't just look at a single
> script entry but you have to explode the matrix in your head and
> convince yourself you're covering all bases, so I'm not too happy
> with it.

I don't think we've got so many different scenarios here that understanding
it is a real problem

> Moreover, there was a whole thing about just dropping support for
> precise (as Canonical already did) and making our lives easier
> later in the mail, but you snipped it without replying...

Opps, I'm not in favour of dropping precise, because I think it is useful
to get coverage on older distros. Travis is what I use for testing complex
patch series before submission, so I like it to have a useful mix of vintage
OSs, not only the very latest that is largely the same as what I build on
locally already.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Andrea Bolognani 7 years, 2 months ago
On Tue, 2018-02-27 at 15:41 +0000, Daniel P. Berrangé wrote:
> > > Running syntax-check in all 5 scenarios isn't buying us anything,
> > > as the syntax-check rules don't depend on what is installed in the
> > > host. IOW, running syntax-check in 1 scenario is sufficient to get
> > > us the coverage we need.
> > 
> > Okay, fair enough. The change still "obfuscates" the Travis
> > configuration though, because now you can't just look at a single
> > script entry but you have to explode the matrix in your head and
> > convince yourself you're covering all bases, so I'm not too happy
> > with it.
> 
> I don't think we've got so many different scenarios here that understanding
> it is a real problem

It's not a massive hurdle, but it's still cognitive load that
I'd rather not have to take on. See my first reply for a way of
achieving the same result in a much more explicit and easy to
grasp manner.

> > Moreover, there was a whole thing about just dropping support for
> > precise (as Canonical already did) and making our lives easier
> > later in the mail, but you snipped it without replying...
> 
> Opps, I'm not in favour of dropping precise, because I think it is useful
> to get coverage on older distros. Travis is what I use for testing complex
> patch series before submission, so I like it to have a useful mix of vintage
> OSs, not only the very latest that is largely the same as what I build on
> locally already.

Support for precise is going to be dropped by Travis in two months
either way:

  https://blog.travis-ci.com/2017-08-31-trusty-as-default-status

So we can keep it around for the time being if you want, but we're
going to have this very same conversation again pretty soon :)

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/4] travis: add a scenario for running make distcheck
Posted by Daniel P. Berrangé 7 years, 2 months ago
On Tue, Feb 27, 2018 at 04:53:17PM +0100, Andrea Bolognani wrote:
> On Tue, 2018-02-27 at 15:41 +0000, Daniel P. Berrangé wrote:
> > > > Running syntax-check in all 5 scenarios isn't buying us anything,
> > > > as the syntax-check rules don't depend on what is installed in the
> > > > host. IOW, running syntax-check in 1 scenario is sufficient to get
> > > > us the coverage we need.
> > > 
> > > Okay, fair enough. The change still "obfuscates" the Travis
> > > configuration though, because now you can't just look at a single
> > > script entry but you have to explode the matrix in your head and
> > > convince yourself you're covering all bases, so I'm not too happy
> > > with it.
> > 
> > I don't think we've got so many different scenarios here that understanding
> > it is a real problem
> 
> It's not a massive hurdle, but it's still cognitive load that
> I'd rather not have to take on. See my first reply for a way of
> achieving the same result in a much more explicit and easy to
> grasp manner.
> 
> > > Moreover, there was a whole thing about just dropping support for
> > > precise (as Canonical already did) and making our lives easier
> > > later in the mail, but you snipped it without replying...
> > 
> > Opps, I'm not in favour of dropping precise, because I think it is useful
> > to get coverage on older distros. Travis is what I use for testing complex
> > patch series before submission, so I like it to have a useful mix of vintage
> > OSs, not only the very latest that is largely the same as what I build on
> > locally already.
> 
> Support for precise is going to be dropped by Travis in two months
> either way:
> 
>   https://blog.travis-ci.com/2017-08-31-trusty-as-default-status
> 
> So we can keep it around for the time being if you want, but we're
> going to have this very same conversation again pretty soon :)

Actually we should not wait until then, as it leaves our stable branches
with a travis config that would not work and would need fixing. So we
should drop it now really

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list