Commit Graph

23 Commits (fee07bb597a64489b8e4bca8513ebd2afd9e7b6e)

Author SHA1 Message Date
Nat Goodspeed fee07bb597 Try again to pacify VS fatal warning. 2011-07-15 14:24:37 -04:00
Nat Goodspeed 4b21954729 Muzzle VS warning 2011-07-15 14:02:45 -04:00
Nat Goodspeed 7341e01ce2 Add test to verify Python-to-C++ LLSD notation sequence.
Verify that an LLSD::String containing newlines works; verify that newlines
between items are accepted.
2011-07-15 12:42:49 -04:00
Nat Goodspeed c33cf379f2 Add test to verify C++-to-Python LLSD notation sequence.
Write a sequence of LLSDSerialize::toNotation() calls separated by newlines to
a data file, then read lines and parse using llbase.llsd.parse(). Verify that
this produces expected data even when one item is a string containing newlines.
Generalize python() helper function to allow using any of the NamedTempFile
constructor forms.
Allow specifying expected Python rc (default 0) and use this to verify an
intentional sys.exit(17). This is better than previous sys.exit(0) test
because when, at one point, NamedTempFile failed to write file data, running
Python on an empty script file still terminates with rc 0. A nonzero rc
verifies that we've written the file, that Python is running it and that we're
retrieving its rc.
2011-07-15 11:53:05 -04:00
Nat Goodspeed e3b5d9fc5c Change NamedTempScript to NamedTempFile; allow streaming to it.
The only thing about NamedTempScript that was specific to script files was the
hardcoded ".py" extension. Renaming it to NamedTempFile with an explicit
extension argument addresses that.
Allow constructing NamedTempFile with either a std::string, as before, or an
expression of the form (lambda::_1 << some << stuff). If Linden's Boost
package included the Boost.Iostreams lib, we could even stream such an
expression directly to an ostream constructed around the fd. But oh well.
2011-07-15 10:48:46 -04:00
Nat Goodspeed 1f58cd688f Pacify Linux gcc more thoroughly. 2011-07-14 20:20:35 -04:00
Nat Goodspeed 9f66409b88 #include correct headers for Windows _open() et al.
Also mollify Linux build, which gets alarmed when you implicitly ignore
write()'s return value. Ignore it explicitly.
2011-07-14 19:39:32 -04:00
Nat Goodspeed 5f37ec3c71 Avoid Boost.Filesystem: Boost package improperly built on Windows?
Seems Linden's Boost package and the viewer build might use different
settings of the /Zc:wchar_t switch.
Anyway, this implementation using open(O_CREAT | O_EXCL) should be more
robust. I'm surprised Boost.Filesystem doesn't seem to offer "create a unique
file"; all I found was "generate a random filename fairly likely to be unique."
2011-07-14 19:07:13 -04:00
Nat Goodspeed 8ca0f872f2 wstring_to_utf8str() accepts LLWString rather than std::wstring. 2011-07-14 17:12:02 -04:00
Nat Goodspeed 624c3f1a8e Use Linden wstring-to-string conversion, not boost::filesystem's.
On Windows, calling boost::filesystem::path::string() implicitly requests
code conversion between std::wstring (the boost::filesystem::path::string_type
selected on Windows) and std::string. At least for integration-test program,
that produces link errors. Use Linden's wstring_to_utf8str() instead.
2011-07-14 16:24:31 -04:00
Nat Goodspeed 24508cc924 Attempt to fix minor build errors on Windows. 2011-07-14 15:27:36 -04:00
Nat Goodspeed 4c465f496f Eliminate use of PATH_MAX, which is bogus anyway. 2011-07-14 15:08:25 -04:00
Nat Goodspeed 0ab0efc327 Work around broken Windows command-line processing.
It's wonderful that the Python interpreter will accept a whole multi-line
script as a composite -c argument... but because Windows command-line
processing is fundamentally flawed, we simply can't count on it for Windows.
Instead, accept script text, write a temporary script file in a system-
dependent temp directory, ask Python to run that script and delete the file.
Also, on Windows, use _spawnl(), much simpler than adding bizarre Windows wait
logic to LLProcessLauncher. Use LLProcessLauncher only on Mac & Linux, with
waitpid() to capture rc.
2011-07-14 14:00:12 -04:00
Nat Goodspeed ec780a733f Still trying to fix Windows header-file-order problem. 2011-07-13 19:41:23 -04:00
Nat Goodspeed beea7cdc2d Attempt to fix confusing header-file-order problems on Windows. 2011-07-13 19:03:28 -04:00
Nat Goodspeed 0f66566620 Introduce support for C++ integration tests running Python scripts.
This is in its infancy; tested on Mac; needs to be ironed out on Windows and
Linux. Goal is to test at least some cross-language LLSD serialization.
2011-07-13 17:36:59 -04:00
Alain Linden cbffa57351 fix linking to llqtwebkit. 2011-02-04 12:52:36 -08:00
Aaron Terrell (Enus) 48743cbd41 standardizing test suite names as class name under test 2010-08-24 23:41:47 -07:00
Oz Linden 06b0d72efa Change license from GPL to LGPL (version 2.1) 2010-08-13 07:24:57 -04:00
Steve Bennetts 65bf35cfed merge 2009-10-19 10:49:48 -07:00
Mark Palange (Mani) 3e10fa4d51 merge from latest svn/viewer-2-0 to hg/viewer-2-0 2009-10-16 16:42:45 -07:00
Adam Moss e922089ff4 DEV-41080 more automated testing love - minor comment fixing. 2009-10-16 12:39:05 +00:00
Adam Moss b73e71ebdf DEV-41174 more automated testing love
* turn llnamevalue_tut into a llmessage unit test
* turn llsdserialize_tut into a llcommon integration test
* re-enable the (quite slow) llsdserialize test on win32 now that it doesn't have to run on every recompile
* re-enable all llmessage unit tests on linux viewer builds
2009-10-12 14:13:57 +00:00