Commit Graph

107 Commits (b3a549b8b5e01809b2dd2006d6bf92a7a4d6baf7)

Author SHA1 Message Date
Rye Mutt cde858a65f Fix lltest failure by outputting to the sharedlibs dir like other tests on windows 2024-07-29 08:20:32 +03:00
Rye Mutt 53d4fcd359 Remove dead googlemock dependency and related setup code 2024-03-28 19:41:47 +02:00
Nat Goodspeed 324f0d9b8a DRTVWR-558: Fix builds on macOS 12.5 Monterey.
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.

(cherry picked from commit 15d37713b9)
(cherry picked from commit a1adcf1905d1fbc5fe07ff5a627295ccfe461ac4)
2023-07-13 12:32:15 -04:00
Nicky Dasmijn c47b2ae745 We probably want this (have to guess as I cannot run the tests). 2022-09-17 17:58:08 +02:00
Nicky Dasmijn e840b5eb40 MacOs packaging is weird, as Nat already did point out :(
Part of his change was omly taking Release builds into account, the other
part from me made the same mistake.
Use a generator expression with a custom command to get the symlink the way
we want.
2022-09-17 17:37:45 +02:00
Nicky Dasmijn 0710d95f4b Merge remote-tracking branch 'origin/DRTVWR-543-maint_cmake' into DRTVWR-568_cmake 2022-09-16 23:15:49 +02:00
Nat Goodspeed 675cfedb8a DRTVWR-568: Ensure parent directory exists before CREATE_LINK. 2022-09-01 12:27:08 -04:00
Nat Goodspeed 15d37713b9 DRTVWR-558: Fix builds on macOS 12.5 Monterey.
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-08-22 21:00:42 -04:00
Nicky 283c2a20cc Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically
sets the property on those.
2022-05-01 00:38:40 +02:00
Nicky 3ac18ad993 Streamline bugsplat target:
- Fix usage of bugsplat::bugsplat by using ll::bugsplat
- Use bugsplat define by importing target not by using hand crafted magic
2022-04-16 22:08:40 +02:00
Nicky b9f94c0897 Now there is a oslibrary target get rid of some more obsolete vars:
LEGACY_STDIO_LIBS (was only used for Windows)
PTHREAD_LIBRARY (only Linux)
LLDATABASE_LIBRARIES (that one was supposed for Linux, but never needed anyway)
2022-04-16 15:33:32 +02:00
Nicky bb85651d98 Create a new target ll::oslibrary to link against libs specific to the OS compiled on.
This gets rid of the a few OS specific set and uses variables (which some even seemed mostly
duplicate like WINDOWS_LIBRARIES ans UI_LIBRARIES) and it also solves the problem of
having them to tack on every target, as of no they come as a transitive dependency from llcommon
2022-04-16 15:29:02 +02:00
Nicky 241919e7f7 Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr),
but it's safer and saner to put the LL 3ps under the ll:: prefix.
This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard().
2022-04-13 19:21:55 +02:00
Nicky d1b6a52fef Googlemock target 2022-04-06 23:33:06 +02:00
Nicky bed0b80374 Remove obsolete include directives 2022-04-06 20:23:54 +02:00
Nicky 786b291d9c Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
2022-04-06 16:32:52 +02:00
Callum Prentice 8631a7a077 Merge with tip of Master after a Viewer release 2021-07-19 14:35:44 -07:00
Callum Prentice 168d177197 This set of changes reverts the merge with master (git revert c83e740) and results in a version of the DRTVWR-519 that matches what was presemt before it was deployed as a release viewer *plus* 3 small fixes from Maxim (See commits). This branch can now be used for additional fixes before eventually being used to release D-519 as normal 2021-03-09 14:39:51 -08:00
Brad Payne (Vir Linden) c83e740ef9 Revert "Merge branch 'master' of https://bitbucket.org/lindenlab/viewer into DRTVWR-519"
This reverts commit e61f485a04, reversing
changes made to 00c47d079f.
2021-03-08 13:56:16 +00:00
Callum Prentice d9448c6f52 The folder where the disk cache lives was originally renamed from llvfs to llcache but @henri's suggestion that that doesn't reflect the other files in the same place and it should be llfilesystem is a good one so I changed it over 2020-09-17 09:45:06 -07:00
Callum Prentice 3fc07dea01 First part of change to remove LLVFS from the Viewer. Consists of code changes to remove LLVFS and LLVFSThread classes along with the associated source files. The existing llvfs folder is renamed to llcache. Also includes changes to CMake script in many places to reflect changes. Eventually, llvfile source file and class will be renamed but that is not in this change. 2020-09-16 18:53:24 -07:00
Oz Linden a9d271c5a2 SL-10297 merged 6.4.7 2020-08-24 13:11:07 -04:00
Nat Goodspeed d7c2e4a77b DRTVWR-476: Add Sync class to help with stepwise coroutine tests.
Sync is specifically intended for test programs. It is based on an
LLScalarCond<int>. The idea is that each of two coroutines can watch for the
other to get a chance to run, indicated by incrementing the wrapped int and
notifying the wrapped condition_variable. This is less hand-wavy than calling
llcoro::suspend() and hoping that the other routine will have had a chance to
run.

Use Sync in lleventcoro_test.cpp.

Also refactor lleventcoro_test.cpp so that instead of a collection of static
data requiring a clear() call at start of each individual test function, the
relevant data is all part of the test_data struct common to all test
functions. Make the helper coroutine functions members of test_data too.

Introduce llcoro::logname(), a convenience function to log the name of the
currently executing coroutine or "main" if in the thread's main coroutine.
2020-03-25 18:44:04 -04:00
Anchor b5bb0794f0 [DRTVWR-476] - fix linking 2020-03-25 18:39:20 -04:00
Nat Goodspeed 66981fab0b SL-793: Use Boost.Fiber instead of the "dcoroutine" library.
Longtime fans will remember that the "dcoroutine" library is a Google Summer
of Code project by Giovanni P. Deretta. He originally called it
"Boost.Coroutine," and we originally added it to our 3p-boost autobuild
package as such. But when the official Boost.Coroutine library came along
(with a very different API), and we still needed the API of the GSoC project,
we renamed the unofficial one "dcoroutine" to allow coexistence.

The "dcoroutine" library had an internal low-level API more or less analogous
to Boost.Context. We later introduced an implementation of that internal API
based on Boost.Context, a step towards eliminating the GSoC code in favor of
official, supported Boost code.

However, recent versions of Boost.Context no longer support the API on which
we built the shim for "dcoroutine." We started down the path of reimplementing
that shim using the current Boost.Context API -- then realized that it's time
to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API,
which we've been itching to do for literally years now.

Naturally, most of the heavy lifting is in llcoros.{h,cpp} and
lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of
the differences between "dcoroutine" and Boost.Fiber.

The one feature Boost.Fiber does not provide is the ability to forcibly
terminate some other fiber. Accordingly, disable LLCoros::kill() and
LLCoprocedureManager::shutdown(). The only known shutdown() call was in
LLCoprocedurePool's destructor.

We also took the opportunity to remove postAndSuspend2() and its associated
machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(),
LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time
when the Responder pattern was king, and we assumed we'd want to listen on one
LLEventPump with the success handler and on another with the error handler. We
have never actually used that in practice. Remove associated tests, of course.

There is one other semantic difference that necessitates patching a number of
tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting
coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as
ready to resume next time the scheduler gets around to it. To observe the test
side effects, we've inserted a number of llcoro::suspend() calls -- also in
the main loop.

For a long time we retained a single unit test exercising the raw "dcoroutine"
API. Remove that.

Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a
hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for
that, remove the hack.

In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency
tracking in place of llcoro::get_id().

In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We
don't actually use the Boost.Coroutine for anything (though there exist
plausible use cases).
2020-03-25 17:32:45 -04:00
Oz Linden e409c0492f convert to an explicit USE_BUGSPLAT switch in cmake, revise LL_ERRS approach 2019-03-02 11:58:11 -05:00
Nat Goodspeed 5002bf5660 MAINT-8087: Use env vars from VMP for AppData\Roaming and Local.
On Windows, when logged in with a non-ASCII username, every one of the three
documented APIs -- SHGetSpecialFolderPath(), SHGetFolderPath() and
SHGetKnownFolderPath() -- fails to retrieve any pathname at all. We cannot
account for the fact that the oldest of these continues to work with the
release viewer and within a Python script (though not, curiously, from a
Python interactive session). With a non-ASCII username, they consistently fail
when called from an Alex Ivy viewer build: "The filename, directory name, or
volume label syntax is incorrect."

Empirically, with a non-ASCII username, the preset APPDATA and LOCALAPPDATA
environment variables are also useless, e.g. c:\Users\??????\AppData\Roaming
where those are, yup, actual question marks.

Empirically, the VMP is able to successfully call SHGetFolderPath() to
retrieve both AppData\Roaming and AppData\Local. Therefore, we make the VMP
set the APPDATA and LOCALAPPDATA environment variables to the UTF-8 encoded
correct pathnames. Instead of calling SHGetSomethingFolderPath() at all, make
LLDir_Win32 retrieve those environment variables.

Make LLFile::mkdir() treat "directory already exists" as a success case. Every
single call fell into one of two categories: either it didn't check success at
all, or it tested specially to exempt errno == EEXIST. Migrate that test into
mkdir(); eliminate it from call sites.

Make LLDir::append() and add() convenience functions accept variadic
arguments. Replace add(add()...) constructs, as well as clumsy concatenations
of directory names and getDirDelimiter(), with simple variadic add() calls.
2017-12-20 22:51:26 -05:00
Nat Goodspeed 870008f15b MAINT-8087: New LLDir_Win32 code requires ole32 in a few more places. 2017-12-14 19:33:10 -05:00
callum_linden 9c4ed8d113 Automated merge with tip of viewer-release to pick up 4.0.5 2016-05-19 11:00:03 -07:00
callum_linden b50df60aa1 DRTVWR-418 remove vestiges of TCMALLOC and GooglePerfTools from the viewer 2016-04-21 16:13:39 -07:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Oz Linden 867ef882fd merge changes for OPEN-292 2016-02-07 13:41:41 -08:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden 5753c274ba Adding boost libs to lltest 2015-08-17 11:37:47 -07:00
Rider Linden efbbbca9b0 Get unit tests (Integration and project) compiling and linking again. 2015-08-17 10:25:11 -07:00
Cinder ca08bd5aba OPEN-292 - Remove lscript from project,
Remove legacy udp script upload methods,
Refactor script runtime perms from three arrays to one struct array so we don't have to juggle array order anymore.
2015-02-08 12:53:39 -07:00
JJ Linden 5cb5c267ca fixes for cmake warnings about policy changes. could not fully test these changes 2014-10-13 12:46:55 -07:00
Richard Linden 0a96b47663 merge with viewer-release 2013-06-05 19:05:43 -07:00
Oz Linden ddd5659f81 merge changes for DRTVWR-294 2013-04-19 10:11:29 -04:00
Richard Linden ae028e7987 removed unused data structures 2013-04-11 19:08:57 -07:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Don Kjer c06c35609c Updating linux build to gcc4.6 2012-10-11 00:09:04 +00:00
Nat Goodspeed cd05a244da MAINT-1144: Break out llhttpclient_tut as standalone integration test.
indra/test/llhttpclient_tut.cpp ==> indra/llmessage/tests/llhttpclient_test.cpp,
with corresponding CMakeLists.txt changes in their respective directories.
This first commit merely moves the test source file without changing it --
separating out moves from edits simplifies code review.
2012-06-06 19:57:58 -04:00
Logan Dethrow 85c8c97f7a Fixed CMakeLists.txt line ending. 2011-09-15 14:14:55 -04:00
Logan Dethrow 5afffabc1a Backed out changeset 19aa1a773410 2011-09-15 14:14:15 -04:00
Logan Dethrow ec065bdfda Copied newer version of llevents_tut from server. Fixed line ending in CMakeLists.txt. 2011-09-14 14:09:50 -04:00
Logan Dethrow 15a3df2f08 Always build indra/test, run if LL_TESTS is enabled. Removed python test run command since there are no python tests in the viewer. 2011-09-13 14:41:00 -04:00
Logan Dethrow dc58b5207b Re-enabled llapp_tut.cpp test for testing. Copied llapp_tut.cpp from server directory.
The commented line indicates threading breakage in the LLApp test, but I have not seen evidence of this so far while testing on linux.
2011-09-09 17:22:37 -04:00
Logan Dethrow 8a289a161d Re-enabled and fixed llsd_new_tut.cpp by copying the fixed version from the server test directory. 2011-09-09 15:52:36 -04:00
Logan Dethrow 3151b6ce50 Fixed llhttpclient_tut.cpp by initializing the LLCurl class during test setup. 2011-09-09 15:22:11 -04:00