summaryrefslogtreecommitdiff
path: root/tests/inferior.scm
AgeCommit message (Expand)Author
2022-07-08guix: inferior: Fix the behaviour of open-inferior #:error-port....I'm looking at this as the Guix Data Service uses this behaviour to record and display logs from inferior processes. * guix/inferior.scm (open-bidirectional-pipe): Call dup2 for file descriptor 2, passing either the file number for the current error port, or a file descriptor for /dev/null. * tests/inferior.scm ("#:error-port stderr", "#:error-port pipe"): Add two new tests that cover some of the #:error-port behaviour. Christopher Baines
2022-05-20inferior: Close duplicate socketpair file descriptor....* guix/inferior.scm (open-bidirectional-pipe): Pass SOCK_CLOEXEC to 'socketpair'. * tests/inferior.scm ("close-inferior"): Add test. Ludovic Courtès
2021-05-15inferior: Support querying package replacements....I'm looking at this to help with adding support for looking up package replacements to store in the Guix Data Service. * guix/inferior.scm (inferior-package-replacement): New procedure. * tests/inferior.scm ("inferior-package-replacement"): New test. Christopher Baines
2021-04-29inferior: Make sure test refers to guile@3.0....* tests/inferior.scm ("inferior-package-inputs"): Compare with GUILE-3.0-LATEST since that's what 'lookup-inferior-packages' returns. Ludovic Courtès
2021-01-21repl: Fix exception handling for interpreted code....The 'stack' variable could be #f when code is interpreted, which in practice happens when running in "legacy" mode--i.e., when 'open-inferior' invokes "guile" instead of "guix repl". * guix/repl.scm (send-repl-response)[handle-exception]: Check whether STACK is true before passing it to 'stack->frames'. * tests/inferior.scm ("&inferior-exception, legacy mode"): New test. Ludovic Courtès
2021-01-21inferior: Add 'inferior-eval-with-store' tests....* tests/inferior.scm ("inferior-eval-with-store, exception") ("inferior-eval-with-store, not a procedure"): New tests. Ludovic Courtès
2020-03-21Merge branch 'master' into core-updatesMarius Bakke
2020-03-19inferior: '&inferior-exception' includes a stack trace....* guix/inferior.scm (port->inferior): Bump protocol to (0 1 1). (&inferior-exception)[stack]: New field. (read-repl-response): Recognize 'exception' form for protocol (0 1 1). * tests/inferior.scm ("&inferior-exception"): Check the value returned by 'inferior-exception-stack'. Ludovic Courtès
2020-03-17tests: Fix up reference to 'guile-2.2'....This is a followup to b6bee63bed4f013064c0d902e7c8b83ed7514ade. * tests/inferior.scm ("inferior-package-search-paths"): Refer to 'guile-3.0' instead of 'guile-2.2'. Ludovic Courtès
2020-03-12inferior: Distinguish inferior exceptions....This avoids ambiguities when looking at a backtrace where the exception was actually thrown by an inferior in a very different context. * guix/inferior.scm (&inferior-exception): New condition type. (read-repl-response): Add optional 'inferior' parameter. Raise '&inferior-exception' instead of rethrowing to KEY when receiving an 'exception' message. (read-inferior-response): Pass INFERIOR to 'read-repl-response'. * tests/inferior.scm ("&inferior-exception"): New test. Ludovic Courtès
2019-09-21inferior: Propagate '&store-protocol-error' error conditions....Until now '&store-protocol-error' conditions raised in the inferior would not be correctly propagated because SRFI-35 records lack a read syntax. Reported at <https://bugs.gnu.org/37449> by Carl Dong <contact@carldong.me>. * guix/inferior.scm (port->inferior): Import (srfi srfi-34) in the inferior. (inferior-eval-with-store): Define 'error?' and 'error-message'. Wrap call to PROC in 'guard'. Check the response of INFERIOR for a 'store-protocol-error' or a 'result' tag. * tests/inferior.scm ("inferior-eval-with-store, &store-protocol-error"): New test. Ludovic Courtès
2019-02-12inferior: Add 'inferior-available-packages'....* guix/inferior.scm (inferior-available-packages): New procedure. * tests/inferior.scm ("inferior-available-packages"): New test. Ludovic Courtès
2018-11-28inferior: Add 'inferior-eval-with-store'....* guix/inferior.scm (inferior-eval-with-store): New procedure, with code formerly in 'inferior-package-derivation'. (inferior-package-derivation): Rewrite in terms of 'inferior-eval-with-store'. * tests/inferior.scm ("inferior-eval-with-store"): New test. Ludovic Courtès
2018-09-21profiles: 'packages->manifest' now accepts inferior packages....* guix/profiles.scm (packages->manifest)[inferiors-loaded?]: New variable. [inferior->entry]: New procedure. Accept inferior packages when INFERIORS-LOADED? is true. * tests/guix-package.sh: Add test using a manifest with an inferior. * tests/inferior.scm ("packages->manifest"): New test. Ludovic Courtès
2018-09-21inferior: Add 'inferior-package->manifest-entry'....* guix/inferior.scm (inferior-package->manifest-entry): New procedure. * tests/inferior.scm (manifest-entry->list): New procedure. ("inferior-package->manifest-entry"): New test. Ludovic Courtès
2018-09-21inferior: Add 'inferior-package-search-paths' & co....* guix/inferior.scm (%inferior-package-search-paths) (inferior-package-native-search-paths) (inferior-package-search-paths) (inferior-package-transitive-native-search-paths): New procedures. * tests/inferior.scm ("inferior-package-search-paths"): New test. Ludovic Courtès
2018-09-21inferior: Add 'inferior-package-inputs' & co....* guix/inferior.scm (open-inferior): Use (ice-9 match). (inferior-package-input-field, inferior-package-inputs): (inferior-package-native-inputs) (inferior-package-propagated-inputs) (inferior-package-transitive-propagated-inputs): New procedures. * tests/inferior.scm ("inferior-package-inputs"): New test. inputs fixlet Ludovic Courtès
2018-09-21inferior: Add 'lookup-inferior-packages'....* guix/inferior.scm (<inferior>)[packages, table]: New fields. (open-inferior): Initialize these new fields. (inferior-packages): Rename to... (%inferior-packages): ... this. (inferior-packages): New procedure; force the promise. (%inferior-package-table, lookup-inferior-packages): New procedures. * tests/inferior.scm ("lookup-inferior-packages") ("lookup-inferior-packages and eq?-ness"): New tests. Ludovic Courtès
2018-09-21inferior: Add 'inferior-package-derivation'....* guix/inferior.scm (read-inferior-response) (send-inferior-request): New procedures. (inferior-eval): Rewrite in terms of these. (proxy, inferior-package-derivation, inferior-package->derivation) (package-compiler): New procedures. * tests/inferior.scm ("inferior-package-derivation"): New test. Ludovic Courtès
2018-09-04inferior: Add home-page and location package accessors....* guix/inferior.scm (inferior-package-home-page) (inferior-package-location): New procedures. * tests/inferior.scm ("inferior-packages"): Test them. Ludovic Courtès
2018-07-13Add (guix inferior) and (guix scripts repl)....* guix/inferior.scm, guix/scripts/repl.scm, tests/inferior.scm: New files. * Makefile.am (MODULES): Add 'guix/scripts/repl.scm' and 'guix/inferior.scm'. (SCM_TESTS): Add 'tests/inferior.scm'. * doc/guix.texi (Invoking guix repl): New node. Ludovic Courtès