[PATCH consfigurator v2 5/6] add gnupg scaffolding for test suite

David Bremner david at tethera.net
Fri Mar 11 10:56:11 GMT 2022


Sean Whitton <spwhitton at spwhitton.name> writes:

>
> Ah I see now, it's because you need to affect GnuPG as invoked down in
> GPG-FILE-AS-STRING, right?  I guess we don't have a good mechanism to
> mock that function atm.
>
> I'd like to suggest adding a DEFPARAMETER in data/util.lisp, and if it's
> non-nil then GPG-FILE-AS-STRING wraps `env GNUPGHOME=${that-defparam}`
> around the command invocation.  If that DEFPARAMETER is exported then
> the test suite can just bind it around running the tests.
>
> I don't think this is too ad hoc because a user might want to setq or
> let-bind that variable if they want to retrieve data using another gpg
> homedir?  What do you think?

Yeah, it seems reasonable. Also we can avoid env by conditionally
passing --homedir to gpg. But the parameter should maybe live in package
consfigurator? Then what about the functions in data/util.lisp?
gpg-file-as-string can certainly reference the parameter by qualified
path, but maybe it would be less confusing to just move everything in
data/util.lisp into util.lisp?

d



More information about the sgo-software-discuss mailing list