summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
...
* tests: Move keys into ./tests/keys/ and add a third ed25519 key.Attila Lendvai2021-12-22
| | | | | | | | | | | | | | | The third key will be used in an upcoming commit. Rename public keys to .pub. * guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable. (%ed25519-3-secret-key-file): New variable. (%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file. (%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file. * tests/keys/ed25519-3.key: New file. * tests/keys/ed25519-3.sec: New file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* import: elpa: Support ‘upstream-name’ property.Xinglu Chen2021-12-18
| | | | | | | | | * guix/import/elpa.scm: (guix-package->elpa-name): New procedure. (latest-release): Use it. * tests/elpa.scm ("guix-package->elpa-name: without 'upstream-name' property") ("guix-package->elpa-name: with 'upstream-name' property"): Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* lint: Adjust patch file length check.Vagrant Cascadian2021-12-17
| | | | | | | | | | | With the switch to "ustar" format in commit bdf5c16ac052af2ca9d5c3acc4acbc08fd9fdbea, the maximum file length has increased. * guix/lint.scm (check-patch-file-names): Adjust margin used to check for patch file lengths. Increase allowable patch file length appropriate to new tar format. Extend warning to explain that long files may break 'make dist'. * tests/lint.scm: Update tests accordingly.
* import: cran: Fix description->package test.Tobias Geerinckx-Rice2021-12-18
| | | | | | | | This follows up on commit 5cd1019488c44081aaf030fbe8bc357d78daef23. * tests/cran.scm (description): Include a very long line. (description->package): Update the golden description to match the paragraph filling now performed by BEAUTIFY-DESCRIPTION.
* guix hash: Add git serializer.zimoun2021-12-17
| | | | | | | | | * guix/scripts/hash.scm (git-hash): New procedure. (%options): Use it. * tests/guix-hash.sh: Test it. * doc/guix.texi: Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix hash: Add 'serializer' option.zimoun2021-12-17
| | | | | | | | | | | | | * guix/scripts/hash.scm (%options): Deprecate 'recursive', add 'serializer'. (%default-options): Add 'serializer'. (nar-hash): New procedure. (default-hash): New procedure. (guix-hash)[file-hash]: Use them. (show-help): Adjust. * tests/guix-hash.scm: Adjust. * doc/guix.texi: Update. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix hash: Support several files.zimoun2021-12-17
| | | | | | | | | | * guix/scripts/hash.scm (guix-hash): Allow several files. [file-hash]: Catch system-error. [formatted-hash]: New procedure. * tests/guix-hash.sh: Add test. * doc/guix.texi (Invoking guix hash): Mention "one or more files". Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* Merge remote-tracking branch 'signed/master' into core-updatesMathieu Othacehe2021-12-10
|\
| * shell: When using '-D -f', '-D' has no effect on remaining packages.Ludovic Courtès2021-12-10
| | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/52093>. Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * guix/scripts/shell.scm (%options): In "--file" handler, add call to 'ensure-ad-hoc'. * tests/guix-shell.sh: Add test.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenRicardo Wurmus2021-12-05
|\|
| * build-system: haskell: Add ‘hackage-uri’ procedure.Xinglu Chen2021-12-01
| | | | | | | | | | | | | | | | | | * guix/build-system/haskell (hackage-uri): New procedure. * guix/import/hackage.scm (hackage-module->sexp, latest-release): Use it. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision, match-ghc-foo-import): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * daemon: Read substitute nar size as 'unsigned long long'.Ludovic Courtès2021-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/46212>. Reported by Christopher Baines <mail@cbaines.net>. Previously, the nar size returned by 'guix substitute' would be read as an 'int'; thus, values above 2^31 - 1 would be read and then stored as negative integers in the database. Regression introduced in 9dfa20a22ae0be3d3b01a7b3d422af97428c627e. * nix/libstore/build.cc (SubstitutionGoal::finished): Use templatized 'string2Int' instead of 'std::atoi' to get an 'unsigned long long', which is the type of 'hash.second'. * tests/store.scm ("substitute and large size"): New test.
| * daemon: Read unsigned nar size and download size from substituter.Ludovic Courtès2021-11-25
| | | | | | | | | | | | | | | | | | Fixes <https://issues.guix.gnu.org/51983>. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * nix/libstore/local-store.cc (LocalStore::querySubstitutablePathInfos): Expect 'unsigned long long' for 'downloadSize' and 'narSize'. * tests/store.scm ("substitute query and large size"): New test.
* | gexp: 'file-append' correctly handles bases without an expander.Ludovic Courtès2021-11-27
| | | | | | | | | | | | | | | | | | | | This fixes this use case: (file-append (let-system ...) ...) * guix/gexp.scm (file-append-compiler): When BASE lacks an expander, delegate to LOWERED. * tests/gexp.scm ("let-system in file-append"): New test.
* | Merge branch 'master' into core-updates-frozenLudovic Courtès2021-11-23
|\|
| * tests: Replace texlive importer tests.Ricardo Wurmus2021-11-18
| | | | | | | | | | | | * tests/texlive.scm (xml, sxml): Remove variables. ("fetch-sxml: returns SXML for valid XML", "sxml->package"): Remove tests. ("texlive->guix-package"): Add new test.
* | shell: Adjust test to expect C_INCLUDE_PATH, not CPATH.Ludovic Courtès2021-11-18
| | | | | | | | | | | | This is a followup to 2a3cd4ee3557fbbdca42b5ec2f3ec4546c270203. * tests/guix-shell.sh: Expect C_INCLUDE_PATH instead of CPATH.
* | tests: Adjust opam and pypi tests to simplified inputs.Ludovic Courtès2021-11-18
| | | | | | | | | | | | * tests/opam.scm ("opam->guix-package"): Expect simplified inputs. * tests/pypi.scm ("pypi->guix-package, package name contains \"-\" followed by digits"): Likewise.
* | Merge branch 'master' into core-updates-frozenLudovic Courtès2021-11-17
|\|
| * home: Adjust 'guix home import' test for shell aliases.Ludovic Courtès2021-11-16
| | | | | | | | | | | | | | This is a followup to 4b96998292442ec03024481c911d88f86c7c36b5. * tests/home-import.scm (match-home-environment-bash-service): Match the 'aliases' field.
| * daemon: Do not deduplicate files smaller than 8 KiB.Ludovic Courtès2021-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Files smaller than 8 KiB typically represent ~70% of the entries in /gnu/store/.links but only contribute to ~4% of the space savings afforded by deduplication. Not considering these files for deduplication speeds up file insertion in the store and, more importantly, leaves 'removeUnusedLinks' with fewer entries to traverse, thereby speeding it up proportionally. Partly fixes <https://issues.guix.gnu.org/24937>. * config-daemon.ac: Remove symlink hard link check and CAN_LINK_SYMLINK definition. * guix/store/deduplication.scm (%deduplication-minimum-size): New variable. (deduplicate)[loop]: Do not recurse when FILE's size is below %DEDUPLICATION-MINIMUM-SIZE. (dump-port): New procedure. (dump-file/deduplicate)[hash]: Turn into... [dump-and-compute-hash]: ... this thunk. Call 'deduplicate' only when SIZE is greater than %DEDUPLICATION-MINIMUM-SIZE; otherwise call 'dump-port'. * nix/libstore/gc.cc (LocalStore::removeUnusedLinks): Drop files where st.st_size < deduplicationMinSize. * nix/libstore/local-store.hh (deduplicationMinSize): New declaration. * nix/libstore/optimise-store.cc (deduplicationMinSize): New variable. (LocalStore::optimisePath_): Return when PATH is a symlink or smaller than 'deduplicationMinSize'. * tests/derivations.scm ("identical files are deduplicated"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/nar.scm ("restore-file-set with directories (signed, valid)"): Likewise. * tests/store-deduplication.scm ("deduplicate, below %deduplication-minimum-size"): New test. ("deduplicate", "deduplicate, ENOSPC"): Produce files bigger than %DEDUPLICATION-MINIMUM-SIZE. * tests/store.scm ("substitute, deduplication"): Likewise.
| * tests: Factorize 'file=?'.Ludovic Courtès2021-11-16
| | | | | | | | | | | | | | * guix/tests.scm (file=?): Add optional 'stat' parameter. Add fast patch comparing inode numbers. * tests/gexp.scm ("imported-files with file-like objects"): Remove 'file=?' procedure and use the one from (guix tests).
| * tests: Adjust tests/egg.scm to latest API changes.Ludovic Courtès2021-11-14
| | | | | | | | | | | | | | This is a followup to b999c80c2e71bd4b3f26a18a321b7e7e7b580103. * tests/egg.scm (eval-test-with-egg-file): Pass 'version' argument to 'egg->guix-package'.
| * import: print: Replace packages and origins in 'arguments'.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | | | | | | * guix/import/print.scm (package->code)[variable-reference] [object->code]: New procedures. [package-lists->code]: Rewrite in terms of 'object->code'. Pass the 'arguments' field through 'object->code'. * tests/print.scm (pkg-with-arguments, pkg-with-arguments-source): New variables. ("package with arguments"): New test.
| * import: print: Handle patches that are origins.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | | * guix/import/print.scm (package->code)[source->code]: Handle patches that are origins. * tests/print.scm (pkg-with-origin-input): Add 'patches' field. (pkg-with-origin-patch, pkg-with-origin-patch-source): New variables. ("package with origin patch"): New test.
| * import: print: Correctly handle URI lists.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | * guix/import/print.scm (package->code)[factorized-uri-code]: New procedure. [source->code]: Use it, and factorize URI when it's a list. * tests/print.scm (pkg-with-origin-input): Check origin URI to a list.
| * import: print: Properly render packages with origins as inputs.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | | | | * guix/import/print.scm (package->code)[source->code]: Check whether VERSION is true before calling 'factorize-uri'. [package-lists->code]: Add clause for inputs that are origins. * tests/print.scm (pkg-with-origin-input, pkg-with-origin-input-source): New variables. ("package with origin input"): New test.
| * import: pypi: Allow imports of a specific version.Ludovic Courtès2021-11-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/import/pypi.scm (latest-version): New procedure. (latest-source-release): Rename to... (source-release): ... this. Add 'version' parameter. (latest-wheel-release): Rename to... (wheel-release): ... this. Add 'version' parameter. (pypi->guix-package): Honor 'version' parameter. (pypi-recursive-import): Add 'version' parameter and honor it. * guix/scripts/import/pypi.scm (guix-import-pypi): Expect a spec. Pass it to 'package-name->name+version'. Pass the 'version' parameter. * tests/pypi.scm ("pypi->guix-package, no wheel"): Exercise the #:version parameter. * doc/guix.texi (Invoking guix import): Document it.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner2021-11-08
|\|
| * ui: 'load*' correctly reports 'read-error' in all cases.Ludovic Courtès2021-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, 'read-error' exceptions other than "missing closing paren" would not be reported; instead, we'd directly call (exit 1) without printing anything. Fixes <https://issues.guix.gnu.org/51463>. Reported by Alice BRENON <alice.brenon@ens-lyon.fr>. * guix/ui.scm (report-load-error): Report the error without re-throwing upon 'read-error'. * tests/guix-build.sh: Add test.
| * utils: Define a target-x86-32? and target-x86-64? predicate.Maxime Devos2021-11-07
| | | | | | | | | | | | | | * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| * tests: Avoid literal strings for invalid Texinfo markup.Ludovic Courtès2021-11-06
| | | | | | | | | | | | | | | | This is a followup to e171182a20962c4119e12439b92bbbfd59b1495e. * tests/lint.scm ("description: invalid Texinfo markup") ("synopsis: valid Texinfo markup"): Add call to 'identity' to avoid triggering a syntax error.
* | Merge remote-tracking branch 'origin/master' into core-updates-frozenEfraim Flashner2021-10-31
|\|
| * home: import: Avoid duplication of 'manifest->code'.Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | | | | | * guix/scripts/home/import.scm (manifest->code): Remove. (manifest+configuration-files->code): New procedure. (import-manifest): Use 'manifest+configuration-files->code' instead of 'manifest->code'. * tests/home-import.scm (eval-test-with-home-environment): Likewise. (match-home-environment-transformations): New procedure. ("manifest->code: No services, package transformations"): New test.
| * home: import: Factorize triplicated 'version-spec' procedure.Ludovic Courtès2021-10-31
| | | | | | | | | | | | | | | | | | | | * guix/scripts/package.scm (manifest-entry-version-prefix): New procedure, moved from... (export-manifest)[version-spec]: ... here. Adjust caller. * tests/home-import.scm (version-spec): Remove. (eval-test-with-home-environment): Use 'manifest-entry-version-prefix' instead. * guix/scripts/home/import.scm (import-manifest): Likewise.
| * guix home: import: Call ‘local-file’ with ‘name’Xinglu Chen2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | Set the name of the file to just the basename of the file passed to ‘local-file’. * guix/scripts/home/import.scm (basename+remove-dots): New procedure. (generate-bash-configuration+modules): Use it. * tests/home-import.scm (match-home-environment-bash-service): Adjust accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * Add tests for ‘guix home import’.Xinglu Chen2021-10-31
| | | | | | | | | | | | | | * tests/home-import.scm: New file. * Makefile.am (SCM_TESTS): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * shell: Error out when an unauthorized guix.scm/manifest.scm is found.Ludovic Courtès2021-10-30
| | | | | | | | | | | | | | | | | | | | | | The previous behavior was confusing: a warning would be printed and 'guix shell' would go on starting an empty environment. Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/shell.scm (auto-detect-manifest): Change "not loading" case from warning to error. * tests/guix-shell.sh: Adjust accordingly.
| * store: 'map/accumulate-builds' handler checks the store received.Ludovic Courtès2021-10-28
| | | | | | | | | | | | | | | | | | | | | | This is a followup to b19250eec6f92308f237a09a43e8e3e2355345b9, providing a proper fix for <https://issues.guix.gnu.org/46756>. * guix/remote.scm (remote-eval): Revert b19250eec6f92308f237a09a43e8e3e2355345b9. * guix/store.scm (build-accumulator): Turn into a procedure. Call CONTINUE when the store is not eq? to the initial store. (map/accumulate-builds): Adjust accordingly. * tests/store.scm ("map/accumulate-builds and different store"): New test.
| * syscalls: Add 'openpty' and 'login-tty'.Ludovic Courtès2021-10-26
| | | | | | | | | | * guix/build/syscalls.scm (openpty, login-pty): New procedures. * tests/syscalls.scm ("openpty", "openpty + login-tty"): New tests.
| * environment: Add tests for '--profile'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | This is a followup to a643deac2de81755a1843a3b41dd53857678bebc. * tests/guix-environment-container.sh, tests/guix-environment.sh: Add tests for '--profile'.
| * shell: By default load the local 'manifest.scm' or 'guix.scm' file.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | * guix/scripts/shell.scm (parse-args): Add call to 'auto-detect-manifest'. (authorized-directory-file, authorized-shell-directory?) (find-file-in-parent-directories, auto-detect-manifest): New procedures. * tests/guix-shell.sh: Add test. * doc/guix.texi (Invoking guix shell): Document it.
| * Add 'guix shell'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
| * profiles: Add 'package->development-manifest'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | | | * guix/profiles.scm (package->development-manifest): New procedure. * guix/scripts/environment.scm (input->manifest-entry) (package-environment-inputs): Remove. * guix/scripts/environment.scm (options/resolve-packages): Use 'package->development-manifest' instead of 'package-environment-inputs'. * tests/profiles.scm ("package->development-manifest"): New test.
| * packages: Add 'package-development-inputs'.Ludovic Courtès2021-10-25
| | | | | | | | | | | | | | | | * guix/packages.scm (package-development-inputs): New procedure. * guix/scripts/environment.scm (package-environment-inputs): Use it. * tests/packages.scm ("package-development-inputs") ("package-development-inputs, cross-compilation"): New tests. * doc/guix.texi (package Reference): Document it.
| * lint: Add description check for common typos.Vagrant Cascadian2021-10-24
| | | | | | | | | | | | | | | | | | Fixes: https://issues.guix.gnu.org/44675 * guix/lint.scm (check-description-typo): Add check for occurences of "This packages", "This modules", "allows to" and "permits to" in package descriptions. * tests/lint.scm: Add tests for "This packages" and "allows to".
* | Merge remote-tracking branch 'origin/master' into core-updates-frozen.Mathieu Othacehe2021-10-12
|\|
| * home: services: configuration: Support file-like objects.Oleg Pykhalov2021-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/home/services/configuration.scm (interpose): Operate only with file-like objects. (string-or-gexp?): Delete procedure. (serialize-string-or-gexp): Rename to 'serialize-file-like'. (text-config?): Call 'file-like' intead of 'string-or-gexp?'. * guix/scripts/home/import.scm: (generate-bash-module+configuration): Don't call slurp-file-gexp. * gnu/home/services/configuration.scm: Move content ... * gnu/services/configuration.scm: here. * gnu/home/services/shells.scm: Delete (gnu home services configuration). * gnu/home/services/xdg.scm: Same. * gnu/local.mk: Same. * tests/guix-home.sh: Test home-bash-service-type and extension with home-bash-extension.
| * tests: Add guix-home.sh.Oleg Pykhalov2021-10-09
| | | | | | | | | | * tests/guix-home.sh: New file. * Makefile.am (SH_TESTS): Add this.
| * import/minetest: Define an updater for mods on ContentDB.Maxime Devos2021-10-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only detecting updates is currently supported. To actually perform the uppdates, a patch like <https://issues.guix.gnu.org/50072#4> is required. * guix/import/minetest.scm (version-style,minetest-package?,latest-minetest-release): New procedures. (%minetest-updater): New updater. * tests/minetest.scm (upstream-source->sexp,expected-sexp,example-package): New procedure. (test-release,test-no-release): New macro's. ("same version","new version (dotted)","new version (date)") ("new version (git -> dotted)","dotted->date","date->dotted") ("no commit informaton, no new release") ("minetest is not a minetest mod") ("technic is a minetest mod") ("upstream-name is required"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>