aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* gpgscm: Move the test runner to the Scheme library.Justus Winter2016-12-131-0/+151
| | | | | | | * tests/openpgp/run-tests.scm: Move most of the code... * tests/gpgscm/tests.scm: ... here. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve library functions.Justus Winter2016-12-132-34/+88
| | | | | | | | | | | | | * tests/gpgscm/tests.scm (absolute-path?): New function. (canonical-path): Use the new function. * tests/gpgscm/lib.scm (string-split-pln): New function. (string-indexp, string-splitp): Likewise. (string-splitn): Express using the above function. (string-ltrim, string-rtrim): Fix corner case. (list->string-reversed): New function. (read-line): Fix performance. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Better error reporting.Justus Winter2016-12-086-62/+122
| | | | | | | | | | | | | | | | | | | | * tests/gpgscm/ffi.scm: Move the customized exception handling and atexit logic... * tests/gpgscm/init.scm: ... here. (throw): Record the current history. (throw'): New function that is history-aware. (rethrow): New function. (*error-hook*): Use the new throw'. * tests/gpgscm/main.c (load): Fix error handling. (main): Save and use the 'sc->retcode' as exit code. * tests/gpgscm/repl.scm (repl): Print call history. * tests/gpgscm/scheme.c (_Error_1): Make a snapshot of the history, use it to provide a accurate location of the expression causing the error at runtime, and hand the history trace to the '*error-hook*'. (opexe_5): Tag all lists at parse time with the current location. * tests/gpgscm/tests.scm: Update calls to 'throw', use 'rethrow'. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Keep a history of calls for error messages.Justus Winter2016-12-085-4/+339
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/init.scm (vm-history-print): New function. * tests/gpgscm/opdefines.h: New opcodes 'CALLSTACK_POP', 'APPLY_CODE', and 'VM_HISTORY'. * tests/gpgscm/scheme-private.h (struct history): New definition. (struct scheme): New field 'history'. * tests/gpgscm/scheme.c (gc): Mark objects in the history. (history_free): New function. (history_init): Likewise. (history_mark): Likewise. (add_mod): New macro. (sub_mod): Likewise. (tailstack_clear): New function. (callstack_pop): Likewise. (callstack_push): Likewise. (tailstack_push): Likewise. (tailstack_flatten): Likewise. (callstack_flatten): Likewise. (history_flatten): Likewise. (opexe_0): New variable 'callsite', keep track of the expression if it is a call, implement the new opcodes, record function applications in the history. (opexe_6): Implement new opcode. (scheme_init_custom_alloc): Initialize history. (scheme_deinit): Free history. * tests/gpgscm/scheme.h (USE_HISTORY): New macro. -- This patch makes TinySCHEME keep a history of function calls. This history can be used to produce helpful error messages. The history data structure is inspired by MIT/GNU Scheme. Signed-off-by: Justus Winter <[email protected]> fu history
* gpgscm: Add flag TAIL_CONTEXT.Justus Winter2016-12-081-8/+44
| | | | | | | | | | | * tests/gpgscm/scheme.c (S_FLAG_TAIL_CONTEXT): New macro. This flag indicates that the interpreter is evaluating an expression in a tail context (see R5RS, section 3.5). (opexe_0): Clear and set the flag according to the rules layed out in R5RS, section 3.5. (opexe_1): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add flags to the interpreter.Justus Winter2016-12-082-5/+44
| | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'. * tests/gpgscm/scheme.c (S_OP_MASK): New macro. (S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise. (_s_return): Unpack the encoded opcode and flags. (s_save): Encode the flags along with the opcode. Use normal integers to encode the result. (scheme_init_custom_alloc): Initialize 'op' and 'flags'. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Implement tags.Justus Winter2016-12-083-0/+91
| | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags. * tests/gpgscm/scheme.c (T_TAGGED): New macro. (mk_tagged_value): New function. (has_tag): Likewise. (get_tag): Likewise. (mark): Mark tag. (opexe_4): Implement new opcodes. * tests/gpgscm/scheme.h (USE_TAGS): New macro. -- Tags are similar to property lists, but property lists can only be attached to symbols. Tags can not be attached to an existing object, but a tagged copy can be created. Once done, the tag can be manipulated in constant time. Using this during parsing will enable us to produce meaningful error messages. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Generalize 'for-each-p'.Justus Winter2016-12-081-7/+8
| | | | | | | | * tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like for-each. (for-each-p'): Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Rename 'error' to 'fail'.Justus Winter2016-12-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (error): Rename to 'fail'. 'error' is a primitive function (an opcode) of the TinySCHEME vm, and 'error' is also defined by R6RS. Better avoid redefining that. Fix all call sites. * tests/openpgp/4gb-packet.scm: Adapt. * tests/openpgp/decrypt-multifile.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/gpgv-forged-keyring.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/issue2015.scm: Likewise. * tests/openpgp/issue2346.scm: Likewise. * tests/openpgp/issue2419.scm: Likewise. * tests/openpgp/key-selection.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/setup.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/ssh-import.scm: Likewise. * tests/openpgp/tofu.scm: Likewise. * tests/openpgp/verify.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* tests: Change (interactive-shell) to start an interactive shellNeal H. Walfield2016-12-061-1/+1
| | | | | | | * tests/gpgscm/tests.scm (interactive-shell): Start an interactive shell. Signed-off-by: Neal H. Walfield <[email protected]>
* gpgscm: Avoid truncating pointers.Justus Winter2016-11-291-2/+3
| | | | | | | * tests/gpgscm/scheme.c (_alloc_cellseg): Avoid truncating pointers on systems where sizeof(unsigned long) < sizeof(void *). Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make 'reverse' compatible with 'reverse_in_place'.Justus Winter2016-11-231-4/+4
| | | | | | | | * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator argument. (opexe_4): Update callsite. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Clean sweeped cells.Justus Winter2016-11-231-2/+2
| | | | | | * tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix initialization of 'sink'.Justus Winter2016-11-231-1/+1
| | | | | | | * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Also initialize cdr. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Refactor.Justus Winter2016-11-221-6/+6
| | | | | | * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix property lists.Justus Winter2016-11-222-32/+56
| | | | | | | | | | | | * tests/gpgscm/opdefines.h (put, get): Check arguments. Also rename to 'set-symbol-property' and 'symbol-property', the names used by Guile, because put and get are too unspecific. * tests/gpgscm/scheme.c (hasprop): Only symbols have property lists. (get_property): New function. (set_property): Likewise. (opexe_4): Use the new functions. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix installation of error handler.Justus Winter2016-11-221-0/+1
| | | | | | | * tests/gpgscm/ffi.scm: Set '*error-hook*' again so that the interpreter will use our function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Use a static pool of cells for small integers.Justus Winter2016-11-223-19/+108
| | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): New fields for the static integer cells. * tests/gpgscm/scheme.c (_alloc_cellseg): New function. (alloc_cellseg): Use the new function. (MAX_SMALL_INTEGER): New macro. (initialize_small_integers): New function. (mk_small_integer): Likewise. (mk_integer): Return a small integer if possible. (_s_return): Do not free 'op' if it is a small integer. (s_save): Use a small integer to box the opcode. (scheme_init_custom_alloc): Initialize small integers. (scheme_deinit): Free chunk of small integers. * tests/gpgscm/scheme.h (USE_SMALL_INTEGERS): New macro. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Re-enable the garbage collector in case of errors.Justus Winter2016-11-171-1/+3
| | | | | | | * tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'. Fixes-commit: 83c184a66b73f312425b01008f0495610e5329a4 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix string.Justus Winter2016-11-171-1/+1
| | | | | | * tests/gpgscm/scheme.c (type_to_string): Fix string. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Mark cells requiring finalization.Justus Winter2016-11-151-5/+6
| | | | | | | | | | | | | | | * tests/gpgscm/scheme.c (T_FINALIZE): New macro. (mk_port): Use the new macro. (mk_foreign_object): Likewise. (mk_counted_string): Likewise. (mk_empty_string): Likewise. (gc): Only call 'finalize_cell' for cells with the new flag. -- This speeds up the sweep phase of the garbage collector considerably because most cells do not require finalization. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover more cells.Justus Winter2016-11-151-0/+1
| | | | | | | | * tests/gpgscm/scheme.c (_s_return): Recover the cell holding the opcode. Fixes-commit: e0cbd3389e2dd6ec19ee3a4c7bad81fa0f1907f5 Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Avoid cell allocation overhead.Justus Winter2016-11-142-44/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): New fields 'inhibit_gc', 'reserved_cells', and 'reserved_lineno'. * tests/gpgscm/scheme.c (GC_ENABLED): New macro. (USE_GC_LOCKING): Likewise. (gc_reservations): Likewise. (gc_reservation_failure): New function. (_gc_disable): Likewise. (gc_disable): New macro. (gc_enable): Likewise. (gc_enabled): Likewise. (gc_consume): Likewise. (get_cell_x): Consume reserved cell if garbage collection is disabled. (_get_cell): Assert that gc is enabled. (get_cell): Only record cell in the list of recently allocated cells if gc is enabled. (get_vector_object): Likewise. (gc): Assert that gc is enabled. (s_return): Add comment, adjust call to '_s_return'. (s_return_enable_gc): New macro. (_s_return): Add flag 'enable_gc' and re-enable gc if set. (oblist_add_by_name): Use the new facilities to protect the allocations. (new_frame_in_env): Likewise. (new_slot_spec_in_env): Likewise. (s_save): Likewise. (opexe_0): Likewise. (opexe_1): Likewise. (opexe_2): Likewise. (opexe_5): Likewise. (opexe_6): Likewise. (scheme_init_custom_alloc): Initialize the new fields. -- Every time a cell is allocated, the interpreter may run out of free cells and do a garbage collection. This is problematic because it might garbage collect objects that have been allocated, but are not yet made available to the interpreter. Previously, we would plug such newly allocated cells into the list of newly allocated objects rooted at car(sc->sink), but that requires allocating yet another cell increasing pressure on the memory management system. A faster alternative is to preallocate the cells needed for an operation and make sure the garbage collection is not run until all allocated objects are plugged in. This can be done with gc_disable and gc_enable. This optimization can be applied incrementally. This commit picks all low-hanging fruits. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover cells from the list of recently allocated cells.Justus Winter2016-11-101-6/+11
| | | | | | * tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Recover cells used to maintain interpreter state.Justus Winter2016-11-101-8/+31
| | | | | | | | | | * tests/gpgscm/scheme.c (free_cell): New function. (free_cons): Likewise. (_s_return): Use the new function to recover cells used to save the state of the interpreter in 's_save'. This reduces the need to do a garbage collection considerably. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Reduce opcode dispatch overhead.Justus Winter2016-11-102-228/+256
| | | | | | | | | | | | | | * tests/gpgscm/scheme.c (s_thread_to): New macro. (CASE): Likewise. (opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace 's_goto' with 's_thread_to' where applicable. -- This is a straight-forward optimization that replaces 's_goto' in certain cases. Instead of returning to the calling function, and dispatching the next opcode, we can jump to the opcode handler. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Make the compile-hook configurable.Justus Winter2016-11-103-1/+12
| | | | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Make field 'COMPILE_HOOK' optional. * tests/gpgscm/scheme.c (opexe_0): Fix guard. (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'. * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Drop obsolete commented-out code.Justus Winter2016-11-101-19/+0
| | | | | | * tests/gpgscm/scheme.c (opexe_5): Drop obsolete code. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Remove dubious stack implementation.Justus Winter2016-11-103-95/+0
| | | | | | | | * tests/gpgscm/scheme-private.h (struct scheme): Remove related fields. * tests/gpgscm/scheme.c: Drop all !USE_SCHEME_STACK code. * tests/gpgscm/scheme.h (USE_SCHEME_STACK): Remove macro. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Expose seek and associated constants.Justus Winter2016-11-082-0/+27
| | | | | | | | * tests/gpgscm/ffi.c (do_seek): New function. (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'. * tests/gpgscm/lib.scm: Document the new function. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix error message.Justus Winter2016-11-081-18/+21
| | | | | | | * tests/gpgscm/ffi.c (do_wait_processes): Fix and improve error messages. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Generalize splice to write to multiple sinks.Justus Winter2016-11-072-7/+42
| | | | | | | | * tests/gpgscm/ffi.c (ordinal_suffix): New function. (do_splice): Generalize splice to write to multiple sinks. * tests/gpgscm/lib.scm (splice): Document this fact. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Drop 'len' argument from splice.Justus Winter2016-11-072-11/+5
| | | | | | | * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it. * tests/gpgscm/lib.scm (splice): Document foreign function. Signed-off-by: Justus Winter <[email protected]>
* tests: Move environment creation and teardown into each test.Justus Winter2016-11-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/tests.scm (log): New function. * tests/openpgp/run-tests.scm (run-tests-parallel): Do not run the startup and teardown scripts. (run-tests-sequential): Likewise. * tests/openpgp/setup.scm: Move all functions... * tests/openpgp/defs.scm: ... here and make them less verbose. (setup-environment): New function. (setup-legacy-environment): Likewise. (start-agent): Make less verbose, run 'stop-agent' at interpreter exit. (stop-agent): Make less verbose. * tests/openpgp/finish.scm: Drop file. * tests/openpgp/Makefile.am (EXTRA_DIST): Drop removed file. * tests/openpgp/4gb-packet.scm: Use 'setup-environment' or 'setup-legacy-environment' as appropriate. * tests/openpgp/armdetach.scm: Likewise. * tests/openpgp/armdetachm.scm: Likewise. * tests/openpgp/armencrypt.scm: Likewise. * tests/openpgp/armencryptp.scm: Likewise. * tests/openpgp/armor.scm: Likewise. * tests/openpgp/armsignencrypt.scm: Likewise. * tests/openpgp/armsigs.scm: Likewise. * tests/openpgp/clearsig.scm: Likewise. * tests/openpgp/conventional-mdc.scm: Likewise. * tests/openpgp/conventional.scm: Likewise. * tests/openpgp/decrypt-dsa.scm: Likewise. * tests/openpgp/decrypt.scm: Likewise. * tests/openpgp/default-key.scm: Likewise. * tests/openpgp/detach.scm: Likewise. * tests/openpgp/detachm.scm: Likewise. * tests/openpgp/ecc.scm: Likewise. * tests/openpgp/encrypt-dsa.scm: Likewise. * tests/openpgp/encrypt.scm: Likewise. * tests/openpgp/encryptp.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/finish.scm: Likewise. * tests/openpgp/genkey1024.scm: Likewise. * tests/openpgp/gpgtar.scm: Likewise. * tests/openpgp/gpgv-forged-keyring.scm: Likewise. * tests/openpgp/import.scm: Likewise. * tests/openpgp/issue2015.scm: Likewise. * tests/openpgp/issue2417.scm: Likewise. * tests/openpgp/issue2419.scm: Likewise. * tests/openpgp/key-selection.scm: Likewise. * tests/openpgp/mds.scm: Likewise. * tests/openpgp/multisig.scm: Likewise. * tests/openpgp/quick-key-manipulation.scm: Likewise. * tests/openpgp/seat.scm: Likewise. * tests/openpgp/shell.scm: Likewise. * tests/openpgp/signencrypt-dsa.scm: Likewise. * tests/openpgp/signencrypt.scm: Likewise. * tests/openpgp/sigs-dsa.scm: Likewise. * tests/openpgp/sigs.scm: Likewise. * tests/openpgp/ssh.scm: Likewise. * tests/openpgp/tofu.scm: Likewise. * tests/openpgp/use-exact-key.scm: Likewise. * tests/openpgp/verify.scm: Likewise. * tests/openpgp/version.scm: Likewise. * tests/openpgp/issue2346.scm: Likewise and simplify. -- The previous Bourne Shell-based test suite created the environment before running all tests, and tore it down after executing them. When we created the Scheme-based test suite, we kept this design at first, but introduced a way to run each test in its own environment to prevent tests from interfering with each other. Nevertheless, every test started out with the same environment. Move the creation of the test environment into each test. This gives us finer control over the environment each test is run in. It also makes it possible to run each test by simply executing it using gpgscm without the use of the runner. Furthermore, it has the neat side-effect of speeding up the test suite if run in parallel. Signed-off-by: Justus Winter <[email protected]>
* gpgscm,w32: Provide schemish file handling for binary files.Justus Winter2016-11-071-0/+14
| | | | | | | * tests/gpgscm/lib.scm (call-with-binary-input-file): New function. (call-with-binary-output-file): Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Add support for pseudo-random numbers.Justus Winter2016-11-072-0/+94
| | | | | | | | | | | | * tests/gpgscm/ffi.c (do_getpid): New function. (do_srandom): Likewise. (random_scaled): Likewise. (do_random): Likewise. (do_make_random_string): Likewise. (ffi_init): Expose the new functions. * tests/gpgscm/lib.scm: Document the new functions. Signed-off-by: Justus Winter <[email protected]>
* Change all http://www.gnu.org in license notices to https://Werner Koch2016-11-058-8/+8
| | | | --
* gpgscm: Fix printing strings containing zero bytes.Justus Winter2016-11-041-1/+3
| | | | | | | * tests/gpgscm/scheme.c (atom2str): Fix computing the length of Scheme strings. Scheme strings can contain zero bytes. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Implement 'atexit'.Justus Winter2016-11-042-0/+19
| | | | | | | | | | | | * tests/gpgscm/ffi.scm (throw): Run *run-atexit-handlers* when terminating the interpreter. (*atexit-handlers*): New variable. (*run-atexit-handlers*): New function. (atexit): Likewise. * tests/gpgscm/main.c (main): Run *run-atexit-handlers* at normal interpreter shutdown. Signed-off-by: Justus Winter <[email protected]>
* gpgscm,tests: Add new functions to the test environment.Justus Winter2016-11-032-0/+26
| | | | | | | | | | * tests/gpgscm/lib.scm (first, last, powerset): New functions. * tests/gpgscm/tests.scm (interactive-shell): New function. * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file. * tests/openpgp/README: Document 'interactive-shell'. * tests/openpgp/shell.scm: New file. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Fix inclusion of readline header.Justus Winter2016-11-021-0/+1
| | | | | | | | * tests/gpgscm/ffi.c: Define magic macro to prevent the completion function from redefined. GnuPG-bug-id: 2824 Signed-off-by: Justus Winter <[email protected]>
* common,w32: Fix setting environment variables on Windows.Justus Winter2016-10-201-1/+3
| | | | | | | | | * common/sysutils.c (gnupg_setenv): Also update the environment block maintained by the C runtime. (gnupg_unsetenv): Likewise. * tests/gpgscm/ffi.c (do_setenv): Fix error handling. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Initialize nesting stack.Justus Winter2016-10-171-0/+1
| | | | | | | | * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize nesting stack. Fixes-commit: f2249b737055f84842778285bbeff5e61fa55225 Signed-off-by: Justus Winter <[email protected]>
* tests: Improve handling of Windows newlines.Justus Winter2016-10-071-0/+9
| | | | | | | | | | * tests/gpgscm/lib.scm (string-split-newlines): New function. * tests/openpgp/default-key.scm: Use new function. * tests/openpgp/defs.scm: Likewise. * tests/openpgp/export.scm: Likewise. * tests/openpgp/import.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve test of low-level functions.Justus Winter2016-10-072-1/+34
| | | | | | | * tests/gpgscm/t-child.c: Print large amounts of data. * tests/gpgscm/t-child.scm: Test that this works. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Improve path handling.Justus Winter2016-10-072-3/+18
| | | | | | | | | * tests/gpgscm/ffi.c (ffi_init): New Scheme variable '*win32*'. * tests/gpgscm/tests.scm (canonical-path): Correctly handle paths with drive letter on Windows. Use 'path-join'. (path-expand): Use 'path-join'. Signed-off-by: Justus Winter <[email protected]>
* gpgscm: Update callsite of 'gnupg_spawn_process'.Justus Winter2016-10-061-1/+1
| | | | | | | | | * tests/gpgscm/ffi.c (do_spawn_process): Adapt to the changes to 'gnupg_spawn_process'. Fixes-commit: 44a32455 Fixes-commit: 96c7901e Signed-off-by: Justus Winter <[email protected]>
* tests,w32: Do not expose 'glob' to gpgscm.Justus Winter2016-10-041-38/+0
| | | | | | | | | | * tests/gpgscm/ffi.c (do_glob): Remove function. (ffi_init): Likewise. -- 'glob' is not available on mingw, and portability is the whole point of gpgscm. Signed-off-by: Justus Winter <[email protected]>
* tests: Refine the repl function.Justus Winter2016-09-191-21/+21
| | | | | | | | | | | | | | * tests/gpgscm/repl.scm (repl): Add an argument 'environment'. (interactive-repl): Add an optional argument 'environment'. -- With this change, we can drop (interactive-repl (current-environment)) anywhere into the code and do some interactive debugging. Signed-off-by: Justus Winter <[email protected]>
* tests: Implement interpreter shutdown using exceptions.Justus Winter2016-09-192-1/+23
| | | | | | | | | | | * tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'. * tests/gpgscm/ffi.scm (*interpreter-exit*): New variable. (throw): New function. (exit): New function. -- This allows a proper cleanup of resources. Signed-off-by: Justus Winter <[email protected]>