diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-02-17 16:23:42 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-02-18 14:14:38 +0100 |
| commit | 0ca26437cb36822f9f74ee1a6dbc714477378b13 (patch) | |
| tree | 68045847911809b905b10cceb5aa5dbe183948a2 /tests/guix-build.sh | |
| parent | 5a57313918a5c1bd5cf8238c2dcae64a03523952 (diff) | |
guix build: Warn when attempting to build an unsupported package.
Fixes <https://issues.guix.gnu.org/51801>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.
* guix/scripts/build.scm (options->derivations)[warn-if-unsupported]:
New procedure.
[compute-derivation]: Use it.
* tests/guix-build.sh: Add test.
Diffstat (limited to 'tests/guix-build.sh')
| -rw-r--r-- | tests/guix-build.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 86e41e2927b..9cbf8fe26d8 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # GNU Guix --- Functional package management for GNU | 1 | # GNU Guix --- Functional package management for GNU |
| 2 | # Copyright © 2012, 2013, 2014, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> | 2 | # Copyright © 2012-2014, 2016-2022 Ludovic Courtès <ludo@gnu.org> |
| 3 | # Copyright © 2020 Marius Bakke <mbakke@fastmail.com> | 3 | # Copyright © 2020 Marius Bakke <mbakke@fastmail.com> |
| 4 | # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> | 4 | # Copyright © 2021 Chris Marusich <cmmarusich@gmail.com> |
| 5 | # | 5 | # |
| @@ -31,6 +31,16 @@ guix build --version | |||
| 31 | guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S | 31 | guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S |
| 32 | test "`guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S`" = "" | 32 | test "`guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S`" = "" |
| 33 | 33 | ||
| 34 | # Warn when attempting to build an unsupported package. | ||
| 35 | case "$(guix build intelmetool -s armhf-linux -v0 -n 2>&1)" in | ||
| 36 | *warning:*intelmetool*support*armhf*) | ||
| 37 | true | ||
| 38 | break;; | ||
| 39 | *) | ||
| 40 | false; | ||
| 41 | break;; | ||
| 42 | esac | ||
| 43 | |||
| 34 | # Should pass. | 44 | # Should pass. |
| 35 | guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ | 45 | guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ |
| 36 | grep -e '-guile-' | 46 | grep -e '-guile-' |
