aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2023 Antoine R. Dumont <antoine.romain.dumont@gmail.com>
# Copyright © 2023 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Test the 'guix locate' command-line utility.
#

set -x

RUN_EXPENSIVE_TESTS="${RUN_EXPENSIVE_TESTS:-false}"

tmpdir="guix-index-$$"
# In the following tests, we use two different databases, one for each
# indexation method.
tmpdb_manifests="$tmpdir/manifests/db.sqlite"
tmpdb_store="$tmpdir/store/db.sqlite"
trap 'rm -rf "$tmpdir" "$tmpdb_store" "$tmpdb_manifests"' EXIT

guix locate --version

# Preparing db locations for both indexation methods.
mkdir -p "$(dirname "$tmpdb_manifests")" "$(dirname "$tmpdb_store")"

cmd_manifests="guix locate --database=$tmpdb_manifests --method=manifests"
cmd_store="guix locate --database=$tmpdb_store --method=store"

# Lookup without any db should fail.
guix locate --database="$tmpdb_manifests" guile && false
guix locate --database="$tmpdb_store" guile && false

# Lookup without anything in db should yield no results because the indexer
# didn't stumble upon any profile.
test -z "$(guix locate --database="$tmpdb_manifests" guile)"

# Install a package.
guix package --bootstrap --install guile-bootstrap \
     --profile="$tmpdir/profile"

# Look for 'guile'.
$cmd_manifests --update
$cmd_manifests guile | grep "$(guix build guile-bootstrap)/bin/guile"
$cmd_manifests boot-9.scm | grep ^guile-bootstrap

# Using a glob pattern.
$cmd_manifests -g '*.scm' | grep "^guile-bootstrap.*boot-9"

# Statistics.
$cmd_manifests --stats

if $RUN_EXPENSIVE_TESTS
then
    $cmd_store --update
    $cmd_store guile
    $cmd_store guile | grep "$(guix build guile-bootstrap)/bin/guile"
    $cmd_store boot-9.scm | grep ^guile-bootstrap
fi

# The command below is an error: "no files to search for"...
guix locate && false

# ... but this one is fine.
guix locate --clear
ommit/gnu/packages/simulation.scm?id=4a6acd04c34b237a18a2b5a7a6f1c4751c07b3f2'>gnu: python-meshio: Remove input labels....* gnu/packages/simulation.scm (python-meshio)[inputs, native-inputs, propagated-inputs]: Remove labels. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2022-05-06gnu: fenics: Fix sanity check....* gnu/packages/simulation.scm (fenics)[arguments]: Relax pybind11 requirement to appease the sanity check. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2022-05-06gnu: fenics: Honor #:tests? flag....* gnu/packages/simulation.scm (fenics)[arguments]: Adjust custom 'check' phase to honor the #:tests? flag. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2022-05-06gnu: fenics-dolfin: Honor #:tests? flag....* gnu/packages/simulation.scm (fenics-dolfin)[source]: Remove trailing boolean. [arguments]: Adjust custom 'check' phase to honor the #:tests? flag. While here, remove trailing booleans. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2022-02-05gnu: fenics-dolfin: Fix build....* gnu/packages/patches/fenics-dolfin-algorithm.patch, gnu/packages/patches/fenics-dolfin-boost.patch, gnu/packages/patches/fenics-dolfin-config-slepc.patch, gnu/packages/patches/fenics-dolfin-demo-init.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/simulation.scm (fenics-dolfin)[source]: Use them. Eric Bavier 2021-12-13gnu: Simplify package inputs....This commit was obtained by running: ./pre-inst-env guix style without any additional argument. Ludovic Courtès 2021-09-07Merge branch 'master' into core-updates-frozenLudovic Courtès 2021-07-29Merge branch 'master' into core-updates-frozen... Conflicts: gnu/packages/bioinformatics.scm gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/emacs-xyz.scm gnu/packages/gpodder.scm gnu/packages/music.scm gnu/packages/patches/glibc-bootstrap-system.patch gnu/packages/python-xyz.scm gnu/packages/shells.scm gnu/packages/statistics.scm Marius Bakke 2021-08-23gnu: python-pygmsh: Update to 7.1.11....*gnu/packages/simulation.scm (python-pygmsh): Update to 7.1.11. [source](snippet): Re-phrase comment. Paul Garlick 2021-08-13gnu: python-pygmesh: Update to 7.1.10....* gnu/packages/simulation.scm (python-pygmah): Update to 7.1.10. [arguments]<#:phases>: Tests have moved to the 'tests' directory. The test_readme.py file has been removed. Paul Garlick 2021-08-13gnu: python-pygmsh: Change source to 'git-fetch'....* gnu/packages/simulation.scm (python-pygmsh)[source]: Change to 'git-fetch'. Paul Garlick 2021-08-13gnu: python-pygmsh: Update snippet for Gmsh > 4.7.0....The old field option name is not needed after commit 78595fe3650057f258109c6599f4bae1d0e72e (Gmsh 4.8.4). * gnu/packages/simulation.scm (python-pygmsh)[source]: Remove option name substitution. Paul Garlick