Improve gmx help -export Sphinx rebuild behavior
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 29 Jun 2015 10:43:11 +0000 (13:43 +0300)
committerKasson <kasson@gmail.com>
Sun, 5 Jul 2015 21:28:21 +0000 (23:28 +0200)
commit81671a3f5d59edb62e64e8e07953f40f4d352caa
tree6f3bbd74b871f22d3d9f645f1e492ad462bc6799
parent812ab9cc9fc5380bd3ffcae9a10dff8a964fda21
Improve gmx help -export Sphinx rebuild behavior

Make 'gmx help -export rst' only touch those files whose contents have
actually changed.  This means that rerunning Sphinx is much faster when,
e.g., checking the help text for a single tool after fixes.

Use the file output redirection mechanism to capture all output into
intermediate buffers, and only write it to a file if that file is
missing or has incorrect contents.

Update the reference data to avoid future confusion, as the files are
now written out in a different order (but the tests pass irrespective of
the order of the stuff in the reference data).

Change-Id: I41d764e16aa68a5aaa7da879f4b600e268ca70f2
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/tests/refdata/CommandLineHelpModuleTest_ExportsHelp.xml