| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (%struct-flock, F_SETLKW, F_SETLK, F_xxLCK)
(fcntl-flock): Move to...
* guix/build/syscalls.scm: ... here. New variables.
* guix/nar.scm: Adjust imports accordingly.
* tests/utils.scm ("fcntl-flock wait", "fcntl-flock non-blocking"): Move
to...
* tests/syscalls.scm: ... here. New tests.
(temp-file): New variable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (compile-time-value, memoize, fold2)
(fold-tree, fold-tree-leaves): Move to...
* guix/combinators: ... here. New file.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists")
(fold-tree tests): Move to...
* tests/combinators.scm: ... here. New file.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
gnu/services/herd.scm, guix/build-system/gnu.scm,
guix/build-system/python.scm, guix/derivations.scm,
guix/gnu-maintenance.scm, guix/import/elpa.scm,
guix/scripts/archive.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/scripts/size.scm, guix/scripts/substitute.scm,
guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports
accordingly.
|
|
|
|
|
|
|
|
| |
This procedure was redundant with SRFI-1's 'break'.
* guix/utils.scm (split): Remove.
* tests/utils.scm ("split, element is in list")
("split, element is not in list"): Remove.
|
|
|
|
|
| |
* guix/utils.scm (edit-expression): New procedure.
* tests/utils.scm (edit-expression): New test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before that '.log' files for scheme tests were fragmented and not
included in test-suite.log. This unifies the semantics of SRFI-64 API
with Automake test suite.
* build-aux/test-driver.scm: New file.
* Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables.
(SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables.
(AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0.
* test-env.in: Silence guix-daemon.
* doc/guix.texi (Running the Test Suite): Describe how to display the
detailed results. Bug reports require only 'test-suite.log' file.
* tests/base32.scm, tests/build-utils.scm, tests/builders.scm,
tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm,
tests/cve.scm, tests/derivations.scm, tests/elpa.scm,
tests/file-systems.scm, tests/gem.scm, tests/gexp.scm,
tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm,
tests/gremlin.scm, tests/hackage.scm, tests/hash.scm,
tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm,
tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm,
tests/profiles.scm, tests/publish.scm, tests/pypi.scm,
tests/records.scm, tests/scripts-build.scm, tests/scripts.scm,
tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm,
tests/store.scm, tests/substitute.scm, tests/syscalls.scm,
tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm,
tests/utils.scm: Don't exit at the end of test groups.
* tests/containers.scm: Likewise. Use 'test-skip' instead of exiting
with error code 77.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This provides the ability to use numbers in package names.
Fixes <http://bugs.gnu.org/19219>.
* guix/utils.scm (package-name->name+version): New procedure.
* gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument.
Use the previous method when no package is found.
(specification->package+output, specification->package): Adapt
documentation to new syntax.
* doc/guix.texi (Invoking guix package, Invoking guix import): Likewise.
* guix/ui.scm (package-specification->name+version+output): Likewise.
* guix/scripts/import/hackage.scm (show-help): Likewise.
* tests/guix-build.sh: Adapt to new syntax.
* tests/guix-lint.sh: Likewise.
* tests/guix-package.sh: Likewise.
* tests/ui.scm ("package-specification->name+version+output"): Likewise.
* tests/utils.scm ("package-name->name+version"): Likewise.
* NEWS: Mention new syntax.
|
|
|
|
|
| |
* guix/utils.scm (delkw, ensure-keyword-arguments): New procedures.
* tests/utils.scm ("ensure-keyword-arguments"): New test.
|
|
|
|
|
| |
* guix/utils.scm (canonical-newline-port): New procedure.
* tests/utils.scm ("canonical-newline-port"): New test.
|
|
|
|
|
| |
* guix/utils.scm (split): New procedure.
* tests/utils.scm: Add tests.
|
|
|
|
|
| |
* guix/search-paths.scm (string-tokenize*): Export.
* tests/utils.scm ("string-tokenize*"): Adjust accordingly.
|
|
|
|
|
|
|
|
|
| |
* guix/scripts/package.scm (with-null-error-port,
evaluate-search-paths): Move to...
* guix/search-paths.scm: ... here.
* guix/utils.scm (string-tokenize*): Move to...
* guix/search-paths.scm: ... here.
* tests/utils.scm ("string-tokenize*"): Adjust accordingly.
|
|
|
|
|
| |
* guix/utils.scm (strip-keyword-arguments): New procedure.
* tests/utils.scm ("strip-keyword-arguments"): New test.
|
|
|
|
|
| |
* guix/utils.scm (fold-tree, fold-tree-leaves): New functions.
* tests/utils.scm: Add tests for them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes situations where the remote 'guix build' is invoked before the
.drv has been completely copied, as reported at
<https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00174.html>.
In some cases 'send-files' would return before the other end is done
importing the files, and so the subsequent 'guix build' invocation would
just miss the .drv file it refers to.
* guix/utils.scm (call-with-decompressed-port): Don't close PORT.
(call-with-compressed-output-port): Likewise.
* tests/utils.scm ("compressed-output-port + decompressed-port"): Adjust
accordingly.
* guix/scripts/offload.scm (send-files): Add explicit (close-pipe pipe)
call.
(retrieve-files): Likewise.
|
|
|
|
|
|
|
| |
Partially fixes <http://bugs.gnu.org/17212>.
* tests/utils.scm ("fcntl-flock wait", "fcntl-flock non-blocking"): Open
files in binary mode, with no buffering.
|
|
|
|
|
|
|
| |
* guix/utils.scm (call-with-decompressed-port,
call-with-compressed-output-port): New procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"):
Rewrite to use them.
|
|
|
|
|
|
|
| |
* guix/utils.scm (filtered-output-port, compressed-output-port): New
procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"): New
test.
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (decompressed-port, compressed-port): New procedures.
* guix/scripts/substitute-binary.scm (decompressed-port): Remove.
(guix-substitute-binary): Pass a symbol or #f as the first argument to
'decompress-port'.
* tests/utils.scm ("compressed-port, decompressed-port, non-file"): New
test.
|
|
|
|
|
|
|
| |
* guix/utils.scm (filtered-port): Make sure the 'execl' child process
always exits, and does (primitive-_exit 1) upon execution failure.
Use 'primitive-_exit' in the 'dump-port' child process.
* tests/utils.scm ("filtered-port, does not exist"): New test.
|
|
|
|
|
|
| |
* guix/utils.scm (F_SETLK): New variable.
(fcntl-flock): Add 'wait?' keyword parameter; honor it.
* tests/utils.scm ("fcntl-flock non-blocking"): New test.
|
|
|
|
|
|
|
|
|
| |
* tests/utils.scm (temp-file): New variable.
("fcntl-flock"): Rewrite to actually test whether the child process
waits for the lock to be released. The previous test was wrong
because (1) it expected F_SETLK semantics, not F_SETLKW, and (2) it
got EBADF because of a mismatch between the open mode and the lock
style.
|
|
|
|
|
|
| |
* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables.
(fcntl-flock): New procedure.
* tests/utils.scm ("fcntl-flock"): New test.
|
|
|
|
|
|
| |
* guix/utils.scm (string-replace-substring): New procedure. Based on
code by Mark H. Weaver.
* tests/utils.scm ("string-replace-substring"): New test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes Guile version comparisons when (version) has a
vendor-specific suffix.
Reported by Andreas Enge <andreas@enge.fr>.
* guix/utils.scm (guile-version>?): New procedure.
* tests/utils.scm ("guile-version>? 1.8", "guile-version>? 10.5"): New
tests.
* guix/scripts/substitute-binary.scm (fetch, progress-report-port): Use
`guile-version>?' instead of `version>?'.
* guix/http-client.scm (when-guile<=2.0.5, http-fetch): Likewise.
|
|
|
|
|
|
|
|
|
| |
* guix/scripts/substitute-binary.scm (fetch): In the `file' case, open
with the `b' flag, so that the coding cookie reading thing doesn't
lead to buffering some of the data (on 2.0.5).
* tests/utils.scm ("filtered-port, file"): Open with `r0b'. Fixes a
test failure with Guile 2.0.5 whereby the first byte of FILE would be
missing from DECOMPRESSED.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a bug whereby `read-response' would read more than just the
response, with the extra data going into the port's buffer; the
"bzip2 -dc" process spawned by `filtered-port' would not see the those
buffered data, which are definitely lost, and would bail out with
"bzip2: (stdin) is not a bzip2 file."
* guix/utils.scm (filtered-port): Document that INPUT must be
unbuffered.
* guix/web.scm (http-fetch): Add `buffered?' parameter. Call
`open-socket-for-uri' explicitly, and call `setvbuf' when BUFFERED? is
false. Pass the port to `http-get'. Close it upon 301/302.
* guix/scripts/substitute-binary.scm (fetch): Add `buffered?'
parameter. Pass it to `http-fetch'; honor it for `file' URIs.
(guix-substitute-binary): Call `fetch' with #:buffered? #f for port RAW.
* tests/utils.scm ("filtered-port, file"): Open FILE as unbuffered.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (define-record-type*): Move to...
* guix/records.scm: ... here. New file.
* guix/build-system.scm, guix/packages.scm: Use it.
* guix/gnu-maintenance.scm: Likewise.
(official-gnu-packages)[alist->record]: Remove.
* guix/scripts/substitute-binary.scm: Likewise.
(alist->record, object->fields): Remove.
* tests/utils.scm ("define-record-type*", "define-record-type* with
letrec* behavior", "define-record-type* & inherit",
"define-record-type* & inherit & letrec* behavior",
"define-record-type* & thunked", "define-record-type* & thunked &
default", "define-record-type* & thunked & inherited"): Move to...
* tests/records.scm: ... here. New file.
|
|\ |
|
| |
| |
| |
| |
| | |
* guix/utils.scm (string-tokenize*): New procedure.
* tests/utils.scm ("string-tokenize*"): New test.
|
|/
|
|
|
|
|
|
|
|
|
| |
* guix/scripts/substitute-binary.scm (filtered-port): Move to utils.scm.
(decompressed-port): Upon "none", return '() as the second value.
(guix-substitute-binary): Expect `decompressed-port' to return a list
of PIDs as its second value.
* guix/utils.scm (filtered-port): New procedure. Add case for when
INPUT is not `file-port?'.
* tests/utils.scm ("filtered-port, file", "filtered-port, non-file"):
New tests.
|
|
|
|
|
|
|
| |
* gnu/packages.scm (fold2): Remove.
* guix/utils.scm (fold2): New procedure. Generalization of the above to
one and two lists.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists"): New tests.
|
|
|
|
|
|
|
|
| |
* .dir-locals.el: Add more Scheme settings.
* guix-build.in, tests/base32.scm, tests/build-utils.scm,
tests/builders.scm, tests/derivations.scm, tests/packages.scm,
tests/snix.scm, tests/store.scm, tests/union.scm, tests/utils.scm:
Remove redundant Emacs local variable settings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: Add
a `thunked' parameter.
(thunked-field?, field-bindings): New procedures. Use the latter when
generating `letrec*' bindings.
[thunked-field?, thunked-field-accessor-name, field-spec->srfi-9,
thunked-field-accessor-name]: New procedures.
Use them when generating the `define-record-type' form, and to
generated thunk field accessors, along call to
`make-syntactic-constructor' with the new argument.
* tests/utils.scm ("define-record-type* & thunked",
"define-record-type* & thunked & default",
"define-record-type* & thunked & inherited"): New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change all license headers, except guix/build/* and ld-wrapper.scm, with
this code:
(use-modules (guix build utils)
(srfi srfi-1))
(fluid-set! %default-port-encoding "UTF-8")
(substitute* (remove (lambda (f)
(or (string-contains f ".tar.")
(string-contains f ".git/")
(string-contains f ".so")
(string-suffix? ".o" f)
(string-suffix? ".a" f)
(string-suffix? ".go" f)
(string-suffix? ".pdf" f)
(string-suffix? ".png" f)
(string-suffix? ".info" f)
(equal? (basename f) "guix-daemon")
(equal? (basename f) "nix-setuid-helper")
(string-contains f "nix-upstream/")
(string-contains f "distro/packages/bootstrap/")))
(find-files "." "\\.[a-z]+$"))
(("^([[:graph:]]+) This file is part of Guix." _ comment-start)
(string-append comment-start " This file is part of GNU Guix."))
(("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
(string-append comment-start
" GNU Guix --- Functional package management for GNU\n"))
(("^([[:graph:]]+) Guix is " _ comment-start)
(string-append comment-start " GNU Guix is "))
(("^([[:graph:]]+) along with Guix." _ comment-start)
(string-append comment-start " along with GNU Guix."))
(("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
(string-append comment-start " Copyright ©")))
Change headers using C-style comments manually.
|
|
|
|
|
| |
* tests/utils.scm ("store-path-package-name"): Use (%store-prefix)
instead of a hard-coded "/nix/store".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (bytevector-quintet-ref, bytevector-quintet-ref-right,
bytevector-quintet-length, bytevector-quintet-fold,
bytevector-quintet-fold-right, make-bytevector->base32-string,
%nix-base32-chars, %rfc4648-base32-chars, bytevector->base32-string,
bytevector->nix-base32-string, bytevector-quintet-set!,
bytevector-quintet-set-right!, base32-string-unfold,
base32-string-unfold-right, make-base32-string->bytevector,
base32-string->bytevector, nix-base32-string->bytevector): Move to...
* guix/base32.scm: ... here. New file.
* tests/utils.scm (%nix-hash, "bytevector->base32-string",
"base32-string->bytevector", "nix-base32-string->bytevector", "sha256
& bytevector->base32-string"): Move to...
* tests/base32.scm: ... here. New file
* guix-download.in, guix/derivations.scm, guix/packages.scm,
guix/snix.scm, tests/builders.scm, tests/derivations.scm: Adjust
accordingly.
* guix.scm (%public-modules): Add `base32'.
|
|
|
|
|
|
| |
* guix/utils.scm (package-name->name+version): New procedure.
* guix-package.in (guix-package)[find-package]: Use it.
* tests/utils.scm ("package-name->name+version"): New test.
|
|
|
|
|
| |
* guix/store.scm (store-path-package-name): New procedure.
* tests/utils.scm ("store-path-package-name"): New test.
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: New
`type' parameter. Add the `inherit' keyword and corresponding support
code.
* tests/utils.scm ("define-record-type* & inherit", "define-record-type*
& inherit & letrec* behavior"): New tests.
|
|
|
|
|
|
|
|
|
|
| |
* Makefile.am (.scm.go): Define $NIX_INSTANTIATE.
(TESTS_ENVIRONMENT): Likewise, and define $NIX_HASH.
* guix/utils.scm (nixpkgs-derivation): Use $NIX_INSTANTIATE when
defined.
* tests/utils.scm (%nix-hash): New variable.
("sha256 & bytevector->nix-base32-string"): Use it.
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (define-record-type*)[make-syntactic-constructor]: Bind
all the ((FIELD VALUE) ...) in a `letrec*'. Adjust `field-value'
accordingly.
* tests/utils.scm ("define-record-type* with letrec* behavior"): New
test.
|
|
|
|
|
|
| |
* guix/utils.scm (define-record-type*): New macro.
* tests/utils.scm ("define-record-type*"): New test.
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (gnu-triplet->nix-system): New procedure.
(%current-system): New variable.
* tests/utils.scm ("gnu-triplet->nix-system"): New test.
* tests/derivations.scm (%current-system): Remove. Update users to
use (%current-system) instead.
|
|
|
|
|
|
| |
* guix/utils.scm (base16-string->bytevector): New procedure.
* tests/utils.scm ("bytevector->base16-string->bytevector"): New test.
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (bytevector-quintet-set!,
bytevector-quintet-set-right!, base32-string-unfold,
base32-string-unfold-right, make-base32-string->bytevector,
base32-string->bytevector, nix-base32-string->bytevector): New
procedures.
* tests/utils.scm ("base32-string->bytevector",
"nix-base32-string->bytevector"): New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* guix/utils.scm (bytevector-quintet-ref-right,
bytevector-quintet-fold): New procedures.
(bytevector-quintet-fold-right): Add `quintet-fold' parameter; use it
instead of `bytevector-quintet-fold'.
(bytevector->base32-string): Pass BYTEVECTOR-QUINTET-FOLD as the
first parameter.
(bytevector->nix-base32-string): Pass BYTEVECTOR-QUINTET-FOLD-RIGHT as
the first parameter.
* tests/utils.scm ("sha256 & bytevector->nix-base32-string"): New test.
|
|
* guix/utils.scm, tests/utils.scm: New files.
|