Am Montag, 10. Oktober 2016 um 19:44:09, schrieb Kornel Benko <kor...@lyx.org>
> Am Montag, 10. Oktober 2016 um 09:56:00, schrieb Scott Kostyshak 
> <skost...@lyx.org>
> > On Mon, Oct 10, 2016 at 07:56:39AM +0000, Guenter Milde wrote:
> >
> > > > Difficult.
> > >
> > > Then the debug output for inverted and suspended tests would be fine as
> > > workaround until we have the "keep the tempdir" option.
> >
> > +1
> >
> > Also note that it is easy to turn the -dbg on. For example, you might
> > want to do something like this:
> >
> > 1. run all ctests
> > 2. apply local patch that uses "-dbg latex" for all tests (basically
> >    just remove the "if" in Kornel's current patch)
> > 3. ctest --rerun-failed
> > 4. revert local patch that turns debugging on (just to make sure it is
> >    not accidentally committed).
> >
> > If it would help, I could make a script that does the above.
>
> Since ctest runs our cmake scripts, it is also possible to depend on 
> environment.
> I am reluctant though, making test results even more depending.
>
> > Scott

Try this patch. Setting env var LYX_DEBUG_LATEX to '1' will produce logs with 
latex.
No change of logs if set to '0' or not set at all.

        Kornel
diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake
index 09e7ec7..fea5e25 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -126,10 +126,15 @@ if (extension MATCHES "\\.lyx$")
     set(LYX_SOURCE ${result_file_name})
   endforeach()
 else()
-  message(STATUS "Executing ${lyx} -userdir \"${LYX_TESTS_USERDIR}\" -E ${format} ${result_file_name} \"${LYX_SOURCE}\"")
+  if ($ENV{LYX_DEBUG_LATEX})
+    set(LatexDebugParam -dbg latex)
+  else()
+    set(LatexDebugParam)
+  endif()
+  message(STATUS "Executing ${lyx} ${LatexDebugParam} -userdir \"${LYX_TESTS_USERDIR}\" -E ${format} ${result_file_name} \"${LYX_SOURCE}\"")
   file(REMOVE ${result_file_name})
   execute_process(
-    COMMAND ${lyx} -userdir "${LYX_TESTS_USERDIR}" -E ${format} ${result_file_name} "${LYX_SOURCE}"
+    COMMAND ${lyx} ${LatexDebugParam} -userdir "${LYX_TESTS_USERDIR}" -E ${format} ${result_file_name} "${LYX_SOURCE}"
     RESULT_VARIABLE _err)

   #check if result file created

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

Reply via email to