Re: [PATCH osinfo-db] tests: Simplify 'make check'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2019-03-22 at 08:26 +0100, Fabiano Fidêncio wrote:
> Cole,
> 
> On Thu, Mar 21, 2019 at 7:51 PM Cole Robinson <crobinso@xxxxxxxxxx>
> wrote:
> > Strip out everything except: python3 -m pytest --log-level=info
> > 
> > * Per test log files are dropped entirely. This was just capturing
> >   the same test output we get from stdout and saving it. IMO just
> >   depending on stdout is good enough
> > * pytest  will scoop up all the test files and run them in one
> > batch.
> > * 'make' will print the command before running, so any users will
> > see
> >   how to invoke the tests manually if they want to add pytest
> > options.
> > * Missing python3 or pytest module will generate an error, no need
> > to
> >   report a custom message to the user
> > 
> > Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> > ---
> > This can go in before my --network-tests patch
> > 
> >  .gitignore |  1 -
> >  Makefile   | 10 +---------
> >  2 files changed, 1 insertion(+), 10 deletions(-)
> > 
> > diff --git a/.gitignore b/.gitignore
> > index 938a7b9..b3213af 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -7,7 +7,6 @@ data/*/*/*.xml
> >  data/*/*/*/*.xml
> >  data/schema/osinfo.rng
> >  tests/__pycache__
> > -tests/*.log
> >  .pytest_cache
> >  *~
> >  #*
> > diff --git a/Makefile b/Makefile
> > index d66ff2a..0f0db11 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -121,14 +121,6 @@ update-po:
> >          done
> > 
> >  unit-tests: $(DATA_FILES) $(SCHEMA_FILES)
> > -       @command -v $(PYTHON) > /dev/null; \
> > -       if [ $$? -eq 0 ] ; then \
> > -         for file in tests/test_*.py; do \
> > -           log_file=`echo $$file | $(SED) -e 's/\.py/.log/'`; \
> > -           $(PYTHON) -m pytest -s $$file --log-level=info | $(TEE)
> > $$log_file; \
> > -         done; \
> > -       else \
> > -         echo "unit-tests are not going to be executed as no
> > $(PYTHON) has been found"; \
> > -       fi
> > +       $(PYTHON) -m pytest --log-level=info
> 
> I'll go a little bit further here. We could just remove the unit-
> tests
> target and leave the $(PYTHON) -m pytest --log-level=info and the
> check target.

I've pushed this one with the modification mentioned and also have
pushed the 7/7 from the previous series.

> 
> >  check: unit-tests
> > --
> > 2.21.0
> > 
> > _______________________________________________
> > Libosinfo mailing list
> > Libosinfo@xxxxxxxxxx
> > https://www.redhat.com/mailman/listinfo/libosinfo
> 
> Best Regards,
> --
> Fabiano Fidêncio

Best Regards,
-- 
Fabiano Fidêncio

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux