Commit Graph

19325 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 3ddaf95c5c New llsdserialize_test logic needs Boost.Filesystem library.
That, in turn, needs Boost.System library.
2011-07-14 14:01:45 -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
Nat Goodspeed ed648b1f08 CHOP-753: Eliminate redundant array-of-pair-arrays in LLMemoryInfo.
(per Monty code review)
The notion of storing LLMemoryInfo data both as an LLSD::Map and an
LLSD::Array of pair arrays arose from a (possibly misguided) desire to
continue producing stats output into the viewer log in the same order it
always used to be produced. There is no evidence that anyone cares about the
order of those stats in the log; there is no other use case for preserving
order. At Monty's recommendation, eliminate generating and storing the
array-of-pair-arrays form: directly store LLSD::Map.
2011-07-12 20:14:39 -04:00
Nat Goodspeed e58a0e9b26 CHOP-753: Defend against boost::regex exceptions.
(per Monty code review)
Explain why we intentionally don't suppress exceptions from boost::regex
objects constructed with string literals. Catch std::runtime_error from
boost::regex_search() and boost::regex_match(); log and return false.
2011-07-12 14:34:31 -04:00
Nat Goodspeed 4e23550363 CHOP-753: make getAvailableMemoryKB() only load data on Windows.
(per Monty code review)
Other platforms return -1 anyway, so don't need to call load methods.
2011-07-12 13:34:09 -04:00
Nat Goodspeed 8fcda650a7 CHOP-753: Add classic-C-style diagnostics around popen("vm_stat").
On Mac, where LLMemoryInfo relies on a child process rather than any sort of
internal system API, try to produce more informative LL_WARNS output if
popen() fails to run vm_stat, or if vm_stat terminates with nonzero rc.
2011-07-11 14:24:28 -04:00
Nat Goodspeed 607f60d6f6 CHOP-753: Add timestamp to LLMemoryInfo's LLSD stats block.
For postprocessing these stats, we'll want the time at which they were
captured. We'll want the current framerate too, but handle that at a higher
level.
2011-07-11 10:57:14 -04:00
Nat Goodspeed 774306bc25 CHOP-753: have to cast pointer passed to GetProcessMemoryInfo().
GetProcessMemoryInfo() is prototyped with PROCESS_MEMORY_COUNTERS*, so to
accept PROCESS_MEMORY_COUNTERS_EX* as documented, have to cast.
2011-07-07 14:47:20 -04:00
Nat Goodspeed 65657b9f5c CHOP-753: uh, Microsoft docs lied about header file to use?
Remove <kfuncs.h>, documented header file for GetCurrentProcess().
2011-07-07 14:20:37 -04:00
Nat Goodspeed 6c0d6956da CHOP-753: add stats from GetProcessMemoryInfo() on Windows.
Introduce StatsArray helper class to facilitate accumulating stats in the
array-of-pair-arrays form cached internally by LLMemoryInfo.
2011-07-07 14:05:56 -04:00
Nat Goodspeed d16a0afe2e Automated merge with http://hg.secondlife.com/viewer-development 2011-07-06 13:24:49 -04:00
Nat Goodspeed bfbd7c6df5 CHOP-753: On Windows, add GetPerformanceInfo to LLMemoryInfo stats.
So far we've only been querying GlobalMemoryStatusEx(), but
GetPerformanceInfo() delivers a bunch more memory-related stats that may be
pertinent. Try capturing those too. May not yet compile on Windows...
2011-07-05 20:20:26 -04:00
Vadim ProductEngine 31c1cff64f STORM-1262 FIXED Removed the original Windlight Region Settings implementation. 2011-07-06 00:42:28 +03:00
Vadim ProductEngine d349352740 STORM-1330 WIP Removing a comment that was added by mistake. 2011-07-05 23:25:08 +03:00
Vadim ProductEngine 02c9c49788 STORM-1330 WIP Override region sun position when switching the region to fixed sky. 2011-07-05 22:52:31 +03:00
Vadim ProductEngine 7aa7ee6838 STORM-1330 WIP Switched the Terrain tab of the Region/Estate floater to using the region info model. 2011-07-05 17:51:22 +03:00
Vadim ProductEngine 424366a66f STORM-1137 FIXED Close the REGION/ESTATE floater when teleporting. 2011-07-01 21:11:36 +03:00
Vadim ProductEngine 2fc65cae7b STORM-1464 FIXED Fixed inability to change terrain settings.
Reason:
The "setregionterrain" message missed estate/region sun info and thus was incomplete.

Fix:
Added missing fields back.

Note:
The fields' values are fake.
2011-07-01 20:05:49 +03:00
Vadim ProductEngine 3a552f5b8b STORM-1464 WIP Removed references to a nonexistent Apply button from the Region/Estate floater. 2011-07-01 17:33:57 +03:00
Vadim ProductEngine 62e7b3d3c7 STORM-1470 FIXED Sky setting / Lighting preset position controls were inconsistent. 2011-07-01 16:31:02 +03:00
Oz Linden 08ef4819d6 merge latest changes from viewer-development 2011-06-30 21:27:04 -04:00
Oz Linden 662a927843 merge changes for shining branch 2011-06-30 19:37:56 -04:00
Oz Linden 6be68618c4 merge changes for sec-906 2011-06-30 19:20:25 -04:00
Oz Linden 06b314aaf2 merge changes for latest viewer-development 2011-06-30 16:00:09 -04:00
Dave Parks 7a85df9429 merge 2011-06-30 14:00:49 -05:00
Nat Goodspeed abf50e8c7d CHOP-753: Fix compile errors in LLMemoryInfo Windows-specific code. 2011-06-30 13:57:11 -04:00
Nat Goodspeed 01607fe418 CHOP-753: Reduce redundancy in LLMemoryInfo.
Recast stream() to display data from LLSD array rather than reinvoking OS
operations used to capture it.
Make refresh() cache LLSD data in map form as well as array; fetch items from
that in a few places to avoid going back to OS.
2011-06-30 11:50:54 -04:00
Vadim ProductEngine 5c77e714a6 STORM-1445 FIXED Added border line to Estate, Environment tabs in Region/Estate Floater. 2011-06-30 18:32:44 +03:00
Nat Goodspeed b75eedb0dc CHOP-753: Fix errors in LLMemoryInfo Mac-specific code.
Handle conversion errors (boost::bad_lexical_cast).
Glean additional LLSD statistics from vm_stat output.
2011-06-30 10:12:45 -04:00
Oz Linden f07173a968 merge changes for storm-1452 2011-06-30 06:40:46 -04:00
Oz Linden b278b61f4e merge changes for storm-1406 2011-06-30 06:39:48 -04:00
Oz Linden c8c9384949 merge changes for storm-1327 2011-06-30 06:38:39 -04:00
Oz Linden ce93fc7fd5 merge changes for storm-1396 2011-06-30 06:37:25 -04:00
Oz Linden a80c79097d merge changes for storm-457 2011-06-30 06:36:25 -04:00
Oz Linden d3a7792703 merge changes for storm-1463 2011-06-29 21:22:59 -04:00