Commit Graph

19 Commits (67bad0bd4b44cb1c6930422a00f363b5822182b7)

Author SHA1 Message Date
Andrey Lihatskiy 1b68f71348 #824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed 2024-04-29 07:56:09 +03:00
Nat Goodspeed c7546ea65e SL-18837: Make llsdserialize_test debug output conditional.
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-08 14:14:09 -04:00
Nat Goodspeed eb84585875 SL-18837: NamedTempFile must be binary mode on Windows. 2023-09-08 09:50:38 -04:00
Nat Goodspeed e933ace53b SL-18837: Try to bypass Windows perm problem with Python indirection. 2023-07-07 14:07:12 -04:00
Nat Goodspeed f54c121567 SL-18837: Try putting generated Python scripts in RUNNER_TEMP dir.
The claim is that the Windows Python interpreter is integrated somehow with
the OS such that a command line that tries to run Python with a script that
"looks suspicious" (i.e. in a system temp directory) fails with "Access
denied" without even loading the interpreter. At least that theory would
explain the "Access denied" errors we've been getting trying to run Python
scripts generated into the system temp directory by our integration tests.

Our hope is that generating such scripts into the GitHub RUNNER_TEMP directory
will work better.

As this test is specific to Windows, don't even bother running Mac builds.
2023-07-07 10:06:02 -04:00
Nat Goodspeed 004150a530 SL-18837: Concat path part with / rather than +=.
Using concatenation appends the intended filename to the parent directory
name, instead of putting the filename in the parent directory.
2023-06-06 16:27:43 -04:00
Nat Goodspeed e63c571d13 SL-18837: On Windows, NamedTempFile must convert from wstring 2023-06-06 13:34:01 -04:00
Nat Goodspeed 1db7ac7139 SL-18837: Make NamedTempFile name template compatible with Python.
The recommended template uses hyphens; change to underscores to be valid
Python temp module names.
2023-06-06 10:02:57 -04:00
Nat Goodspeed 6516c9d07d SL-18837: NamedTempFile back to std::function, use boost::phoenix <<
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-06 07:44:42 -04:00
Nat Goodspeed 26ca3e14d6 SL-18837: NamedTempFile must still disambiguate string literals. 2023-06-05 23:46:43 -04:00
Nat Goodspeed aab769e9d7 SL-18837: Make NamedTempFile revert to boost::function
from std::function, since some consumers still use (e.g.)
boost::phoenix::placeholders::arg1 to generate an inline callable.
2023-06-05 23:24:34 -04:00
Nat Goodspeed 6914ff6113 SL-18837: Use Boost.Filesystem for NamedTempFile, instead of APR. 2023-06-05 21:51:28 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nat Goodspeed d74d8ff7c5 Replace boost::lambda::_1 with boost::phoenix::placeholders::arg1.
Apparently in Boost 1.57 with Xcode 6, the combination of Boost.Lambda and
Boost.Function is broken -- Trac ticket 10864:
https://svn.boost.org/trac/boost/ticket/10864
However, Boost.Phoenix provides an acceptable replacement.
2014-12-10 11:15:56 -08:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Nat Goodspeed c8032de94e Add NamedExtTempFile to invent arbitrary name with specified ext.
This arises, for instance, if you want to be able to create a temporary Python
module you can import from test scripts. The Python module file MUST have the
.py extension.
2012-03-01 14:37:41 -05:00
Nat Goodspeed 51b26cab9a Any proper RAII class must either handle copying or be noncopyable.
NamedTempFile makes no attempt to deal with copying, therefore make it
noncopyable.
2012-01-17 20:30:46 -05:00
Nat Goodspeed a01dd3549c Make NamedTempFile::peep() a public member for debugging unit tests. 2012-01-17 18:40:05 -05:00
Nat Goodspeed b6a08ad007 Extract APR and temp-fixture-file helper code to indra/test.
Specifically:
Introduce ManageAPR class in indra/test/manageapr.h. This is useful for a
simple test program without lots of static constructors.
Extract NamedTempFile from llsdserialize_test.cpp to indra/test/
namedtempfile.h. Refactor to use APR file operations rather than platform-
dependent APIs.
Use NamedTempFile for llprocesslauncher_test.cpp.
2012-01-13 12:41:54 -05:00