summaryrefslogtreecommitdiff
path: root/indra/newview/tests
AgeCommit message (Collapse)Author
2024-03-08Enhance llluamanager_test.cpp.Nat Goodspeed
Sketch in an initial test that requires one of our bundled Lua modules. Each time we run Lua, report any error returned by the Lua engine. Use llcoro::suspendUntilEventOn(LLEventMailDrop) as shorthand for initializing an explicit LLTempBoundListener with a listen() call with a lambda.
2024-03-01Convert remaining TRUE/FALSE to true/falseAnsariel
2024-02-22Lua listen_events(), await_event() => get_event_{pumps,next}().Nat Goodspeed
Don't set up a Lua callback to receive incoming events, a la listen_events(). Don't listen on an arbitrary event pump, a la await_event(). Instead, the new get_event_pumps() entry point simply delivers the reply pump and command pump names (as listen_events() did) without storing a Lua callback. Make LuaListener capture incoming events on the reply pump in a queue. This avoids the problem of multiple events arriving too quickly for the Lua script to retrieve. If the queue gets too big, discard the excess instead of blocking the caller of post(). Then the new get_event_next() entry point retrieves the next (pump, data) pair from the queue, blocking the Lua script until a suitable event arrives. This is closer to the use of stdin for a LEAP plugin. It also addresses the question: what should the Lua script's C++ coroutine do while waiting for an incoming reply pump event? Recast llluamanager_test.cpp for this new, more straightforward API. Move LLLeap's and LuaListener's reply LLEventPump into LLLeapListener, which they both use. This simplifies LLLeapListener's API, which was a little convoluted: the caller supplied a connect callback to allow LLLeapListener to connect some listener to the caller's reply pump. Now, instead, the caller simply passes a bool(pumpname, data) callback to receive events incoming on LLLeapListener's own reply pump. Fix a latent bug in LLLeapListener: if a plugin called listen() more than once with the same listener name, the new connection would not have been saved. While at it, replace some older Boost features in LLLeapListener and LLLeap.
2024-02-21Convert remaining BOOL to boolAnsariel
2024-02-21Convert remaining BOOLs in llxml and introduce std::string_viewAnsariel
2024-02-21Convert BOOL to bool in lluiAnsariel
2024-02-21Convert BOOL to bool in LLControlGroup and related classesAnsariel
2024-02-18fix some testsLars Næsbye Christensen
2024-02-18Replace BOOL with bool in llwindow and dependent classesAnsariel
2024-02-12miscellaneous: BOOL (int) to real boolLars Næsbye Christensen
2024-02-07Fix tests broken by switching from Lua 5.4 to Luau.Nat Goodspeed
Add a new test<1>() that tests returning values from a Lua chunk using LLLUAmanager::waitScriptLine(). This exercises lua_tollsd() without yet involving LLEventPump machinery. For that purpose, extract from test<2>() the sequence of (description, expression, LLSD expected) triples into a static C array. The new test<1>() returns each such expression as a result; test<2>() posts each such expression to a test LLEventPump. test<2>() now uses waitScriptLine() instead of pumping the coroutine scheduler a few times and hoping. The pump-and-hope tactic worked before, but no longer does. waitScriptLine() is more robust anyway. Move the former test<1>() to test<3>() because it exercises still more machinery, specifically listen_events() and await_event(). Because this test involves a handshake with C++ code, use startScriptLine() to launch the Lua coroutine while providing a definite way to wait for completion later. Again, startScriptLine() followed by get() on the returned future is more robust than the previous pump-and-hope code. Similarly, the former test<3>(), now renamed test<4>(), uses startScriptLine() and Future::get() instead of pump-and-hope.
2024-01-08replace boost library to standardAiraYumi
2024-01-04DRTVWR-589: Merge branch 'main' into DRTVWR-589Nat Goodspeed
2023-11-30Merge branch 'DRTVWR-588-maint-W' into marchcat/588-w-pbr-mergeAndrey Lihatskiy
# Conflicts: # indra/llrender/llgl.cpp # indra/llrender/llvertexbuffer.cpp # indra/llui/llflatlistview.cpp # indra/newview/lldrawpoolground.cpp # indra/newview/llspatialpartition.cpp # indra/newview/lltexturefetch.cpp # indra/newview/llviewergenericmessage.cpp # indra/newview/llviewertexture.cpp # indra/newview/llvosky.cpp # indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml # indra/newview/skins/default/xui/en/floater_stats.xml # indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml # indra/newview/skins/default/xui/en/notifications.xml # indra/newview/skins/default/xui/en/panel_performance_preferences.xml
2023-11-02DRTVWR-589: StringVec's operator<<() overload must precede lltut.h.Nat Goodspeed
If not, the resulting error message is so mysterious that it's worth adding an error check to explain how to avoid it.
2023-10-13SL-20422 Unit-tests fixAlexander Gavriliuk
2023-10-07DRTVWR-589: Solved the bug in traversing nested Lua tables.Nat Goodspeed
When lua_tollsd() makes a recursive call, it passes -1 as the index of the newly-encountered nested table. To traverse the nested table, lua_tollsd() starts by pushing nil as the initial key. But then calling lua_next(-1) finds nil -- NOT the nested table! Converting the index parameter to absolute before pushing nil solves.
2023-10-04DRTVWR-589: Add tests for LLSD-to-Lua round-trip conversions.Nat Goodspeed
Add from_lua() function to run a small Lua script that constructs a specified Lua object and posts it back to the test program via a temporary LLEventPump. Call this with a variety of Lua objects, comparing to the expected LLSD. Add round_trip() function to run another small Lua script that listens for incoming LLEventPump events and, for each, posts the received Lua data back to the test program as LLSD. Call this with a variety of LLSD objects, comparing to the expected LLSD. Also collect these objects into an LLSD array and send that for a round trip; also collect into an LLSD map and send that. Sadly, tests currently drive an access violation when trying to convert a nested Lua table to LLSD. Add verbose debug logging to lua_tollsd() to identify the context at which we hit the access violation. Add comments describing further exceptions to LLSD-to-Lua round trip identity. Add lua_what() iostream manipulator to stream whatever we can readily discover about a value at a specified Lua stack index. Add lua_stack() to report the contents of the Lua stack. Since the stack is created anew for every call to a C function, this shouldn't usually be enormous. Add hexdump.h with iostream manipulators to dump a byte range as hex digits, or to produce readable text from a mix of printing and nonprinting ASCII characters.
2023-10-02DRTVWR-589: Add initial integration test for LLLUAmanager.Nat Goodspeed
The first test runs a Lua script that calls post_on(), listen_events() and await_event() to engage in LLEventPump handshakes with the test program. Make llluamanager.cpp testable by putting LL_TEST conditionals around lots of viewer-internals headers and the lua_function definitions that engage them. Since LuaListener::connect() is called by its constructor, make it a static method that explicitly accepts the lua_State* (instead of finding it as mState). Add that parameter to its two existing calls. Add a debug log message when LuaListener is destroyed. This surfaced the need to pass a no-op deleter when listen_events() constructs a LuaListener::ptr_t. When compiled for LL_TEST, make LuaListener::mReplyPump an LLEventLogProxyFor<LLEventStream> instead of a plain LLEventStream. For debugging purposes, add a type string "LLEventLogProxy" for LLEventPumps::make(). A make() call with this type will return an LLEventLogProxyFor<LLEventStream>.
2023-03-30CMake and tests fixups after merge with main for DRTVWR-559Brad Linden
2023-03-13Partial solution for SL-18458 Materials override cache not working and ↵Brad Linden
related SL-18684/SL-19206/SL-19173
2022-08-30Merge remote-tracking branch 'remotes/origin/DRTVWR-563' into DRTVWR-559Dave Parks
2022-06-09SL-17483: Add integration test for CommonControlNat Goodspeed
and for LLViewerControlListener, to which it talks. Fix glitches detected by the tests.
2022-06-08SL-17546 Fix 'release' configuration build testsAndrey Kleshchev
2022-05-04Merge branch master (D550) into DRTVWR-546Andrey Kleshchev
# Conflicts: # indra/newview/llappviewer.h
2022-04-25SL-17223 fix unit tests with new method stub implementationBrad Kittenbrink
2022-03-29SL-16831 Fix unit testAndrey Kleshchev
2022-03-17SL-17019 mfa_hash should get saved per-usernameBrad Kittenbrink
2022-03-07Merge remote-tracking branch 'origin/master' into DRTVWR-550-mfaBrad Kittenbrink
2022-01-14SL-16514 store mfa hash in protected data using LLSecAPIBasicHandlerBrad Kittenbrink
2021-12-13SL-16501 SLMFAHash is now saved client sideBrad Kittenbrink
2021-12-11Merge branch 'master' into SL-15742Bennett Goble
2021-12-10SL-15742: Convert build scripts to Python 3Bennett Goble
This changeset makes it possible to build the Second Life viewer using Python 3. It is designed to be used with an equivalent Autobuild branch so that a developer can compile without needing Python 2 on their machine. Breaking change: Python 2 support ending Rather than supporting two versions of Python, including one that was discontinued at the beginning of the year, this branch focuses on pouring future effort into Python 3 only. As a result, scripts do not need to be backwards compatible. This means that build environments, be they on personal computers and on build agents, need to have a compatible interpreter. Notes - SLVersionChecker will still use Python 2 on macOS - Fixed the message template url used by template_verifier.py
2021-10-14Merge branch 'master' into DRTVWR-545-maint-mixAndrey Lihatskiy
2021-08-12Merge branch 'master' into DRTVWR-520-apple-notarizationAndrey Lihatskiy
# Conflicts: # autobuild.xml # build.sh # indra/CMakeLists.txt # indra/newview/CMakeLists.txt # indra/newview/llappviewermacosx.cpp # indra/newview/llappviewerwin32.h # indra/newview/viewer_manifest.py # indra/win_crash_logger/llcrashloggerwindows.cpp
2021-07-20Merge branch 'master' into DRTVWR-521-maintAndrey Lihatskiy
# Conflicts: # autobuild.xml # indra/llcommon/llerror.cpp # indra/llui/llnotifications.h # indra/newview/llappviewer.cpp # indra/newview/llappviewermacosx.cpp
2021-07-12Merge branch 'build-hooks' into DRTVWR-521-maintAndrey Lihatskiy
2021-06-29SL-15500: Merge branch 'utf8' into build-hooksNat Goodspeed
Since we're going to run the git-hooks validation over the whole repository at the start of every viewer build, it's important that we start with a clean pass. Certain text files contained non-ASCII, non-UTF8 characters. We had already been down the path of identifying and replacing those with ASCII. Pull in those changes.
2021-05-27SL-15211 Adjust unit testsAndrey Kleshchev
2021-05-27SL-15211 Update OpenSSL libraryAndrey Kleshchev
2021-04-30Merge branch 'master' into DRTVWR-521-maintAndrey Lihatskiy
2021-04-29Merge master (DRTVWR-515) into DRTVWR-516-maintAndrey Kleshchev
# Conflicts: # autobuild.xml # doc/contributions.txt # indra/llcommon/llcoros.cpp # indra/llmessage/llcoproceduremanager.cpp # indra/newview/llfloaterfixedenvironment.cpp # indra/newview/llfloaterimsessiontab.cpp
2021-04-01SL-14999 - noteBrad Payne (Vir Linden)
2021-03-26SL-14999 - more cpp features testsBrad Payne (Vir Linden)
2021-03-17SL-14999 - more c++ feature testsBrad Payne (Vir Linden)
2021-03-17SL-14999 - test updateBrad Payne (Vir Linden)
2021-03-17SL-14999 - C++ feature testsBrad Payne (Vir Linden)
2021-03-16SL-14999 - cppfeatures test file for examples and compiler conformance ↵Brad Payne (Vir Linden)
verification
2021-02-11SL-11215 Fixed unit testAndrey Kleshchev
2020-12-08SL-2363 Build fixAndrey Kleshchev