On Tue, Oct 27, 2015 at 12:56 AM, Uwe Stöhr <uwesto...@web.de> wrote:
> Am 26.10.2015 um 16:51 schrieb Stephan Witt:
>
>> You missed the "Change to the build-directory." part of Kornels advice.
>>
>> I think "D:\LyXGit\Master\lib\examples" isn't your build directory or at
>> least it shouldn't be so.
>
>
> Thanks for this pointer. This works somehow but I still don't see if a test
> was passed or not. I only get this:
>
> D:\LyXGit\Master\compile-result>ctest -N
> Test project D:/LyXGit/Master/compile-result
>   Test   #1: frontends/test_biblio
>   Test   #2: support/convert
>   Test   #3: support/filetools
>   Test   #4: support/lstrings
>   Test   #5: support/trivstring
>   Test   #6: tex2lyx/roundtrip/test.ltx
>   Test   #7: tex2lyx/cmplyx/test.ltx
>   Test   #8: tex2lyx/roundtrip/algo2e.tex
> ...
>   Test #199: lyx2lyx/parser_tools
> Total Tests: 199
>
> Where is the result?

As Kornel said, "ctest -N" is to see all tests, which means that they
are not run. Next, he said to use "ctest" to run all tests.

>
> Now I want to test modernCV.lyx as proposed by Scott then I get
>
> D:\LyXGit\Master\compile-result>ctest -R "modernCV"
> Test project D:/LyXGit/Master/compile-result
> No tests were found!!!
>
> I find modernCV.lyx in a subfolder and switching to t and repeat doesn't
> help:
>
> D:\LyXGit\Master\compile-result\LYX_INSTALLED\Resources\examples>ctest -R
> "modernCV"
> Test project
> D:/LyXGit/Master/compile-result/LYX_INSTALLED/Resources/examples
> No tests were found!!!
>

If you would scroll back to the output of the "ctest -N" command, you
will find the test for modernCV:

...
Test #111: check_layout/moderncv.layout
...

If you then want to run this test you do:

"ctest -R check_layout/moderncv.layout"

As the last argument is actually interpreted as a regular expression,
you can use the shorter way:

"ctest -R moderncv"

Please note that you have to write "moderncv" in lower case, otherwise
it doesn't work. I'm not sure
why it works on linux with uppercase as well.

Besides this, I have to add "-C debug"  or "-C release" to avoid the
error "Test not available without
configuration. (Missing "-C <config>"?)".

So, to conclude, you should be able to run the test using:

"ctest -R moderncv -C debug" or "ctest -R moderncv -C release"


>>> If things are that easy why can't they be documented? That is why we have
>>> the Development.lyx file, no? There ctest is not mentioned.

I guess Development.lyx is rather new, I've not seen it yet.

>
> The point is that nothing is documented but people tell me what I make
> wrong. I feel like sitting behind a high wall of tests hindering me
> providing new features, even simple ones like layout improvements. And that
> is frustrating! I mean I can now not even do a simple fileformat change to
> change a module because I cannot run required tests. I am an experienced
> LyXer but it was never so complicated to contribute to LyX.
> This is a bad development in my opinion because we need devels on Windows.
>

I completely agree with you: if the tests are cannot be run easily for
all of us, it is unfair to
require to run the tests before committing everything. A test suite
with 6000 tests, that runs
for several days, requiring all possible kinds of dependencies, and
using a lot of linux-specific
scripting will not be very useful as a test that all developers should
run before each commit.

On the other hand, it is fair to make developers responsible for their
own commits. So, if
it can be avoided that a bug is introduced by running a single command
from the command line,
it makes sense to expect this from the developer.

Vincent

Reply via email to