Commit Graph

11 Commits (3095f39fec022b5de34266c6df8a48f1796460cc)

Author SHA1 Message Date
positron 3095f39fec fix ENGINE-956
It is now possible to use shell environment variables in PER_USER_DIRECTORY and
PER_MACHINE_DIRECTORY, expanded at *run* time.  This is meant to allow more
freedom to the deployment engineer, without affecting development.  Notice that,
when PER_USER_DIRECTORY and PER_MACHINE_DIRECTORY are defined in the Makefile,
dollar signs must be escaped (a dollar becomes a double dollar) because of
*make* syntax: this has nothing to do with pEp engine code.
Expansion follows the Unix shell $VARIABLE syntax: ${VARIABLE} is not supported.
See _expand_variables.

src/platform_unix.c contained some duplicated logic about caching path results
into static variables; this change set would have added to the complexity by
calling the new path expansion function, in many different places.  Seize the
occasion for factoring.

Do not change the meaning of PER_USER_DIRECTORY yet; I would like to do it,
since it is confusing and inconsistent with per_user_directory
(PER_USER_DIRECTORY is a relative path on Unix, while per_user_directory is
absolute), but the actual semantics with respect to $HOME and $PEP_HOME is
complicated and I do not want to break it.
New API function per_user_relative_directory.

Remove the ugly "reset" argument from unix_local_db (which was conditionally
defined according to NDEBUG!), used to force path re-computation in the test
suite after changing an environment variable so as to work in a new "home"
directory.  In the place of this reset argument add clear API functions to the
engine for handling the cache.
My quick grapping and IRC interaction confirm that nobody was using the
functionality out of the engine test suite.  Adapt the test suite to use the new
API.

Tentatively add caching and expansion functionality to android_system_db as well.
2 years ago
Krista Bennett 0ddd929d8a ENGINE-938: Added notifyHandshake callback and status 2 years ago
Krista Bennett 46c2df4785 Refactored test_utils name. 2 years ago
Krista 'DarthMama' Bennett a06718c070 removed parameter assert checks 3 years ago
Krista 'DarthMama' Bennett 547aa4dbe6 ENGINE-781: infrastructure to test w/ callback runs on empty pass list 3 years ago
Krista 'DarthMama' Bennett b036c8f14b ENGINE-781: hey, at least it doesn't break stuff. Existing tests pass. 3 years ago
Krista 'DarthMama' Bennett 961d702ddc gnupg, netpgp purged from code 3 years ago
Krista 'DarthMama' Bennett a62772260b removed gpg-specific test code 3 years ago
Krista 'DarthMama' Bennett 32cf350818 Change conf dir path to .pEp in tests 4 years ago
Krista 'DarthMama' Bennett fcd91f308d Spammy output can now be enabled by putting -DDEBUG_OUTPUT into your CXXFLAGS in local.conf - please use c++ ostreams for output in tests, and use the defined ostream output_stream instead of std::cout/std::cerr. 4 years ago
Krista 'DarthMama' Bennett 3901e614cb bastardised in-between state of conversion. guaranteed to be broken. 4 years ago