On 2018-02-16, Scott Kostyshak wrote:
> On Fri, Feb 16, 2018 at 03:27:30PM +0000, Kornel Benko wrote:

>> > >>   Is there a chance, to test the lyx2lyx output with LyX 2.2, 2.1
>> > >>   and maybe even 1.6?
>> > > 
>> > > I don't think so. Remember, we only test with executables just created.
>> > 
>> > This is a pity. We should, at the very least test all 2.2-exported files
>> > with 2.2 before releasing 2.3!
>> > 
>> > Maybe we can add a simple script that opens all lyx22 files in
>> > autotests/out-home with lyx2.2 and reports failures (affected file(s) +
>> > eventual error/warning message).

>> Yes.

> I agree these tests could be useful and I have done this manually in the
> past (script to export to 2.2.x and then just copy those over to the
> 2.2.x directory and run ctests there). If I remember correctly, they did
> indeed find errors in lyx2lyx that the round-trip did not catch. What
> interface do you have in mind?

If I understand the system right, the ctests leave generated files in
"/autotests/out-home/", so instead of exporting via a script, we can
select the test documents with a pattern (e.g. the regexp
"/autotests/out-home/.*22.lyx" for LyX 2.2 documents) and then 

* feed them to LyX 2.2 in a script or
* copy them to a directory that is tested with lyx22 and ctest.

Maybe this is already sufficient. You should get an error for
lyx_2_3_test.22.lyx if everything is right because of the baselineskip
problem (unless it is reverted in the 2.2 test suite, too).

> Should we set the path to the LyX 2.2.x binary with an environment
> variable?

> If these tests are included in the ctest framework, we should not enable
> them by default because of the huge dependency. But it might be nice if
> we can figure out an easy way to put them in our ctest framework because
> that would make them easy to run. Maybe something like

>    -DLYX_CTESTS_22X=/path/to/lyx22x/binary

> to enable them? Otherwise (by default) they are not turned on. We could
> similarly have -DLYX_CTESTS_21X. I suppose that the ctests would have to
> take care of configuring with a separate user directory and all that.
> Seems complicated to me, but might be worth it?

> Thoughts?

Maybe just test for a binary lyx2.2, lyx2.1, and lyx1.6 executable in the ctest
set-up with cmake. This assumes that if a user has installed several LyX
verions with version suffix, he/she also cared for different user dirs etc.

Then, these test could run by default if the conditions are met.
If we give them a label, it would be easy to turn them off.

Whatever the final (or intermediate) outcome, it should be documented in



Reply via email to