Skip to content

Commit

Permalink
Tests: win build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Jul 13, 2021
1 parent 8cce05d commit 1f6fe3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tests/wmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ GTEST_API_ int main(int argc, char **argv)
{
int argc = 0;
QStringList args;
#if defined(_WIN32) && defined(UNICODE)
args << QString::fromWCharArray(argv[0]);
#else
args << QString::fromUtf8(argv[0]);
#endif
args << QString::fromUtf8("--clear-cache");
args << QString::fromUtf8("--clear-openfx-cache");
args << QString::fromUtf8("--no-settings");
Expand Down

3 comments on commit 1f6fe3d

@devernay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you got it!

@devernay
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

argument parsing was crazy:

  • even the executable name was parsed as an argument
  • unparsed arguments didn't trigger an error
  • an integer within comma anywhere on the command-line would be parsed as a frame range

There's still one big isse, which is that one option (I think it's -w) has an OPTIONAL SECOND ARGUMENT, which is crazy, so I left it for backward compat but added additional checks.
Also, "--" can now be used to mark the end of options and the beginning of positional arguments.

@rodlie
Copy link
Contributor Author

@rodlie rodlie commented on 1f6fe3d Jul 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that you was able to fix the argument parsing.

The Windows build got very delayed (up now), I noticed the build error just before I went to work, so I had to wait until after work do to anything, and then idiff deadlocked two times during the unit tests and I didn't notice so the build took probably 2 hours longer than needed.

Please sign in to comment.