[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Preserving configurable settings after GUI test
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Preserving configurable settings after GUI test |
Date: |
Sun, 29 Jul 2018 18:42:55 +0200 |
On Mon, 16 Jul 2018 16:09:34 +0000 Greg Chicares <address@hidden> wrote:
GC> On 2018-07-03 00:01, Vadim Zeitlin wrote:
GC> >
GC> > There is a long standing TODO item about preserving the contents of
GC> > configurable_settings.xml file after running the GUI unit test
GC> [...that's PR 88, which I'll look at soon (thanks); in addition...]
Hello,
I wanted to wait until the PR 88 would be dealt with before submitting the
next one but, finally, there doesn't seem to be any real point in doing it,
so I've created https://github.com/vadz/lmi/pull/89 which addresses the
issues below. I've tested this PR with both MSVS and official gcc-based
build system and all the tests pass for me.
GC> When you're back, could you also look into removing these five files:
GC> ABC.John_Brown.000000001.monthly_trace.tsv
Done in
https://github.com/vadz/lmi/pull/89/commits/9a1a7809f602d56d054cd7e31448a4d47d23fd1e
by adding a test for this file existence to the test creating it, which
also ensures that it is deleted at the end of this test. I don't know if
this test is really useful, but it seemed to be consistent to add it, as we
do test for this file existence in other output validation tests. Of
course, if you don't think it's needed, we could skip testing for the file
existence and keep just the code for removing it at the end of the test.
GC> testfile.mec.xml
GC> testfile.mec.tsv
GC> unnamed.gpt.xml
GC> testfile.gpt.xml
I've also done the same thing as above here, i.e. added tests for these
files existence as well as cleaning them up, see
https://github.com/vadz/lmi/pull/89/commits/0814702c69a16e672844bb816681f5ab69b77c16
In addition to relatively ugly use of an array of
output_file_existence_checker objects (but wouldn't creating and then
testing 4 of them in a row be even uglier?), here I'm even less sure if
this test is actually useful, but I thought it would be safer to add it now
if only to know when the behaviour changes if it does later.
Because I think we might want to change it: currently these "extra" .xml
and .tsv files are created in the current directory, and not the test
outputs one, and I wonder if this is correct. Shouldn't they be created in
the same directory as the main MEC/GPT file itself? This is hardly urgent,
of course, but, again, I think we might want to change this later and then
the new tests added by this PR should be useful, as they will remind us of
the need to update this testing code as well.
But, again, please let me know if you disagree and it will be simple
enough to remove these tests, of course.
Thanks,
VZ
Re: [lmi] Preserving configurable settings after GUI test, Greg Chicares, 2018/07/19