summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests
AgeCommit message (Collapse)Author
2023-09-08SL-18837: Make llsdserialize_test debug output conditional.Nat Goodspeed
Move hexdump() and hexmix() stream formatters to new hexdump.h for potential use by other tests. In toPythonUsing() helper function, add a temp file to receive Python script debug output, and direct debug output to that file. On test failure, dump the contents of that file to the log. Give NamedTempFile::peep() an optional target std::ostream; refactor implementation as peep_via() that accepts a callable to process each text line. Add operator<<() to stream the contents of a NamedTempFile object to ostream -- but don't use that with LL_DEBUGS(), as it flattens the file contents into a single log line. Instead add peep_log(), which streams each individual text line to LL_DEBUGS().
2023-09-08SL-18837: Add debugging output to llsdserialize_test.cpp.Nat Goodspeed
2023-09-07SL-18837: Fix minor merge glitch.Nat Goodspeed
2023-09-07SL-18837: Merge branch 'main' into actionsNat Goodspeed
2023-07-17SL-18837: Lowercasing pathname for string compare is Windows-only.Nat Goodspeed
2023-07-10SL-18837: Windows failures in setWorkingDirectory(): C: vs. c: (sigh)Nat Goodspeed
Normalize the case of the name of the temp directory for string comparison.
2023-07-10SL-18837: Disable APR_LOG for now, but leave notes for the future.Nat Goodspeed
2023-07-10SL-18837: Revert "Force llprocess_test and llleap_test to use just 'python'."Nat Goodspeed
Turns out that the pathname of the Python executable wasn't the issue. This reverts commit 7dc6211ad5ea83685a35c6fff740278343aa8b9d.
2023-07-08SL-18837: Force llprocess_test and llleap_test to use just 'python'.Nat Goodspeed
On GitHub Windows runners, trying to make build.yaml set PYTHON=python in the environment doesn't work: integration tests still fail with "Access is denied" because they're still trying to execute the interpreter's full pathname. Instead, make llprocess_test and llleap_test detect the case of GitHub Windows and override the environment variable PYTHON with a baked-in string constant "python".
2023-07-08SL-18837: Set APR_LOG once for the whole jobNat Goodspeed
instead of a new value for each LLProcess::create() invocation. Since the internal apr_log() function only looks at APR_LOG once per process, the first test (which succeeded, hence no log file dump) left the log file open with that same original pathname. Resetting the APR_LOG environment variable for subsequent runs only made the new code in llprocess_test look for files that were never created.
2023-07-08SL-18837: Don't use LLDir, use NamedTempFile::temp_path.Nat Goodspeed
Remove llcommon circular dependency on llfilesystem, which doesn't work for this case anyway.
2023-07-07SL-18837: Ditch unreferenced name of caught exceptionNat Goodspeed
2023-07-07SL-18837: Hook in LLDir to allow reading APR log file.Nat Goodspeed
2023-07-07SL-18837: Fix spurious semiNat Goodspeed
2023-07-07SL-18837: Fix "lldir.h" #includeNat Goodspeed
2023-07-07SL-18837: Coax APR to log LLProcess launch attempts; show log file.Nat Goodspeed
2023-07-07SL-18837: Partially revert e933ace, keeping useful tweaks.Nat Goodspeed
Introducing indirection via test_python_script.py did NOT address the "Access is denied" errors on GitHub Windows runners.
2023-07-07SL-18837: Try to bypass Windows perm problem with Python indirection.Nat Goodspeed
2023-06-06SL-18837: Ditch Boost.Phoenix implicit lambda syntax.Nat Goodspeed
It's cool to be able to write 'arg1 << "stuff" << var ...;' for a lambda accepting a std::ostream reference, but cascading compile errors mean it's no longer worth trying to make that work -- given actual C++ lambdas. Also clean up a lingering BOOST_FOREACH() and a boost::bind() while at it.
2023-06-06SL-18837: NamedTempFile back to std::function, use boost::phoenix <<Nat Goodspeed
It seems the problem addressed by aab769e wasn't some synergy between Boost.Phoenix and Boost.Function, but rather the lack of a Phoenix header file introducing operator<<().
2023-06-05SL-18837: Try giving temp Python scripts a .py extension.Nat Goodspeed
On GitHub Windows Actions runners, we're getting permissions errors trying to tell the Python interpreter to run a NamedTempFile script. Try using NamedExtTempFile to give each such script a .py extension.
2023-06-05SL-18837: Bump the granularity of WorkQueue timing tests.Nat Goodspeed
On a low-powered GitHub Mac runner, the system doesn't wake up as soon as it should, and we get spurious "too late" errors. Try a bigger time increment.
2023-05-19DRTVWR-558: Merge branch 'main' of secondlife/viewer into actionsNat Goodspeed
2023-05-04SL-19647 OSX buildfixAndrey Lihatskiy
2023-05-04Merge remote-tracking branch 'origin/zap-LLSDArray' into DRTVWR-577-maint-SAndrey Lihatskiy
2023-05-04Merge remote-tracking branch 'origin/zap-LLSDArray' into DRTVWR-582-maint-UAndrey Lihatskiy
# Conflicts: # indra/llcommon/tests/llsdserialize_test.cpp
2023-05-03SL-19647: Eliminate LLSDArray entirely.Nat Goodspeed
Newer C++ compilers have different semantics around LLSDArray's special copy constructor, which was essential to proper LLSD nesting. In short, we can no longer trust LLSDArray to behave correctly. Now that we have variadic functions, get rid of LLSDArray and replace every reference with llsd::array().
2023-05-02Merge branch 'main' into DRTVWR-577-maint-SAndrey Lihatskiy
2023-05-02Merge branch 'main' into DRTVWR-582-maint-UAndrey Lihatskiy
2023-04-07Merge branch 'main' into marchcat/main-contrib-mergeAndrey Lihatskiy
# Conflicts: # indra/cmake/CMakeLists.txt # indra/llcommon/llsdserialize.cpp # indra/llcommon/llsdserialize.h # indra/llcommon/tests/llleap_test.cpp # indra/newview/llfilepicker.h # indra/newview/llfilepicker_mac.h # indra/newview/llfilepicker_mac.mm # indra/newview/skins/default/xui/en/strings.xml
2023-03-30Merge branch 'main' into DRTVWR-577-maint-SAndrey Lihatskiy
# Conflicts: # indra/cmake/CMakeLists.txt # indra/newview/skins/default/xui/es/floater_tools.xml
2023-03-01SL-18330: Tweaks for Visual Studio buildsNat Goodspeed
2023-02-15SL-18330: Merge branch 'contribute' into sl-18330-mergeNat Goodspeed
2022-12-06SL-18330: Adapt LLSDSerialize and tests to llssize max_bytes params.Nat Goodspeed
2022-12-02SL-18330: Test Python llsd.parse() both from bytes and from stream.Nat Goodspeed
2022-12-02SL-18330: Fix new C++ <-> Python LLSD compatibility tests.Nat Goodspeed
When sending multiple LEAP packets in the same file (for testing convenience), use a length prefix instead of delimiting with '\n'. Now that we allow a serialization format that includes an LLSD format header (e.g. "<?llsd/binary?>"), '\n' is part of the packet content. But in fact, testing binary LLSD means we can't pick any delimiter guaranteed not to appear in the packet content. Using a length prefix also lets us pass a specific max_bytes to the subject C++ LLSD parser. Make llleap_test.cpp use new freestanding Python llsd package when available. Update Python-side LEAP protocol code to work directly with encoded bytes stream, avoiding bytes<->str encoding and decoding, which breaks binary LLSD. Make LLSDSerialize::deserialize() recognize LLSD format header case- insensitively. Python emits and checks for "llsd/binary", while LLSDSerialize emits and checks for "LLSD/Binary". Once any of the headers is recognized, pass corrected max_bytes to the specific parser. Make deserialize() more careful about the no-header case: preserve '\n' in content. Introduce debugging code (disabled) because it's a little tricky to recreate. Revert LLLeap child process stdout parser from LLSDSerialize::deserialize() to the specific LLSDNotationParser(), as at present: the generic parser fails one of LLLeap's integration tests for reasons that remain mysterious.
2022-11-29SL-18330: WIP: Send LLLeap to child as binary LLSD; generic parser.Nat Goodspeed
Since parsing binary LLSD is faster than parsing notation LLSD, send data from the viewer to the LEAP plugin child process's stdin in binary instead of notation. Similarly, instead of parsing the child process's stdout using specifically a notation parser, use the generic LLSDSerialize::deserialize() LLSD parser. Add more LLSDSerialize Python compatibility tests.
2022-11-23SL-18330: LLSDSerialize::deserialize() w/o hdr uses XML or notationNat Goodspeed
Absent a header from LLSDSerialize::serialize(), make deserialize() distinguish between XML or notation by recognizing an initial '<'.
2022-11-22SL-18330: Make LLSDSerialize::deserialize() default to notation.Nat Goodspeed
LLSDSerialize::serialize() emits a header string, e.g. "<? llsd/notation ?>" for notation format. Until now, LLSDSerialize::deserialize() has required that header to properly decode the input stream. But none of LLSDBinaryFormatter, LLSDXMLFormatter or LLSDNotationFormatter emit that header themselves. Nor do any of the Python llsd.format_binary(), format_xml() or format_notation() functions. Until now, you could not use LLSD::deserialize() to parse an arbitrary-format LLSD stream serialized by anything but LLSDSerialize::serialize(). Change LLSDSerialize::deserialize() so that if no header is recognized, instead of failing, it attempts to parse as notation. Add tests to exercise this case. The tricky part about this processing is that deserialize() necessarily reads some number of bytes from the input stream first, to try to recognize the header. If it fails to do so, it must prepend the bytes it has already read to the rest of the input stream since they're probably the beginning of the serialized data. To support this use case, introduce cat_streambuf, a std::streambuf subclass that (virtually) concatenates other std::streambuf instances. When read by a std::istream, the sequence of underlying std::streambufs appears to the consumer as a single continuous stream.
2022-11-22Merge branch 'DRTVWR-568' into DRTVWR-539Mnikolenko Productengine
2022-11-03DRTVWR-575: A few more tweaks addressing size_t wider than 32 bits.Nat Goodspeed
2022-10-11Replace llbase with llsd moduleSignal Linden
2022-08-26DRTVWR-568: More cleanup of deleted obsolete std library features.Nat Goodspeed
2022-08-23DRTVWR-558: Remove references to string join() per code review.Nat Goodspeed
2022-08-22DRTVWR-558: Fix builds on macOS 12.5 Monterey.Nat Goodspeed
Always search for python3[.exe] instead of plain 'python'. macOS Monterey no longer bundles Python 2 at all. Explicitly make PYTHON_EXECUTABLE a cached value so if the user edits it in CMakeCache.txt, it won't be overwritten by indra/cmake/Python.cmake. Do NOT set DYLD_LIBRARY_PATH for test executables! That has Bad Effects, as discussed in https://stackoverflow.com/q/73418423/5533635. Instead, create symlinks from build-mumble/sharedlibs/Resources -> Release/Resources and from build-mumble/test/Resources -> ../sharedlibs/Release/Resources. For test executables in sharedlibs/RelWithDebInfo and test/RelWithDebInfo, this supports our dylibs' baked-in load path @executable_path/../Resources. That load path assumes running in a standard app bundle (which the viewer in fact does), but we've been avoiding creating an app bundle for every test program. These symlinks allow us to continue doing that while avoiding DYLD_LIBRARY_PATH. Add indra/llcommon/apply.h. The LL::apply() function and its wrapper macro VAPPLY were very useful in diagnosing the problem. Tweak llleap_test.cpp. This source was modified extensively for diagnostic purposes; these are the small improvements that remain.
2022-06-29Merge branch 'master' into DRTVWR-539Mnikolenko Productengine
2022-05-27Merge branch 'master' into DRTVWR-543-maintAndrey Lihatskiy
# Conflicts: # autobuild.xml # indra/cmake/LLCommon.cmake # indra/llcommon/CMakeLists.txt # indra/llrender/llgl.cpp # indra/newview/llappviewer.cpp # indra/newview/llface.cpp # indra/newview/llflexibleobject.cpp # indra/newview/llvovolume.cpp
2022-03-14merge fixMnikolenko Productengine
2022-03-02Merge branch 'master' into DRTVWR-539Mnikolenko Productengine
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/cmake/GLOD.cmake # indra/llcommon/tests/llprocess_test.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolavatar.cpp # indra/newview/llfloatermodelpreview.cpp # indra/newview/llmodelpreview.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvovolume.cpp # indra/newview/viewer_manifest.py
2022-03-01Merge branch 'master' (DRTVWR-557) into DRTVWR-546Andrey Kleshchev
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/cmake/GLOD.cmake # indra/llcommon/tests/llprocess_test.cpp # indra/newview/VIEWER_VERSION.txt # indra/newview/lldrawpoolavatar.cpp # indra/newview/llfloatermodelpreview.cpp # indra/newview/llmodelpreview.cpp # indra/newview/llviewertexturelist.cpp # indra/newview/llvovolume.cpp # indra/newview/viewer_manifest.py