Skip to content
Snippets Groups Projects
  1. Feb 07, 2012
    • Nat Goodspeed's avatar
      Use os.path.normcase(os.path.normpath()) when comparing directories. · 32e11494
      Nat Goodspeed authored
      Once again we've been bitten by comparison failure between "c:\somepath" and
      "C:\somepath". Normalize paths in both Python helper scripts to make that
      comparison more robust.
      32e11494
    • Nat Goodspeed's avatar
      On Linux, #undef Status: we use that name for nested LLProcess struct. · 5d2bb536
      Nat Goodspeed authored
      Apparently something in the Linux system header chain #defines a macro Status
      as 'int'. That's just Bad in C++ land. It should at the very least be a
      typedef! #undefining it in llprocess.h permits the viewer to build.
      5d2bb536
    • Nat Goodspeed's avatar
    • Nat Goodspeed's avatar
      Convert LLProcess implementation from platform-specific to using APR. · aafb03b2
      Nat Goodspeed authored
      Include logic to engage Linden apr_procattr_autokill_set() extension: on
      Windows, magic CreateProcess() flag must be pushed down into apr_proc_create()
      level. When using an APR package without that extension, present
      implementation should lock (e.g.) SLVoice.exe lifespan to viewer's on Windows
      XP but probably won't on Windows 7: need magic flag on CreateProcess().
      Using APR child-termination callback requires us to define state (e.g.
      LLProcess::RUNNING). Take the opportunity to present Status, capturing state
      and (if terminated) rc or signal number; but since most of the time all caller
      really wants is to log the outcome, also present status string, encapsulating
      logic to examine state and describe exited-with-rc vs. killed-by-signal.
      New Status logic may report clearer results in the case of a Windows child
      process killed by exception.
      Clarify that static LLProcess::isRunning(handle) overload is only for use when
      the original LLProcess object has been destroyed: really only for unit tests.
      We necessarily retain our original platform-specific implementations for just
      that one method. (Nonstatic isRunning() no longer calls static method.)
      Clarify log output from llprocess_test.cpp in a couple places.
      aafb03b2
  2. Feb 06, 2012
  3. Feb 03, 2012
  4. Jan 30, 2012
  5. Jan 27, 2012
    • Nat Goodspeed's avatar
      On Windows, only quote LLProcess arguments if they seem to need it. · 27df0a84
      Nat Goodspeed authored
      On Posix platforms, the OS argument mechanism makes quoting/reparsing
      unnecessary anyway, so this only affects Windows.
      Add optional 'triggers' parameter to LLStringUtils::quote() (default: space
      and double-quote). Only if the passed string contains a character in
      'triggers' will it be double-quoted.
      This is observed to fix a Windows-specific problem in which plugin child
      process would fail to start because it wasn't expecting a quoted number.
      Use LLStringUtils::quote() more consistently in LLProcess implementation for
      logging.
      27df0a84
  6. Jan 23, 2012
  7. Jan 22, 2012
  8. Jan 21, 2012
  9. Jan 20, 2012
  10. Jan 19, 2012
  11. Jan 18, 2012
  12. Jan 17, 2012
    • Nat Goodspeed's avatar
    • Nat Goodspeed's avatar
      Refactor llprocesslauncher_test.cpp for better code reuse. · 2ae9f921
      Nat Goodspeed authored
      Instead of free python() and python_out() functions containing a local
      temporary LLProcessLauncher instance, with a 'tweak' callback param to
      "do stuff" to that inaccessible object, change to a PythonProcessLauncher
      class that sets up a (public) LLProcessLauncher member, then allows you to
      run() or run() and then readfile() the output. Now you can construct an
      instance and tweak to your heart's content -- without funky callback syntax --
      before running the script.
      Move all such helpers from TUT fixture struct to namespace scope. While
      fixture-struct methods can freely call one another, introducing a nested class
      gets awkward: constructor must explicitly require and bind a fixture-struct
      pointer or reference. Namespace scope solves this.
      (Truthfully, I only put them in the fixture struct originally because I
      thought it necessary for calling ensure() et al. But ensure() and friends are
      free functions; need only qualify them with tut:: namespace.)
      2ae9f921
    • Nat Goodspeed's avatar
      Any proper RAII class must either handle copying or be noncopyable. · 51b26cab
      Nat Goodspeed authored
      NamedTempFile makes no attempt to deal with copying, therefore make it
      noncopyable.
      51b26cab
    • Nat Goodspeed's avatar
      Add first couple of LLProcessLauncher tests. · 74fbd318
      Nat Goodspeed authored
      Run INTEGRATION_TEST_llprocesslauncher using setpython.py so we can find the
      Python interpreter of interest.
      Introduce python() function to run a Python script specified using
      NamedTempFile conventions.
      Introduce a convention by which we can read output from a Python script using
      only the limited pre-January-2012 LLProcessLauncher API. Introduce
      python_out() function to leverage that convention.
      Exercise a couple of LLProcessLauncher methods using all the above.
      74fbd318
    • Nat Goodspeed's avatar
      Add log message if LLProcessLauncher child fails to execv(). · c0731c1c
      Nat Goodspeed authored
      On a Posix platform (vfork()/execv() implementation), if for any reason the
      execv() failed (e.g. executable not on PATH), the viewer would never know, nor
      the user: the vfork() child produced no output, and terminated with rc 0! Add
      logging, make child terminate with nonzero rc.
      Remove pointless addArgument(const char*) overload: this does nothing for you
      that the compiler won't do implicitly.
      In llupdateinstaller.cpp, remove pointless c_str() call in addArgument() arg:
      we were starting with a std::string, then extracting its c_str(), only to
      construct a whole new std::string from it!
      c0731c1c
    • Nat Goodspeed's avatar
  13. Jan 13, 2012
    • Nat Goodspeed's avatar
      Extract APR and temp-fixture-file helper code to indra/test. · b6a08ad0
      Nat Goodspeed authored
      Specifically:
      Introduce ManageAPR class in indra/test/manageapr.h. This is useful for a
      simple test program without lots of static constructors.
      Extract NamedTempFile from llsdserialize_test.cpp to indra/test/
      namedtempfile.h. Refactor to use APR file operations rather than platform-
      dependent APIs.
      Use NamedTempFile for llprocesslauncher_test.cpp.
      b6a08ad0
Loading