redundant cprotect's

Udicoudco udifoglle at gmail.com
Fri Sep 29 21:06:18 UTC 2023


On Thu, Sep 28, 2023 at 6:19 PM Scott Kostyshak <skostysh at lyx.org> wrote:
>
> On Thu, Sep 28, 2023 at 04:34:45PM +0300, Udicoudco wrote:
> > Hello all,
> >
> > Can anyone think of a simple case where cprotect is used?
> > I think we have some redundant cases where we can remove
> > the protection (such as before \L or \R because they don't really
> > take an argument), and I want to test that.
>
> We have some test documents. Do you by chance use CMake to build LyX? If
> so, add the flag "-DLYX_ENABLE_EXPORT_TESTS=ON" in your 'cmake' call
> (unfortunately this flag adds some time, e.g., 20 seconds) and then you
> can run:
>
>   ctest -R "cprotect"
>
> First run that to confirm the tests currently pass for you (all 30 do
> for me).
>
> Then make the code change and run those tests again.
>
> Those tests took just 42 seconds to run serially, but if you want to
> speed things up, you can run them in parallel, e.g.:
>
>   ctest -j8 -R "cprotect"
>
> This took 10 seconds.
>
> If something in the above process doesn't work, let us know and we can
> try to figure it out. I think only Kornel and I have been running the
> ctests so it would be great to have other testers.

I don't yet tried to use CMake to build LyX, But I'm actually plan to do
a fresh install on my windows machine. I've read that it is recommended
to use CMake to build LyX on windows, so I'll almost surely give it a try.
Hopefully I'll be able to set up a proper environment without any troubles.
Thanks for all the details!

> If you don't want to use the ctests, you can also search the repository
> for "cprotect" to find the test documents. It would be great to have
> some test documents in Hebrew if you can contribute some. Currently, I
> think our tests only check compilation errors. i.e., they don't check
> that the appearance is correct.

I'm not sure I follow. Did you mean that the current Hebrew test files
only test for compilation errors? or that in general, if I would like
to contribute
some test files, the appearance is not a factor for the document?

How do the tests check for errors? Does the .log file get parsed
somehow or we are
only interested in major errors and not warning?

Best regards,
Udi

> --
> lyx-devel mailing list
> lyx-devel at lists.lyx.org
> http://lists.lyx.org/mailman/listinfo/lyx-devel


More information about the lyx-devel mailing list