Am Donnerstag, 31. Dezember 2015 um 19:33:59, schrieb Georg Baum 
<georg.b...@post.rwth-aachen.de>
> Scott Kostyshak wrote:
> 
> > The test fails after doing lyx2lyx:
> > 
> > cd lib/examples/fr
> > lyx -e lyx21x Foils.lyx
> > mv Foils.21.lyx Foils.lyx
> > 
> > After doing a (manual) bisect, I narrowed the failure down to the 500 vs.
> > 501 format change:
> > 
> > cd lib/examples/fr && git checkout Foils.lyx &&
> > /home/scott/lyxbuilds/master/repo/lib/lyx2lyx/lyx2lyx -t 501 Foils.lyx >
> > Foils.501.lyx && /home/scott/lyxbuilds/master/repo/lib/lyx2lyx/lyx2lyx -t
> > 500 Foils.lyx > Foils.500.lyx
> > 
> > When I copy Foils.501.lyx to Foils.lyx and then run the tests, the tests
> > pass. When I copy Foils.500.lyx to Foils.lyx and then run the tests, the
> > tests fail.
> > 
> > I don't know if the difference comes from our testing framework or lyx2lyx
> > or LyX.
> 
> OK, now I understand (thanks also to Kornel for the explanation).
> 
> This is what happens: When converting from 500 to 501, the font settings of 
> the not used flavour are filled in from the fontdefaults list in lyx_2_2.py. 
> Thus, after a 503->500->503 roundtrip, you get the attached patch, which 
> makes the tests fail.
> 
> This is not a bug. The conversion 501->500 must be lossy, since the format 
> 500 is not able to store the font information of the "not used" flavour. 
> Therefore, the only exports which are guaranteed to work after a conversion 
> to format 500 are the ones of the used flavour (\use_non_tex_fonts false or 
> true). The other flavour may fail.

This is not causing problems for test. In fact, we do not try to export to 
pdf/dvi
on such converted lyx files.

> IMHO it does not make sense to blindly test more and more combinations of 
> conversions of the existing documents.

The recursive export test with lyx??x has proven to be helpful (uncovering some 
lyx2lyx bugs).

> I would rather put the energy in 
> creating dedicated tests, e.g. for each lyx2lyx step.

What we have now is _one_ step in this direction.

> I must admit that I do 
> not understand the current test strategy anymore, since there are several 
> categories, and the test code became so complicated (e.g. running lyx2lyx in 
> a loop or automagically changing document settings).

1.) loop:
        What we do is (in checking lyx21x)
                export xx.lyx to xx.21.lyx
                export xx.21.lyx to xx.21.21.lyx
                        1a) uses lyx2lyx to convert to newest lyx format
                        1b) checks if xx.21.lyx is loadable
                stop loop if xx.21.lyx is identical to xx.21.21.lyx
2.) changing document settings:
        for system fonts this was needed for older lyx versions. Now, if the 
system fonts are specified in the
        lyx-file, it is not done.
        
> Georg

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to