lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Thu, 7 Jul 2016 13:16:59 +0000 (UTC)

branch: master
commit e916413c223abd1ec6e198b2b856416851b6a4e4
Author: Gregory W. Chicares <address@hidden>
Date:   Thu Jul 7 13:11:43 2016 +0000

    Fix defect introduced 20160603T2129: disordered command-line parsing
    
    Prior to the 20160603T2129 commit, PreloadDesignatedDlls() had been
    called before the GUI test's special command-line preprocessing. That
    commit caused it to be called after preprocessing. However, it should
    not be called at all in the GUI test's main() function, which should
    instead let Skeleton::OnInit() call it.
---
 main_wx_test.cpp |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index 7d2add4..1054ee7 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -27,7 +27,6 @@
 #include "force_linking.hpp"
 #include "handle_exceptions.hpp"        // stealth_exception
 #include "main_common.hpp"              // initialize_application()
-#include "msw_workarounds.hpp"          // PreloadDesignatedDlls()
 #include "obstruct_slicing.hpp"
 #include "path_utility.hpp"             // initialize_filesystem()
 #include "skeleton.hpp"
@@ -900,23 +899,28 @@ void SkeletonTest::RunTheTests()
         }
 }
 
+/// Run automated GUI test.
+///
+/// Perform only the minimum necessary initialization that the lmi_wx
+/// main() function would do; then preprocess the command line, before
+/// calling wxEntry(), to handle and remove any GUI-test-specific
+/// options (which Skeleton::ProcessCommandLine() must not see).
+///
+/// Don't call PreloadDesignatedDlls() here. Skeleton::OnInit() must
+/// do that, because PreloadDesignatedDlls() instantiates class
+/// configurable_settings, which must not be instantiated before
+/// Skeleton::ProcessCommandLine() reads the '--data_path' option.
+
 int main(int argc, char* argv[])
 {
     initialize_application();
     initialize_filesystem();
 
-    // We need to handle test-specific options and remove them from argv before
-    // letting wxEntry() instantiate Skeleton application object that would
-    // give an error for these, unknown to it, options.
     if (!application_test::instance().process_command_line(argc, argv))
         {
         return 0;
         }
 
-#ifdef LMI_MSW
-    MswDllPreloader::instance().PreloadDesignatedDlls();
-#endif
-
     return wxEntry(argc, argv);
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]