aboutsummaryrefslogtreecommitdiff
path: root/tests/gremlin.scm
blob: 2885554967be99f8dd5acca650e509ab4a4e689a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 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/>.

(define-module (test-gremlin)
  #:use-module (guix elf)
  #:use-module (guix build utils)
  #:use-module (guix build gremlin)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-26)
  #:use-module (srfi srfi-64)
  #:use-module (rnrs io ports)
  #:use-module (ice-9 match))

(define %guile-executable
  (match (command-line)
    ((program . _)
     (and (file-exists? program) (elf-file? program)
          program))
    (_
     #f)))

(define read-elf
  (compose parse-elf get-bytevector-all))


(test-begin "gremlin")

(unless %guile-executable (test-skip 1))
(test-assert "elf-dynamic-info-needed, executable"
  (let* ((elf     (call-with-input-file %guile-executable read-elf))
         (dyninfo (elf-dynamic-info elf)))
    (or (not dyninfo)                             ;static executable
        (lset<= string=?
                (list (string-append "libguile-" (effective-version))
                      "libgc" "libunistring" "libffi")
                (map (lambda (lib)
                       (string-take lib (string-contains lib ".so")))
                     (elf-dynamic-info-needed dyninfo))))))

(test-equal "expand-origin"
  '("OOO/../lib"
    "OOO"
    "../OOO/bar/OOO/baz"
    "ORIGIN/foo")
  (map (cut expand-origin <> "OOO")
       '("$ORIGIN/../lib"
         "${ORIGIN}"
         "../${ORIGIN}/bar/$ORIGIN/baz"
         "ORIGIN/foo")))

(test-end "gremlin")
td>2020-09-10installer: final: Introduce call-with-mnt-container....Mathieu Othacehe 2020-09-02installer: Run the installation inside a container....Mathieu Othacehe 2020-08-06installer: Remove logical devices....Mathieu Othacehe 2020-07-26installer: Add NTFS support....Mathieu Othacehe 2020-06-16installer: final: Remove restart-service procedure....Mathieu Othacehe 2020-06-14installer: final: Make sure 'bold' font files are loaded....Mathieu Othacehe 2020-06-13install: final: Add some logging....Mathieu Othacehe 2020-06-09installer: final: Dump "guix system init" command output when testing....Mathieu Othacehe 2020-06-09installer: final: Remove left-over pk call....Mathieu Othacehe 2020-06-09Revert "installer: utils: Dump command output to syslog when testing."...Mathieu Othacehe 2020-06-09installer: utils: Dump command output to syslog when testing....Mathieu Othacehe 2020-06-05installer: final: Add some extra logging....Mathieu Othacehe 2020-04-19installer: connman: Fix Wifi connection....Mathieu Othacehe 2020-04-10installer: tests: Don't install to a CD/DVD....Ludovic Courtès 2020-04-10gnu: installer: Fix issue with "Esperanto" locale....Mathieu Othacehe 2020-04-09installer: Include empty variant in keyboard layout selection....Florian Pelz 2020-04-09installer: Allow Alt+Shift toggle from non-Latin keyboard layouts....Florian Pelz 2020-04-08installer: Add proxy support....Mathieu Othacehe 2020-04-08installer: Turn help menu into parameters menu....Mathieu Othacehe 2020-04-07installer: Reduce height of the help window....Ludovic Courtès 2020-04-06installer: Adapt to Guile-newt revision 2....Mathieu Othacehe 2020-04-06installer: Add a help page....Mathieu Othacehe 2020-03-26installer: tests: Use a filter to select desktop-environments....Mathieu Othacehe 2020-03-23installer: Fix cow-store umount issue....Mathieu Othacehe 2020-03-05installer: Fix cow-store umount....Mathieu Othacehe 2020-03-05tests: install: Add "gui-installed-os"....Ludovic Courtès 2020-03-05installer: Honor /tmp/installer-system-init-options....Ludovic Courtès 2020-03-05installer: Run commands without hopping through the shell....Ludovic Courtès 2020-03-05installer: Bypass connectivity check when /tmp/installer-assume-online exists....Ludovic Courtès 2020-03-05installer: Implement a dialog on /var/guix/installer-socket....Ludovic Courtès