summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llsdserialize_test.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-08-17 09:28:53 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-08-17 09:28:53 -0400
commit0f8b8fd7a338272e3464e809b94eb0443d99e275 (patch)
treef82e5761f550d602ca65e39d0393613e9415e54d /indra/llcommon/tests/llsdserialize_test.cpp
parentdf41a3a7dfe7f3bc69eabef3a4afe0e9f2a8d8e1 (diff)
DRTVWR-588: Eliminate APR and Boost.Phoenix from NamedTempFile.
NamedTempFile used to use APR calls to discover a suitable temp directory, synthesize a temp filename template, generate the unique file, write its content and ultimately delete it. This required a reference to gAPRPoolp as the default value of an optional constructor argument in case some usage demanded an alternative APR memory pool. It also used Boost.Phoenix placeholders to magically synthesize a callable. Replace APR calls with Boost.Filesystem; replace Boost.Phoenix with lambdas. Break out unique path generation logic as static NamedTempFile::temp_path(). In a nod to GitHub Actions builds, honor RUNNER_TEMP environment variable if set. test.cpp's RecordToTempFile need no longer pass an apr_pool_t* to NamedTempFile. NamedTempFile's constructor now accepts an optional suffix, making subclass NamedExtTempFile nearly trivial. It no longer needs to create or remove a symlink, for which it used to use APR calls. llprocess_test.cpp's NamedTempDir used to use Python's tempfile.mkdtemp() to create a temp directory, and apr_dir_remove() to destroy it. Replace both with NamedTempFile::temp_path() and Boost.Filesystem. Also add diagnostic output for LLProcess test failure. If llprocess_test cannot launch a child process, notice the APR_LOG environment variable recognized by our patched apr_suite to engage logging, and report the contents of that file.
Diffstat (limited to 'indra/llcommon/tests/llsdserialize_test.cpp')
0 files changed, 0 insertions, 0 deletions