Advertisement
Guest User

GuixSD 0.13 install failure

a guest
May 22nd, 2017
616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 430.96 KB | None | 0 0
  1. =================================
  2.    GNU Guix : ./test-suite.log
  3. =================================
  4.  
  5. # TOTAL: 708
  6. # PASS:  674
  7. # SKIP:  32
  8. # XFAIL: 0
  9. # FAIL:  2
  10. # XPASS: 0
  11. # ERROR: 0
  12.  
  13. .. contents:: :depth: 2
  14.  
  15. SKIP: tests/base32
  16. ==================
  17.  
  18. sh: nix-hash: command not found
  19. test-name: bytevector->base32-string
  20. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/base32.scm:48
  21. source:
  22. + (test-assert
  23. +   "bytevector->base32-string"
  24. +   (fold (lambda (bv expected result)
  25. +           (and result
  26. +                (string=?
  27. +                  (bytevector->base32-string bv)
  28. +                  expected)))
  29. +         #t
  30. +         (map string->utf8
  31. +              '("" "f" "fo" "foo" "foob" "fooba" "foobar"))
  32. +         '(""
  33. +           "my"
  34. +           "mzxq"
  35. +           "mzxw6"
  36. +           "mzxw6yq"
  37. +           "mzxw6ytb"
  38. +           "mzxw6ytboi")))
  39. actual-value: #t
  40. result: PASS
  41.  
  42. test-name: base32-string->bytevector
  43. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/base32.scm:65
  44. source:
  45. + (test-assert
  46. +   "base32-string->bytevector"
  47. +   (every (lambda (bv)
  48. +            (equal?
  49. +              (base32-string->bytevector
  50. +                (bytevector->base32-string bv))
  51. +              bv))
  52. +          (map string->utf8
  53. +               '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
  54. actual-value: #t
  55. result: PASS
  56.  
  57. test-name: nix-base32-string->bytevector
  58. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/base32.scm:73
  59. source:
  60. + (test-assert
  61. +   "nix-base32-string->bytevector"
  62. +   (every (lambda (bv)
  63. +            (equal?
  64. +              (nix-base32-string->bytevector
  65. +                (bytevector->nix-base32-string bv))
  66. +              bv))
  67. +          (map string->utf8
  68. +               '("" "f" "fo" "foo" "foob" "fooba" "foobar"))))
  69. actual-value: #t
  70. result: PASS
  71.  
  72. test-name: &invalid-base32-character
  73. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/base32.scm:81
  74. source:
  75. + (test-equal
  76. +   "&invalid-base32-character"
  77. +   #\e
  78. +   (guard (c ((invalid-base32-character? c)
  79. +              (invalid-base32-character-value c)))
  80. +          (nix-base32-string->bytevector
  81. +            (string-append (make-string 51 #\a) "e"))))
  82. expected-value: #\e
  83. actual-value: #\e
  84. result: PASS
  85.  
  86. test-name: sha256 & bytevector->nix-base32-string
  87. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/base32.scm:92
  88. source:
  89. + (test-assert
  90. +   "sha256 & bytevector->nix-base32-string"
  91. +   (let ((file (search-path %load-path "tests/test.drv")))
  92. +     (equal?
  93. +       (bytevector->nix-base32-string
  94. +         (sha256
  95. +           (call-with-input-file file get-bytevector-all)))
  96. +       (let* ((c (format
  97. +                   #f
  98. +                   "~a --type sha256 --base32 --flat \"~a\""
  99. +                   %nix-hash
  100. +                   file))
  101. +              (p (open-input-pipe c))
  102. +              (l (read-line p)))
  103. +         (close-pipe p)
  104. +         l))))
  105. result: SKIP
  106.  
  107.  
  108. SKIP: tests/cpio
  109. ================
  110.  
  111. random seed for tests: 1495493959
  112. test-name: file->cpio-header + write-cpio-header + read-cpio-header
  113. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/cpio.scm:37
  114. source:
  115. + (test-assert
  116. +   "file->cpio-header + write-cpio-header + read-cpio-header"
  117. +   (let* ((file (search-path %load-path "guix.scm"))
  118. +          (header (file->cpio-header file)))
  119. +     (call-with-values
  120. +       (lambda () (open-bytevector-output-port))
  121. +       (lambda (port get-bv)
  122. +         (write-cpio-header header port)
  123. +         (let ((port (open-bytevector-input-port (get-bv))))
  124. +           (equal? header (read-cpio-header port)))))))
  125. actual-value: #t
  126. result: PASS
  127.  
  128. test-name: bit-identical to GNU cpio's output
  129. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/cpio.scm:49
  130. source:
  131. + (test-assert
  132. +   "bit-identical to GNU cpio's output"
  133. +   (call-with-temporary-output-file
  134. +     (lambda (link _)
  135. +       (delete-file link)
  136. +       (symlink "chbouib" link)
  137. +       (let ((files (cons* "/"
  138. +                           (canonicalize-path
  139. +                             (dirname (search-path %load-path "guix.scm")))
  140. +                           link
  141. +                           (map (compose
  142. +                                  canonicalize-path
  143. +                                  (cut search-path %load-path <>))
  144. +                                '("guix.scm"
  145. +                                  "guix/build/syscalls.scm"
  146. +                                  "guix/packages.scm")))))
  147. +         (call-with-temporary-output-file
  148. +           (lambda (ref-file _)
  149. +             (let ((pipe (open-pipe*
  150. +                           OPEN_WRITE
  151. +                           %cpio-program
  152. +                           "-o"
  153. +                           "-O"
  154. +                           ref-file
  155. +                           "-H"
  156. +                           "newc"
  157. +                           "--null")))
  158. +               (for-each
  159. +                 (lambda (file) (format pipe "~a\x00" file))
  160. +                 files)
  161. +               (and (zero? (close-pipe pipe))
  162. +                    (call-with-temporary-output-file
  163. +                      (lambda (file port)
  164. +                        (write-cpio-archive files port)
  165. +                        (close-port port)
  166. +                        (or (file=? ref-file file)
  167. +                            (throw 'cpio-archives-differ
  168. +                                   files
  169. +                                   ref-file
  170. +                                   file
  171. +                                   (stat:size (stat ref-file))
  172. +                                   (stat:size (stat file))))))))))))))
  173. result: SKIP
  174.  
  175.  
  176. SKIP: tests/builders
  177. ====================
  178.  
  179. random seed for tests: 1495493745
  180. test-name: url-fetch
  181. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/builders.scm:66
  182. source:
  183. + (test-assert
  184. +   "url-fetch"
  185. +   (let* ((url '("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz"
  186. +                 "ftp://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz"))
  187. +          (hash (nix-base32-string->bytevector
  188. +                  "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))
  189. +          (drv (url-fetch*
  190. +                 %store
  191. +                 url
  192. +                 'sha256
  193. +                 hash
  194. +                 #:guile
  195. +                 %bootstrap-guile))
  196. +          (out-path (derivation->output-path drv)))
  197. +     (and (build-derivations %store (list drv))
  198. +          (file-exists? out-path)
  199. +          (valid-path? %store out-path))))
  200. result: SKIP
  201.  
  202. test-name: url-fetch, file
  203. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/builders.scm:78
  204. source:
  205. + (test-assert
  206. +   "url-fetch, file"
  207. +   (let* ((file (search-path %load-path "guix.scm"))
  208. +          (hash (call-with-input-file file port-sha256))
  209. +          (out (url-fetch* %store file 'sha256 hash)))
  210. +     (and (file-exists? out) (valid-path? %store out))))
  211. actual-value: #t
  212. result: PASS
  213.  
  214. test-name: url-fetch, file URI
  215. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/builders.scm:85
  216. source:
  217. + (test-assert
  218. +   "url-fetch, file URI"
  219. +   (let* ((file (search-path %load-path "guix.scm"))
  220. +          (hash (call-with-input-file file port-sha256))
  221. +          (out (url-fetch*
  222. +                 %store
  223. +                 (string-append
  224. +                   "file://"
  225. +                   (canonicalize-path file))
  226. +                 'sha256
  227. +                 hash)))
  228. +     (and (file-exists? out) (valid-path? %store out))))
  229. actual-value: #t
  230. result: PASS
  231.  
  232. test-name: gnu-build-system
  233. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/builders.scm:94
  234. source:
  235. + (test-assert
  236. +   "gnu-build-system"
  237. +   (build-system? gnu-build-system))
  238. actual-value: #t
  239. result: PASS
  240.  
  241. test-name: gnu-build
  242. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/builders.scm:99
  243. source:
  244. + (test-assert
  245. +   "gnu-build"
  246. +   (let* ((url "http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz")
  247. +          (hash (nix-base32-string->bytevector
  248. +                  "0wqd8sjmxfskrflaxywc7gqw7sfawrfvdxd9skxawzfgyy0pzdz6"))
  249. +          (tarball
  250. +            (url-fetch*
  251. +              %store
  252. +              url
  253. +              'sha256
  254. +              hash
  255. +              #:guile
  256. +              %bootstrap-guile))
  257. +          (build (gnu-build
  258. +                   %store
  259. +                   "hello-2.8"
  260. +                   `(("source" ,tarball) ,@%bootstrap-inputs)
  261. +                   #:guile
  262. +                   %bootstrap-guile
  263. +                   #:search-paths
  264. +                   %bootstrap-search-paths))
  265. +          (out (derivation->output-path build)))
  266. +     (and (build-derivations
  267. +            %store
  268. +            (list (pk 'hello-drv build)))
  269. +          (valid-path? %store out)
  270. +          (file-exists? (string-append out "/bin/hello")))))
  271. result: SKIP
  272.  
  273.  
  274. SKIP: tests/derivations
  275. =======================
  276.  
  277. random seed for tests: 1495493721
  278. @ build-started /tmp/guix-tests/store/vcj9833sk577wd7qxzvmgqcfbf9b4sjz-foo.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/vc//j9833sk577wd7qxzvmgqcfbf9b4sjz-foo.drv.bz2
  279. @ build-succeeded /tmp/guix-tests/store/vcj9833sk577wd7qxzvmgqcfbf9b4sjz-foo.drv -
  280. test-name: parse & export
  281. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:87
  282. source:
  283. + (test-assert
  284. +   "parse & export"
  285. +   (let* ((f (search-path %load-path "tests/test.drv"))
  286. +          (b1 (call-with-input-file f get-bytevector-all))
  287. +          (d1 (read-derivation (open-bytevector-input-port b1)))
  288. +          (b2 (call-with-bytevector-output-port
  289. +                (cut write-derivation d1 <>)))
  290. +          (d2 (read-derivation (open-bytevector-input-port b2))))
  291. +     (and (equal? b1 b2) (equal? d1 d2))))
  292. actual-value: #t
  293. result: PASS
  294.  
  295. test-name: add-to-store, flat
  296. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:98
  297. source:
  298. + (test-assert
  299. +   "add-to-store, flat"
  300. +   (let* ((file (search-path
  301. +                  %load-path
  302. +                  "language/tree-il/spec.scm"))
  303. +          (drv (add-to-store
  304. +                 %store
  305. +                 "flat-test"
  306. +                 #f
  307. +                 "sha256"
  308. +                 file)))
  309. +     (and (eq? 'regular (stat:type (stat drv)))
  310. +          (valid-path? %store drv)
  311. +          (equal?
  312. +            (call-with-input-file file get-bytevector-all)
  313. +            (call-with-input-file drv get-bytevector-all)))))
  314. actual-value: #t
  315. result: PASS
  316.  
  317. test-name: add-to-store, recursive
  318. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:106
  319. source:
  320. + (test-assert
  321. +   "add-to-store, recursive"
  322. +   (let* ((dir (dirname
  323. +                 (search-path
  324. +                   %load-path
  325. +                   "language/tree-il/spec.scm")))
  326. +          (drv (add-to-store
  327. +                 %store
  328. +                 "dir-tree-test"
  329. +                 #t
  330. +                 "sha256"
  331. +                 dir)))
  332. +     (and (eq? 'directory (stat:type (stat drv)))
  333. +          (valid-path? %store drv)
  334. +          (equal?
  335. +            (directory-contents dir)
  336. +            (directory-contents drv)))))
  337. actual-value: #t
  338. result: PASS
  339.  
  340. test-name: derivation with no inputs
  341. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:114
  342. source:
  343. + (test-assert
  344. +   "derivation with no inputs"
  345. +   (let* ((builder
  346. +            (add-text-to-store
  347. +              %store
  348. +              "my-builder.sh"
  349. +              "echo hello, world\n"
  350. +              '()))
  351. +          (drv (derivation
  352. +                 %store
  353. +                 "foo"
  354. +                 %bash
  355. +                 `("-e" ,builder)
  356. +                 #:env-vars
  357. +                 '(("HOME" . "/homeless")))))
  358. +     (and (store-path? (derivation-file-name drv))
  359. +          (valid-path? %store (derivation-file-name drv)))))
  360. actual-value: #t
  361. result: PASS
  362.  
  363. test-name: build derivation with 1 source
  364. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:124
  365. source:
  366. + (test-assert
  367. +   "build derivation with 1 source"
  368. +   (let* ((builder
  369. +            (add-text-to-store
  370. +              %store
  371. +              "my-builder.sh"
  372. +              "echo hello, world > \"$out\"\n"
  373. +              '()))
  374. +          (drv (derivation
  375. +                 %store
  376. +                 "foo"
  377. +                 %bash
  378. +                 `(,builder)
  379. +                 #:env-vars
  380. +                 '(("HOME" . "/homeless")
  381. +                   ("zzz" . "Z!")
  382. +                   ("AAA" . "A!"))
  383. +                 #:inputs
  384. +                 `((,%bash) (,builder))))
  385. +          (succeeded?
  386. +            (build-derivations %store (list drv))))
  387. +     (and succeeded?
  388. +          (let ((path (derivation->output-path drv)))
  389. +            (and (valid-path? %store path)
  390. +                 (string=?
  391. +                   (call-with-input-file path read-line)
  392. +                   "hello, world"))))))
  393. actual-value: #t
  394. result: PASS
  395.  
  396. test-name: derivation with local file as input
  397. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:142
  398. source:
  399. + (test-assert
  400. +   "derivation with local file as input"
  401. +   (let* ((builder
  402. +            (add-text-to-store
  403. +              %store
  404. +              "my-builder.sh"
  405. +              "(while read line ; do echo \"$line\" ; done) < $in > $out"
  406. +              '()))
  407. +          (input @ build-started /tmp/guix-tests/store/fjv236z7l209d8zz9z8jxmnw3dfi8lam-derivation-with-input-file.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/fj//v236z7l209d8zz9z8jxmnw3dfi8lam-derivation-with-input-file.drv.bz2
  408. @ build-succeeded /tmp/guix-tests/store/fjv236z7l209d8zz9z8jxmnw3dfi8lam-derivation-with-input-file.drv -
  409. @ build-started /tmp/guix-tests/store/p81vnkbra9z5w45hg0hni5l3yf596ja2-fails.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/p8//1vnkbra9z5w45hg0hni5l3yf596ja2-fails.drv.bz2
  410. builder for `/tmp/guix-tests/store/p81vnkbra9z5w45hg0hni5l3yf596ja2-fails.drv' failed with exit code 1
  411. @ build-failed /tmp/guix-tests/store/p81vnkbra9z5w45hg0hni5l3yf596ja2-fails.drv - 1 builder for `/tmp/guix-tests/store/p81vnkbra9z5w45hg0hni5l3yf596ja2-fails.drv' failed with exit code 1
  412. @ build-started /tmp/guix-tests/store/kn0gx5na8k2nilq6c362bmavywnilkhq-guile-bootstrap-2.0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/kn//0gx5na8k2nilq6c362bmavywnilkhq-guile-bootstrap-2.0.drv.bz2
  413. unpacking bootstrap Guile to '/tmp/guix-tests/store/7y0q8n6zv41lr9viybhihlcmhri6939f-guile-bootstrap-2.0'...
  414. ./
  415. ./share/
  416. ./share/guile/
  417. ./share/guile/2.0/
  418. ./share/guile/2.0/system/
  419. ./share/guile/2.0/system/xref.scm
  420. ./share/guile/2.0/system/foreign.scm
  421. ./share/guile/2.0/system/repl/
  422. ./share/guile/2.0/system/repl/error-handling.scm
  423. ./share/guile/2.0/system/repl/debug.scm
  424. ./share/guile/2.0/system/repl/describe.scm
  425. ./share/guile/2.0/system/repl/common.scm
  426. ./share/guile/2.0/system/repl/command.scm
  427. ./share/guile/2.0/system/repl/server.scm
  428. ./share/guile/2.0/system/repl/repl.scm
  429. ./share/guile/2.0/system/base/
  430. ./share/guile/2.0/system/base/lalr.upstream.scm
  431. ./share/guile/2.0/system/base/pmatch.scm
  432. ./share/guile/2.0/system/base/lalr.scm
  433. ./share/guile/2.0/system/base/language.scm
  434. ./share/guile/2.0/system/base/syntax.scm
  435. ./share/guile/2.0/system/base/compile.scm
  436. ./share/guile/2.0/system/base/ck.scm
  437. ./share/guile/2.0/system/base/message.scm
  438. ./share/guile/2.0/system/base/target.scm
  439. ./share/guile/2.0/system/vm/
  440. ./share/guile/2.0/system/vm/trace.scm
  441. ./share/guile/2.0/system/vm/trap-state.scm
  442. ./share/guile/2.0/system/vm/vm.scm
  443. ./share/guile/2.0/system/vm/coverage.scm
  444. ./share/guile/2.0/system/vm/program.scm
  445. ./share/guile/2.0/system/vm/objcode.scm
  446. ./share/guile/2.0/system/vm/traps.scm
  447. ./share/guile/2.0/system/vm/inspect.scm
  448. ./share/guile/2.0/system/vm/instruction.scm
  449. ./share/guile/2.0/system/vm/frame.scm
  450. ./share/guile/2.0/scripts/
  451. ./share/guile/2.0/scripts/scan-api.scm
  452. ./share/guile/2.0/scripts/autofrisk.scm
  453. ./share/guile/2.0/scripts/snarf-check-and-output-texi.scm
  454. ./share/guile/2.0/scripts/read-rfc822.scm
  455. ./share/guile/2.0/scripts/read-text-outline.scm
  456. ./share/guile/2.0/scripts/help.scm
  457. ./share/guile/2.0/scripts/frisk.scm
  458. ./share/guile/2.0/scripts/punify.scm
  459. ./share/guile/2.0/scripts/lint.scm
  460. ./share/guile/2.0/scripts/disassemble.scm
  461. ./share/guile/2.0/scripts/summarize-guile-TODO.scm
  462. ./share/guile/2.0/scripts/generate-autoload.scm
  463. ./share/guile/2.0/scripts/display-commentary.scm
  464. ./share/guile/2.0/scripts/compile.scm
  465. ./share/guile/2.0/scripts/api-diff.scm
  466. ./share/guile/2.0/scripts/use2dot.scm
  467. ./share/guile/2.0/scripts/doc-snarf.scm
  468. ./share/guile/2.0/scripts/read-scheme-source.scm
  469. ./share/guile/2.0/scripts/snarf-guile-m4-docs.scm
  470. ./share/guile/2.0/scripts/list.scm
  471. ./share/guile/2.0/texinfo/
  472. ./share/guile/2.0/texinfo/indexing.scm
  473. ./share/guile/2.0/texinfo/html.scm
  474. ./share/guile/2.0/texinfo/docbook.scm
  475. ./share/guile/2.0/texinfo/serialize.scm
  476. ./share/guile/2.0/texinfo/reflection.scm
  477. ./share/guile/2.0/texinfo/plain-text.scm
  478. ./share/guile/2.0/texinfo/string-utils.scm
  479. ./share/guile/2.0/ice-9/
  480. ./share/guile/2.0/ice-9/documentation.scm
  481. ./share/guile/2.0/ice-9/scm-style-repl.scm
  482. ./share/guile/2.0/ice-9/time.scm
  483. ./share/guile/2.0/ice-9/format.scm
  484. ./share/guile/2.0/ice-9/networking.scm
  485. ./share/guile/2.0/ice-9/getopt-long.scm
  486. ./share/guile/2.0/ice-9/vlist.scm
  487. ./share/guile/2.0/ice-9/psyntax.scm
  488. ./share/guile/2.0/ice-9/gap-buffer.scm
  489. ./share/guile/2.0/ice-9/and-let-star.scm
  490. ./share/guile/2.0/ice-9/posix.scm
  491. ./share/guile/2.0/ice-9/ls.scm
  492. ./share/guile/2.0/ice-9/syncase.scm
  493. ./share/guile/2.0/ice-9/save-stack.scm
  494. ./share/guile/2.0/ice-9/stack-catch.scm
  495. ./share/guile/2.0/ice-9/futures.scm
  496. ./share/guile/2.0/ice-9/debug.scm
  497. ./share/guile/2.0/ice-9/pretty-print.scm
  498. ./share/guile/2.0/ice-9/mapping.scm
  499. ./share/guile/2.0/ice-9/occam-channel.scm
  500. ./share/guile/2.0/ice-9/top-repl.scm
  501. ./share/guile/2.0/ice-9/boot-9.scm
  502. ./share/guile/2.0/ice-9/string-fun.scm
  503. ./share/guile/2.0/ice-9/i18n.scm
  504. ./share/guile/2.0/ice-9/match.upstream.scm
  505. ./share/guile/2.0/ice-9/streams.scm
  506. ./share/guile/2.0/ice-9/lineio.scm
  507. ./share/guile/2.0/ice-9/threads.scm
  508. ./share/guile/2.0/ice-9/weak-vector.scm
  509. ./share/guile/2.0/ice-9/history.scm
  510. ./share/guile/2.0/ice-9/expect.scm
  511. ./share/guile/2.0/ice-9/poll.scm
  512. ./share/guile/2.0/ice-9/popen.scm
  513. ./share/guile/2.0/ice-9/control.scm
  514. ./share/guile/2.0/ice-9/session.scm
  515. ./share/guile/2.0/ice-9/ftw.scm
  516. ./share/guile/2.0/ice-9/local-eval.scm
  517. ./share/guile/2.0/ice-9/receive.scm
  518. ./share/guile/2.0/ice-9/safe-r5rs.scm
  519. ./share/guile/2.0/ice-9/calling.scm
  520. ./share/guile/2.0/ice-9/curried-definitions.scm
  521. ./share/guile/2.0/ice-9/eval-string.scm
  522. ./share/guile/2.0/ice-9/q.scm
  523. ./share/guile/2.0/ice-9/serialize.scm
  524. ./share/guile/2.0/ice-9/quasisyntax.scm
  525. ./share/guile/2.0/ice-9/slib.scm
  526. ./share/guile/2.0/ice-9/hcons.scm
  527. ./share/guile/2.0/ice-9/rw.scm
  528. ./share/guile/2.0/ice-9/regex.scm
  529. ./share/guile/2.0/ice-9/match.scm
  530. ./share/guile/2.0/ice-9/buffered-input.scm
  531. ./share/guile/2.0/ice-9/iconv.scm
  532. ./share/guile/2.0/ice-9/poe.scm
  533. ./share/guile/2.0/ice-9/common-list.scm
  534. ./share/guile/2.0/ice-9/r5rs.scm
  535. ./share/guile/2.0/ice-9/command-line.scm
  536. ./share/guile/2.0/ice-9/deprecated.scm
  537. ./share/guile/2.0/ice-9/psyntax-pp.scm
  538. ./share/guile/2.0/ice-9/null.scm
  539. ./share/guile/2.0/ice-9/optargs.scm
  540. ./share/guile/2.0/ice-9/rdelim.scm
  541. ./share/guile/2.0/ice-9/runq.scm
  542. ./share/guile/2.0/ice-9/safe.scm
  543. ./share/guile/2.0/ice-9/channel.scm
  544. ./share/guile/2.0/ice-9/readline.scm
  545. ./share/guile/2.0/ice-9/binary-ports.scm
  546. ./share/guile/2.0/ice-9/eval.scm
  547. ./share/guile/2.0/ice-9/r4rs.scm
  548. ./share/guile/2.0/ice-9/r6rs-libraries.scm
  549. ./share/guile/2.0/ice-9/list.scm
  550. ./share/guile/2.0/language/
  551. ./share/guile/2.0/language/elisp/
  552. ./share/guile/2.0/language/elisp/compile-tree-il.scm
  553. ./share/guile/2.0/language/elisp/bindings.scm
  554. ./share/guile/2.0/language/elisp/runtime.scm
  555. ./share/guile/2.0/language/elisp/lexer.scm
  556. ./share/guile/2.0/language/elisp/spec.scm
  557. ./share/guile/2.0/language/elisp/runtime/
  558. ./share/guile/2.0/language/elisp/runtime/macros.scm
  559. ./share/guile/2.0/language/elisp/runtime/function-slot.scm
  560. ./share/guile/2.0/language/elisp/runtime/subrs.scm
  561. ./share/guile/2.0/language/elisp/runtime/value-slot.scm
  562. ./share/guile/2.0/language/elisp/parser.scm
  563. ./share/guile/2.0/language/assembly/
  564. ./share/guile/2.0/language/assembly/compile-bytecode.scm
  565. ./share/guile/2.0/language/assembly/disassemble.scm
  566. ./share/guile/2.0/language/assembly/spec.scm
  567. ./share/guile/2.0/language/assembly/decompile-bytecode.scm
  568. ./share/guile/2.0/language/scheme/
  569. ./share/guile/2.0/language/scheme/compile-tree-il.scm
  570. ./share/guile/2.0/language/scheme/decompile-tree-il.scm
  571. ./share/guile/2.0/language/scheme/spec.scm
  572. ./share/guile/2.0/language/brainfuck/
  573. ./share/guile/2.0/language/brainfuck/compile-tree-il.scm
  574. ./share/guile/2.0/language/brainfuck/compile-scheme.scm
  575. ./share/guile/2.0/language/brainfuck/spec.scm
  576. ./share/guile/2.0/language/brainfuck/parse.scm
  577. ./share/guile/2.0/language/objcode/
  578. ./share/guile/2.0/language/objcode/spec.scm
  579. ./share/guile/2.0/language/assembly.scm
  580. ./share/guile/2.0/language/bytecode/
  581. ./share/guile/2.0/language/bytecode/spec.scm
  582. ./share/guile/2.0/language/glil/
  583. ./share/guile/2.0/language/glil/spec.scm
  584. ./share/guile/2.0/language/glil/compile-assembly.scm
  585. ./share/guile/2.0/language/tree-il/
  586. ./share/guile/2.0/language/tree-il/analyze.scm
  587. ./share/guile/2.0/language/tree-il/inline.scm
  588. ./share/guile/2.0/language/tree-il/debug.scm
  589. ./share/guile/2.0/language/tree-il/primitives.scm
  590. ./share/guile/2.0/language/tree-il/optimize.scm
  591. ./share/guile/2.0/language/tree-il/fix-letrec.scm
  592. ./share/guile/2.0/language/tree-il/spec.scm
  593. ./share/guile/2.0/language/tree-il/peval.scm
  594. ./share/guile/2.0/language/tree-il/compile-glil.scm
  595. ./share/guile/2.0/language/tree-il/cse.scm
  596. ./share/guile/2.0/language/tree-il/canonicalize.scm
  597. ./share/guile/2.0/language/tree-il/effects.scm
  598. ./share/guile/2.0/language/ecmascript/
  599. ./share/guile/2.0/language/ecmascript/base.scm
  600. ./share/guile/2.0/language/ecmascript/compile-tree-il.scm
  601. ./share/guile/2.0/language/ecmascript/function.scm
  602. ./share/guile/2.0/language/ecmascript/array.scm
  603. ./share/guile/2.0/language/ecmascript/tokenize.scm
  604. ./share/guile/2.0/language/ecmascript/spec.scm
  605. ./share/guile/2.0/language/ecmascript/impl.scm
  606. ./share/guile/2.0/language/ecmascript/parse.scm
  607. ./share/guile/2.0/language/value/
  608. ./share/guile/2.0/language/value/spec.scm
  609. ./share/guile/2.0/language/glil.scm
  610. ./share/guile/2.0/language/tree-il.scm
  611. ./share/guile/2.0/rnrs.scm
  612. ./share/guile/2.0/statprof.scm
  613. ./share/guile/2.0/web/
  614. ./share/guile/2.0/web/client.scm
  615. ./share/guile/2.0/web/response.scm
  616. ./share/guile/2.0/web/uri.scm
  617. ./share/guile/2.0/web/server/
  618. ./share/guile/2.0/web/server/http.scm
  619. ./share/guile/2.0/web/request.scm
  620. ./share/guile/2.0/web/server.scm
  621. ./share/guile/2.0/web/http.scm
  622. ./share/guile/2.0/oop/
  623. ./share/guile/2.0/oop/goops.scm
  624. ./share/guile/2.0/oop/goops/
  625. ./share/guile/2.0/oop/goops/save.scm
  626. ./share/guile/2.0/oop/goops/stklos.scm
  627. ./share/guile/2.0/oop/goops/accessors.scm
  628. ./share/guile/2.0/oop/goops/describe.scm
  629. ./share/guile/2.0/oop/goops/dispatch.scm
  630. ./share/guile/2.0/oop/goops/active-slot.scm
  631. ./share/guile/2.0/oop/goops/composite-slot.scm
  632. ./share/guile/2.0/oop/goops/compile.scm
  633. ./share/guile/2.0/oop/goops/internal.scm
  634. ./share/guile/2.0/oop/goops/util.scm
  635. ./share/guile/2.0/oop/goops/simple.scm
  636. ./share/guile/2.0/guile-procedures.txt
  637. ./share/guile/2.0/texinfo.scm
  638. ./share/guile/2.0/rnrs/
  639. ./share/guile/2.0/rnrs/base.scm
  640. ./share/guile/2.0/rnrs/records/
  641. ./share/guile/2.0/rnrs/records/syntactic.scm
  642. ./share/guile/2.0/rnrs/records/inspection.scm
  643. ./share/guile/2.0/rnrs/records/procedural.scm
  644. ./share/guile/2.0/rnrs/arithmetic/
  645. ./share/guile/2.0/rnrs/arithmetic/bitwise.scm
  646. ./share/guile/2.0/rnrs/arithmetic/fixnums.scm
  647. ./share/guile/2.0/rnrs/arithmetic/flonums.scm
  648. ./share/guile/2.0/rnrs/unicode.scm
  649. ./share/guile/2.0/rnrs/enums.scm
  650. ./share/guile/2.0/rnrs/hashtables.scm
  651. ./share/guile/2.0/rnrs/control.scm
  652. ./share/guile/2.0/rnrs/syntax-case.scm
  653. ./share/guile/2.0/rnrs/sorting.scm
  654. ./share/guile/2.0/rnrs/lists.scm
  655. ./share/guile/2.0/rnrs/mutable-strings.scm
  656. ./share/guile/2.0/rnrs/conditions.scm
  657. ./share/guile/2.0/rnrs/r5rs.scm
  658. ./share/guile/2.0/rnrs/mutable-pairs.scm
  659. ./share/guile/2.0/rnrs/programs.scm
  660. ./share/guile/2.0/rnrs/exceptions.scm
  661. ./share/guile/2.0/rnrs/eval.scm
  662. ./share/guile/2.0/rnrs/files.scm
  663. ./share/guile/2.0/rnrs/io/
  664. ./share/guile/2.0/rnrs/io/ports.scm
  665. ./share/guile/2.0/rnrs/io/simple.scm
  666. ./share/guile/2.0/rnrs/bytevectors.scm
  667. ./share/guile/2.0/sxml/
  668. ./share/guile/2.0/sxml/sxml-match.ss
  669. ./share/guile/2.0/sxml/fold.scm
  670. ./share/guile/2.0/sxml/ssax.scm
  671. ./share/guile/2.0/sxml/apply-templates.scm
  672. ./share/guile/2.0/sxml/xpath.scm
  673. ./share/guile/2.0/sxml/upstream/
  674. ./share/guile/2.0/sxml/upstream/SSAX.scm
  675. ./share/guile/2.0/sxml/upstream/assert.scm
  676. ./share/guile/2.0/sxml/upstream/SXPath-old.scm
  677. ./share/guile/2.0/sxml/upstream/input-parse.scm
  678. ./share/guile/2.0/sxml/upstream/SXML-tree-trans.scm
  679. ./share/guile/2.0/sxml/transform.scm
  680. ./share/guile/2.0/sxml/match.scm
  681. ./share/guile/2.0/sxml/simple.scm
  682. ./share/guile/2.0/sxml/ssax/
  683. ./share/guile/2.0/sxml/ssax/input-parse.scm
  684. ./share/guile/2.0/srfi/
  685. ./share/guile/2.0/srfi/srfi-88.scm
  686. ./share/guile/2.0/srfi/srfi-14.scm
  687. ./share/guile/2.0/srfi/srfi-6.scm
  688. ./share/guile/2.0/srfi/srfi-67.scm
  689. ./share/guile/2.0/srfi/srfi-42/
  690. ./share/guile/2.0/srfi/srfi-42/ec.scm
  691. ./share/guile/2.0/srfi/srfi-19.scm
  692. ./share/guile/2.0/srfi/srfi-31.scm
  693. ./share/guile/2.0/srfi/srfi-41.scm
  694. ./share/guile/2.0/srfi/srfi-35.scm
  695. ./share/guile/2.0/srfi/srfi-34.scm
  696. ./share/guile/2.0/srfi/srfi-60.scm
  697. ./share/guile/2.0/srfi/srfi-18.scm
  698. ./share/guile/2.0/srfi/srfi-37.scm
  699. ./share/guile/2.0/srfi/srfi-4/
  700. ./share/guile/2.0/srfi/srfi-4/gnu.scm
  701. ./share/guile/2.0/srfi/srfi-16.scm
  702. ./share/guile/2.0/srfi/srfi-69.scm
  703. ./share/guile/2.0/srfi/srfi-17.scm
  704. ./share/guile/2.0/srfi/srfi-2.scm
  705. ./share/guile/2.0/srfi/srfi-27.scm
  706. ./share/guile/2.0/srfi/srfi-26.scm
  707. ./share/guile/2.0/srfi/srfi-8.scm
  708. ./share/guile/2.0/srfi/srfi-4.scm
  709. ./share/guile/2.0/srfi/srfi-11.scm
  710. ./share/guile/2.0/srfi/srfi-13.scm
  711. ./share/guile/2.0/srfi/srfi-67/
  712. ./share/guile/2.0/srfi/srfi-67/compare.scm
  713. ./share/guile/2.0/srfi/srfi-45.scm
  714. ./share/guile/2.0/srfi/srfi-9.scm
  715. ./share/guile/2.0/srfi/srfi-9/
  716. ./share/guile/2.0/srfi/srfi-9/gnu.scm
  717. ./share/guile/2.0/srfi/srfi-10.scm
  718. ./share/guile/2.0/srfi/srfi-42.scm
  719. ./share/guile/2.0/srfi/srfi-39.scm
  720. ./share/guile/2.0/srfi/srfi-1.scm
  721. ./share/guile/2.0/srfi/srfi-38.scm
  722. ./share/guile/2.0/srfi/srfi-98.scm
  723. ./lib/
  724. ./lib/guile/
  725. ./lib/guile/2.0/
  726. ./lib/guile/2.0/ccache/
  727. ./lib/guile/2.0/ccache/system/
  728. ./lib/guile/2.0/ccache/system/foreign.go
  729. ./lib/guile/2.0/ccache/system/repl/
  730. ./lib/guile/2.0/ccache/system/repl/command.go
  731. ./lib/guile/2.0/ccache/system/repl/error-handling.go
  732. ./lib/guile/2.0/ccache/system/repl/repl.go
  733. ./lib/guile/2.0/ccache/system/repl/debug.go
  734. ./lib/guile/2.0/ccache/system/repl/server.go
  735. ./lib/guile/2.0/ccache/system/repl/common.go
  736. ./lib/guile/2.0/ccache/system/xref.go
  737. ./lib/guile/2.0/ccache/system/base/
  738. ./lib/guile/2.0/ccache/system/base/ck.go
  739. ./lib/guile/2.0/ccache/system/base/lalr.go
  740. ./lib/guile/2.0/ccache/system/base/pmatch.go
  741. ./lib/guile/2.0/ccache/system/base/message.go
  742. ./lib/guile/2.0/ccache/system/base/syntax.go
  743. ./lib/guile/2.0/ccache/system/base/language.go
  744. ./lib/guile/2.0/ccache/system/base/target.go
  745. ./lib/guile/2.0/ccache/system/base/compile.go
  746. ./lib/guile/2.0/ccache/system/vm/
  747. ./lib/guile/2.0/ccache/system/vm/traps.go
  748. ./lib/guile/2.0/ccache/system/vm/frame.go
  749. ./lib/guile/2.0/ccache/system/vm/objcode.go
  750. ./lib/guile/2.0/ccache/system/vm/program.go
  751. ./lib/guile/2.0/ccache/system/vm/instruction.go
  752. ./lib/guile/2.0/ccache/system/vm/coverage.go
  753. ./lib/guile/2.0/ccache/system/vm/vm.go
  754. ./lib/guile/2.0/ccache/system/vm/trap-state.go
  755. ./lib/guile/2.0/ccache/system/vm/inspect.go
  756. ./lib/guile/2.0/ccache/system/vm/trace.go
  757. ./lib/guile/2.0/ccache/scripts/
  758. ./lib/guile/2.0/ccache/scripts/scan-api.go
  759. ./lib/guile/2.0/ccache/scripts/use2dot.go
  760. ./lib/guile/2.0/ccache/scripts/autofrisk.go
  761. ./lib/guile/2.0/ccache/scripts/api-diff.go
  762. ./lib/guile/2.0/ccache/scripts/read-text-outline.go
  763. ./lib/guile/2.0/ccache/scripts/punify.go
  764. ./lib/guile/2.0/ccache/scripts/snarf-guile-m4-docs.go
  765. ./lib/guile/2.0/ccache/scripts/read-scheme-source.go
  766. ./lib/guile/2.0/ccache/scripts/frisk.go
  767. ./lib/guile/2.0/ccache/scripts/summarize-guile-TODO.go
  768. ./lib/guile/2.0/ccache/scripts/lint.go
  769. ./lib/guile/2.0/ccache/scripts/display-commentary.go
  770. ./lib/guile/2.0/ccache/scripts/disassemble.go
  771. ./lib/guile/2.0/ccache/scripts/generate-autoload.go
  772. ./lib/guile/2.0/ccache/scripts/snarf-check-and-output-texi.go
  773. ./lib/guile/2.0/ccache/scripts/read-rfc822.go
  774. ./lib/guile/2.0/ccache/scripts/doc-snarf.go
  775. ./lib/guile/2.0/ccache/scripts/compile.go
  776. ./lib/guile/2.0/ccache/scripts/help.go
  777. ./lib/guile/2.0/ccache/scripts/list.go
  778. ./lib/guile/2.0/ccache/texinfo/
  779. ./lib/guile/2.0/ccache/texinfo/docbook.go
  780. ./lib/guile/2.0/ccache/texinfo/serialize.go
  781. ./lib/guile/2.0/ccache/texinfo/html.go
  782. ./lib/guile/2.0/ccache/texinfo/reflection.go
  783. ./lib/guile/2.0/ccache/texinfo/indexing.go
  784. ./lib/guile/2.0/ccache/texinfo/plain-text.go
  785. ./lib/guile/2.0/ccache/texinfo/string-utils.go
  786. ./lib/guile/2.0/ccache/ice-9/
  787. ./lib/guile/2.0/ccache/ice-9/r4rs.go
  788. ./lib/guile/2.0/ccache/ice-9/poll.go
  789. ./lib/guile/2.0/ccache/ice-9/syncase.go
  790. ./lib/guile/2.0/ccache/ice-9/common-list.go
  791. ./lib/guile/2.0/ccache/ice-9/stack-catch.go
  792. ./lib/guile/2.0/ccache/ice-9/control.go
  793. ./lib/guile/2.0/ccache/ice-9/binary-ports.go
  794. ./lib/guile/2.0/ccache/ice-9/regex.go
  795. ./lib/guile/2.0/ccache/ice-9/safe.go
  796. ./lib/guile/2.0/ccache/ice-9/buffered-input.go
  797. ./lib/guile/2.0/ccache/ice-9/boot-9.go
  798. ./lib/guile/2.0/ccache/ice-9/and-let-star.go
  799. ./lib/guile/2.0/ccache/ice-9/expect.go
  800. ./lib/guile/2.0/ccache/ice-9/gap-buffer.go
  801. ./lib/guile/2.0/ccache/ice-9/pretty-print.go
  802. ./lib/guile/2.0/ccache/ice-9/time.go
  803. ./lib/guile/2.0/ccache/ice-9/serialize.go
  804. ./lib/guile/2.0/ccache/ice-9/debug.go
  805. ./lib/guile/2.0/ccache/ice-9/rw.go
  806. ./lib/guile/2.0/ccache/ice-9/command-line.go
  807. ./lib/guile/2.0/ccache/ice-9/networking.go
  808. ./lib/guile/2.0/ccache/ice-9/posix.go
  809. ./lib/guile/2.0/ccache/ice-9/psyntax-pp.go
  810. ./lib/guile/2.0/ccache/ice-9/format.go
  811. ./lib/guile/2.0/ccache/ice-9/optargs.go
  812. ./lib/guile/2.0/ccache/ice-9/history.go
  813. ./lib/guile/2.0/ccache/ice-9/vlist.go
  814. ./lib/guile/2.0/ccache/ice-9/threads.go
  815. ./lib/guile/2.0/ccache/ice-9/safe-r5rs.go
  816. ./lib/guile/2.0/ccache/ice-9/streams.go
  817. ./lib/guile/2.0/ccache/ice-9/readline.go
  818. ./lib/guile/2.0/ccache/ice-9/slib.go
  819. ./lib/guile/2.0/ccache/ice-9/scm-style-repl.go
  820. ./lib/guile/2.0/ccache/ice-9/session.go
  821. ./lib/guile/2.0/ccache/ice-9/top-repl.go
  822. ./lib/guile/2.0/ccache/ice-9/channel.go
  823. ./lib/guile/2.0/ccache/ice-9/q.go
  824. ./lib/guile/2.0/ccache/ice-9/string-fun.go
  825. ./lib/guile/2.0/ccache/ice-9/r5rs.go
  826. ./lib/guile/2.0/ccache/ice-9/calling.go
  827. ./lib/guile/2.0/ccache/ice-9/futures.go
  828. ./lib/guile/2.0/ccache/ice-9/null.go
  829. ./lib/guile/2.0/ccache/ice-9/occam-channel.go
  830. ./lib/guile/2.0/ccache/ice-9/eval.go
  831. ./lib/guile/2.0/ccache/ice-9/receive.go
  832. ./lib/guile/2.0/ccache/ice-9/ftw.go
  833. ./lib/guile/2.0/ccache/ice-9/runq.go
  834. ./lib/guile/2.0/ccache/ice-9/rdelim.go
  835. ./lib/guile/2.0/ccache/ice-9/save-stack.go
  836. ./lib/guile/2.0/ccache/ice-9/local-eval.go
  837. ./lib/guile/2.0/ccache/ice-9/getopt-long.go
  838. ./lib/guile/2.0/ccache/ice-9/ls.go
  839. ./lib/guile/2.0/ccache/ice-9/lineio.go
  840. ./lib/guile/2.0/ccache/ice-9/i18n.go
  841. ./lib/guile/2.0/ccache/ice-9/deprecated.go
  842. ./lib/guile/2.0/ccache/ice-9/hcons.go
  843. ./lib/guile/2.0/ccache/ice-9/popen.go
  844. ./lib/guile/2.0/ccache/ice-9/curried-definitions.go
  845. ./lib/guile/2.0/ccache/ice-9/eval-string.go
  846. ./lib/guile/2.0/ccache/ice-9/match.go
  847. ./lib/guile/2.0/ccache/ice-9/weak-vector.go
  848. ./lib/guile/2.0/ccache/ice-9/poe.go
  849. ./lib/guile/2.0/ccache/ice-9/mapping.go
  850. ./lib/guile/2.0/ccache/ice-9/list.go
  851. ./lib/guile/2.0/ccache/ice-9/documentation.go
  852. ./lib/guile/2.0/ccache/ice-9/iconv.go
  853. ./lib/guile/2.0/ccache/language/
  854. ./lib/guile/2.0/ccache/language/assembly.go
  855. ./lib/guile/2.0/ccache/language/elisp/
  856. ./lib/guile/2.0/ccache/language/elisp/compile-tree-il.go
  857. ./lib/guile/2.0/ccache/language/elisp/spec.go
  858. ./lib/guile/2.0/ccache/language/elisp/parser.go
  859. ./lib/guile/2.0/ccache/language/elisp/runtime.go
  860. ./lib/guile/2.0/ccache/language/elisp/bindings.go
  861. ./lib/guile/2.0/ccache/language/elisp/lexer.go
  862. ./lib/guile/2.0/ccache/language/elisp/runtime/
  863. ./lib/guile/2.0/ccache/language/elisp/runtime/value-slot.go
  864. ./lib/guile/2.0/ccache/language/elisp/runtime/function-slot.go
  865. ./lib/guile/2.0/ccache/language/elisp/runtime/subrs.go
  866. ./lib/guile/2.0/ccache/language/elisp/runtime/macros.go
  867. ./lib/guile/2.0/ccache/language/assembly/
  868. ./lib/guile/2.0/ccache/language/assembly/decompile-bytecode.go
  869. ./lib/guile/2.0/ccache/language/assembly/spec.go
  870. ./lib/guile/2.0/ccache/language/assembly/compile-bytecode.go
  871. ./lib/guile/2.0/ccache/language/assembly/disassemble.go
  872. ./lib/guile/2.0/ccache/language/tree-il.go
  873. ./lib/guile/2.0/ccache/language/glil.go
  874. ./lib/guile/2.0/ccache/language/scheme/
  875. ./lib/guile/2.0/ccache/language/scheme/compile-tree-il.go
  876. ./lib/guile/2.0/ccache/language/scheme/spec.go
  877. ./lib/guile/2.0/ccache/language/scheme/decompile-tree-il.go
  878. ./lib/guile/2.0/ccache/language/brainfuck/
  879. ./lib/guile/2.0/ccache/language/brainfuck/compile-tree-il.go
  880. ./lib/guile/2.0/ccache/language/brainfuck/spec.go
  881. ./lib/guile/2.0/ccache/language/brainfuck/parse.go
  882. ./lib/guile/2.0/ccache/language/brainfuck/compile-scheme.go
  883. ./lib/guile/2.0/ccache/language/objcode/
  884. ./lib/guile/2.0/ccache/language/objcode/spec.go
  885. ./lib/guile/2.0/ccache/language/bytecode/
  886. ./lib/guile/2.0/ccache/language/bytecode/spec.go
  887. ./lib/guile/2.0/ccache/language/glil/
  888. ./lib/guile/2.0/ccache/language/glil/compile-assembly.go
  889. ./lib/guile/2.0/ccache/language/glil/spec.go
  890. ./lib/guile/2.0/ccache/language/tree-il/
  891. ./lib/guile/2.0/ccache/language/tree-il/debug.go
  892. ./lib/guile/2.0/ccache/language/tree-il/compile-glil.go
  893. ./lib/guile/2.0/ccache/language/tree-il/optimize.go
  894. ./lib/guile/2.0/ccache/language/tree-il/spec.go
  895. ./lib/guile/2.0/ccache/language/tree-il/canonicalize.go
  896. ./lib/guile/2.0/ccache/language/tree-il/inline.go
  897. ./lib/guile/2.0/ccache/language/tree-il/analyze.go
  898. ./lib/guile/2.0/ccache/language/tree-il/peval.go
  899. ./lib/guile/2.0/ccache/language/tree-il/cse.go
  900. ./lib/guile/2.0/ccache/language/tree-il/fix-letrec.go
  901. ./lib/guile/2.0/ccache/language/tree-il/effects.go
  902. ./lib/guile/2.0/ccache/language/tree-il/primitives.go
  903. ./lib/guile/2.0/ccache/language/ecmascript/
  904. ./lib/guile/2.0/ccache/language/ecmascript/compile-tree-il.go
  905. ./lib/guile/2.0/ccache/language/ecmascript/spec.go
  906. ./lib/guile/2.0/ccache/language/ecmascript/parse.go
  907. ./lib/guile/2.0/ccache/language/ecmascript/tokenize.go
  908. ./lib/guile/2.0/ccache/language/ecmascript/array.go
  909. ./lib/guile/2.0/ccache/language/ecmascript/impl.go
  910. ./lib/guile/2.0/ccache/language/ecmascript/function.go
  911. ./lib/guile/2.0/ccache/language/ecmascript/base.go
  912. ./lib/guile/2.0/ccache/language/value/
  913. ./lib/guile/2.0/ccache/language/value/spec.go
  914. ./lib/guile/2.0/ccache/web/
  915. ./lib/guile/2.0/ccache/web/http.go
  916. ./lib/guile/2.0/ccache/web/server/
  917. ./lib/guile/2.0/ccache/web/server/http.go
  918. ./lib/guile/2.0/ccache/web/client.go
  919. ./lib/guile/2.0/ccache/web/request.go
  920. ./lib/guile/2.0/ccache/web/server.go
  921. ./lib/guile/2.0/ccache/web/uri.go
  922. ./lib/guile/2.0/ccache/web/response.go
  923. ./lib/guile/2.0/ccache/oop/
  924. ./lib/guile/2.0/ccache/oop/goops.go
  925. ./lib/guile/2.0/ccache/oop/goops/
  926. ./lib/guile/2.0/ccache/oop/goops/composite-slot.go
  927. ./lib/guile/2.0/ccache/oop/goops/internal.go
  928. ./lib/guile/2.0/ccache/oop/goops/stklos.go
  929. ./lib/guile/2.0/ccache/oop/goops/save.go
  930. ./lib/guile/2.0/ccache/oop/goops/dispatch.go
  931. ./lib/guile/2.0/ccache/oop/goops/util.go
  932. ./lib/guile/2.0/ccache/oop/goops/active-slot.go
  933. ./lib/guile/2.0/ccache/oop/goops/simple.go
  934. ./lib/guile/2.0/ccache/oop/goops/describe.go
  935. ./lib/guile/2.0/ccache/oop/goops/compile.go
  936. ./lib/guile/2.0/ccache/oop/goops/accessors.go
  937. ./lib/guile/2.0/ccache/rnrs/
  938. ./lib/guile/2.0/ccache/rnrs/mutable-pairs.go
  939. ./lib/guile/2.0/ccache/rnrs/control.go
  940. ./lib/guile/2.0/ccache/rnrs/records/
  941. ./lib/guile/2.0/ccache/rnrs/records/procedural.go
  942. ./lib/guile/2.0/ccache/rnrs/records/syntactic.go
  943. ./lib/guile/2.0/ccache/rnrs/records/inspection.go
  944. ./lib/guile/2.0/ccache/rnrs/arithmetic/
  945. ./lib/guile/2.0/ccache/rnrs/arithmetic/fixnums.go
  946. ./lib/guile/2.0/ccache/rnrs/arithmetic/bitwise.go
  947. ./lib/guile/2.0/ccache/rnrs/arithmetic/flonums.go
  948. ./lib/guile/2.0/ccache/rnrs/enums.go
  949. ./lib/guile/2.0/ccache/rnrs/programs.go
  950. ./lib/guile/2.0/ccache/rnrs/exceptions.go
  951. ./lib/guile/2.0/ccache/rnrs/files.go
  952. ./lib/guile/2.0/ccache/rnrs/syntax-case.go
  953. ./lib/guile/2.0/ccache/rnrs/lists.go
  954. ./lib/guile/2.0/ccache/rnrs/mutable-strings.go
  955. ./lib/guile/2.0/ccache/rnrs/unicode.go
  956. ./lib/guile/2.0/ccache/rnrs/r5rs.go
  957. ./lib/guile/2.0/ccache/rnrs/hashtables.go
  958. ./lib/guile/2.0/ccache/rnrs/eval.go
  959. ./lib/guile/2.0/ccache/rnrs/conditions.go
  960. ./lib/guile/2.0/ccache/rnrs/bytevectors.go
  961. ./lib/guile/2.0/ccache/rnrs/sorting.go
  962. ./lib/guile/2.0/ccache/rnrs/base.go
  963. ./lib/guile/2.0/ccache/rnrs/io/
  964. ./lib/guile/2.0/ccache/rnrs/io/ports.go
  965. ./lib/guile/2.0/ccache/rnrs/io/simple.go
  966. ./lib/guile/2.0/ccache/sxml/
  967. ./lib/guile/2.0/ccache/sxml/transform.go
  968. ./lib/guile/2.0/ccache/sxml/ssax.go
  969. ./lib/guile/2.0/ccache/sxml/simple.go
  970. ./lib/guile/2.0/ccache/sxml/apply-templates.go
  971. ./lib/guile/2.0/ccache/sxml/xpath.go
  972. ./lib/guile/2.0/ccache/sxml/match.go
  973. ./lib/guile/2.0/ccache/sxml/fold.go
  974. ./lib/guile/2.0/ccache/sxml/ssax/
  975. ./lib/guile/2.0/ccache/sxml/ssax/input-parse.go
  976. ./lib/guile/2.0/ccache/rnrs.go
  977. ./lib/guile/2.0/ccache/srfi/
  978. ./lib/guile/2.0/ccache/srfi/srfi-4.go
  979. ./lib/guile/2.0/ccache/srfi/srfi-14.go
  980. ./lib/guile/2.0/ccache/srfi/srfi-26.go
  981. ./lib/guile/2.0/ccache/srfi/srfi-17.go
  982. ./lib/guile/2.0/ccache/srfi/srfi-27.go
  983. ./lib/guile/2.0/ccache/srfi/srfi-38.go
  984. ./lib/guile/2.0/ccache/srfi/srfi-34.go
  985. ./lib/guile/2.0/ccache/srfi/srfi-13.go
  986. ./lib/guile/2.0/ccache/srfi/srfi-41.go
  987. ./lib/guile/2.0/ccache/srfi/srfi-19.go
  988. ./lib/guile/2.0/ccache/srfi/srfi-67.go
  989. ./lib/guile/2.0/ccache/srfi/srfi-9.go
  990. ./lib/guile/2.0/ccache/srfi/srfi-2.go
  991. ./lib/guile/2.0/ccache/srfi/srfi-4/
  992. ./lib/guile/2.0/ccache/srfi/srfi-4/gnu.go
  993. ./lib/guile/2.0/ccache/srfi/srfi-60.go
  994. ./lib/guile/2.0/ccache/srfi/srfi-11.go
  995. ./lib/guile/2.0/ccache/srfi/srfi-69.go
  996. ./lib/guile/2.0/ccache/srfi/srfi-6.go
  997. ./lib/guile/2.0/ccache/srfi/srfi-37.go
  998. ./lib/guile/2.0/ccache/srfi/srfi-39.go
  999. ./lib/guile/2.0/ccache/srfi/srfi-1.go
  1000. ./lib/guile/2.0/ccache/srfi/srfi-8.go
  1001. ./lib/guile/2.0/ccache/srfi/srfi-9/
  1002. ./lib/guile/2.0/ccache/srfi/srfi-9/gnu.go
  1003. ./lib/guile/2.0/ccache/srfi/srfi-45.go
  1004. ./lib/guile/2.0/ccache/srfi/srfi-42.go
  1005. ./lib/guile/2.0/ccache/srfi/srfi-16.go
  1006. ./lib/guile/2.0/ccache/srfi/srfi-31.go
  1007. ./lib/guile/2.0/ccache/srfi/srfi-18.go
  1008. ./lib/guile/2.0/ccache/srfi/srfi-88.go
  1009. ./lib/guile/2.0/ccache/srfi/srfi-10.go
  1010. ./lib/guile/2.0/ccache/srfi/srfi-35.go
  1011. ./lib/guile/2.0/ccache/srfi/srfi-98.go
  1012. ./lib/guile/2.0/ccache/texinfo.go
  1013. ./lib/guile/2.0/ccache/statprof.go
  1014. ./bin/
  1015. ./bin/guile
  1016. guile (GNU Guile) 2.0.9
  1017. Copyright (C) 2013 Free Software Foundation, Inc.
  1018.  
  1019. License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>.
  1020. This is free software: you are free to change and redistribute it.
  1021. There is NO WARRANTY, to the extent permitted by law.
  1022. @ build-succeeded /tmp/guix-tests/store/kn0gx5na8k2nilq6c362bmavywnilkhq-guile-bootstrap-2.0.drv -
  1023. @ build-started /tmp/guix-tests/store/hwqvffm35c4xp24yvmamy8p5bg3j33rl-sleep-then-succeed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/hw//qvffm35c4xp24yvmamy8p5bg3j33rl-sleep-then-succeed.drv.bz2
  1024. @ build-succeeded /tmp/guix-tests/store/hwqvffm35c4xp24yvmamy8p5bg3j33rl-sleep-then-succeed.drv -
  1025. @ build-started /tmp/guix-tests/store/nzs8yyjwcl3b3pw7yrwvshq7km0slqqg-bar.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/nz//s8yyjwcl3b3pw7yrwvshq7km0slqqg-bar.drv.bz2
  1026. @ build-succeeded /tmp/guix-tests/store/nzs8yyjwcl3b3pw7yrwvshq7km0slqqg-bar.drv -
  1027. @ build-started /tmp/guix-tests/store/7amfgi1b8y64ckydz2w6sl125ajdzh6w-foo.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/7a//mfgi1b8y64ckydz2w6sl125ajdzh6w-foo.drv.bz2
  1028. @ build-succeeded /tmp/guix-tests/store/7amfgi1b8y64ckydz2w6sl125ajdzh6w-foo.drv -
  1029. (search-path %load-path "ice-9/boot-9.scm"))
  1030. +          (input*
  1031. +            (add-to-store
  1032. +              %store
  1033. +              (basename input)
  1034. +              #t
  1035. +              "sha256"
  1036. +              input))
  1037. +          (drv (derivation
  1038. +                 %store
  1039. +                 "derivation-with-input-file"
  1040. +                 %bash
  1041. +                 `(,builder)
  1042. +                 #:env-vars
  1043. +                 `(("in" unquote input*))
  1044. +                 #:inputs
  1045. +                 `((,%bash) (,builder) (,input)))))
  1046. +     (and (build-derivations %store (list drv))
  1047. +          (valid-path?
  1048. +            %store
  1049. +            (derivation->output-path drv)))))
  1050. actual-value: #t
  1051. result: PASS
  1052.  
  1053. test-name: derivation fails but keep going
  1054. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:165
  1055. source:
  1056. + (test-assert
  1057. +   "derivation fails but keep going"
  1058. +   (with-store
  1059. +     store
  1060. +     (let* ((d1 (derivation
  1061. +                  %store
  1062. +                  "fails"
  1063. +                  %bash
  1064. +                  `("-c" "false")
  1065. +                  #:inputs
  1066. +                  `((,%bash))))
  1067. +            (d2 (build-expression->derivation
  1068. +                  %store
  1069. +                  "sleep-then-succeed"
  1070. +                  `(begin ,(random-text) (sleep 2) (mkdir %output)))))
  1071. +       (set-build-options
  1072. +         %store
  1073. +         #:use-substitutes?
  1074. +         #f
  1075. +         #:keep-going?
  1076. +         #t)
  1077. +       (guard (c ((nix-protocol-error? c)
  1078. +                  (and (= 100 (nix-protocol-error-status c))
  1079. +                       (string-contains
  1080. +                         (nix-protocol-error-message c)
  1081. +                         (derivation-file-name d1))
  1082. +                       (not (valid-path? %store (derivation->output-path d1)))
  1083. +                       (valid-path? %store (derivation->output-path d2)))))
  1084. +              (build-derivations %store (list d1 d2))
  1085. +              #f))))
  1086. actual-value: #t
  1087. result: PASS
  1088.  
  1089. test-name: identical files are deduplicated
  1090. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:192
  1091. source:
  1092. + (test-assert
  1093. +   "identical files are deduplicated"
  1094. +   (let* ((build1
  1095. +            (add-text-to-store
  1096. +              %store
  1097. +              "one.sh"
  1098. +              "echo hello, world > \"$out\"\n"
  1099. +              '()))
  1100. +          (build2
  1101. +            (add-text-to-store
  1102. +              %store
  1103. +              "two.sh"
  1104. +              "# Hey!\necho hello, world > \"$out\"\n"
  1105. +              '()))
  1106. +          (drv1 (derivation
  1107. +                  %store
  1108. +                  "foo"
  1109. +                  %bash
  1110. +                  `(,build1)
  1111. +                  #:inputs
  1112. +                  `((,%bash) (,build1))))
  1113. +          (drv2 (derivation
  1114. +                  %store
  1115. +                  "bar"
  1116. +                  %bash
  1117. +                  `(,build2)
  1118. +                  #:inputs
  1119. +                  `((,%bash) (,build2)))))
  1120. +     (and (build-derivations %store (list drv1 drv2))
  1121. +          (let ((file1 (derivation->output-path drv1))
  1122. +                (file2 (derivation->output-path drv2)))
  1123. +            (and (valid-path? %store file1)
  1124. +                 (valid-path? %store file2)
  1125. +                 (string=?
  1126. +                   (call-with-input-file file1 get-string-all)
  1127. +                   "hello, world\n")
  1128. +                 (= (stat:ino (lstat file1))
  1129. +                    (stat:ino (lstat file2))))))))
  1130. actual-value: #t
  1131. result: PASS
  1132.  
  1133. test-name: built-in-builders
  1134. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:214
  1135. source:
  1136. + (test-equal
  1137. +   "built-in-builders"
  1138. +   '("download")
  1139. +   (built-in-builders %store))
  1140. expected-value: ("download")
  1141. actual-value: ("download")
  1142. result: PASS
  1143.  
  1144. test-name: unknown built-in builder
  1145. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:218
  1146. source:
  1147. + (test-assert
  1148. +   "unknown built-in builder"
  1149. +   (let ((drv (derivation
  1150. +                %store
  1151. +                "ohoh"
  1152. +                "builtin:does-not-exist"
  1153. +                '())))
  1154. +     (guard (c ((nix-protocol-error? c)
  1155. +                (string-contains
  1156. +                  (nix-protocol-error-message c)
  1157. + @ build-started /tmp/guix-tests/store/96bncx0a55ryyvb2i6z8i6rycxwlpwhg-ohoh.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/96//bncx0a55ryyvb2i6z8i6rycxwlpwhg-ohoh.drv.bz2
  1158. error: unsupported builtin function 'does-not-exist'
  1159. builder for `/tmp/guix-tests/store/96bncx0a55ryyvb2i6z8i6rycxwlpwhg-ohoh.drv' failed with exit code 1
  1160. @ build-failed /tmp/guix-tests/store/96bncx0a55ryyvb2i6z8i6rycxwlpwhg-ohoh.drv - 1 builder for `/tmp/guix-tests/store/96bncx0a55ryyvb2i6z8i6rycxwlpwhg-ohoh.drv' failed with exit code 1
  1161. @ build-started /tmp/guix-tests/store/smca5zf1p63b4gwk8al9x7pjjca91rd6-world.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/sm//ca5zf1p63b4gwk8al9x7pjjca91rd6-world.drv.bz2
  1162.  
  1163. Starting download of /tmp/guix-tests/store/nzg78pzn9mrwl35wq0lnz925cyjcrn5x-world
  1164. From http://localhost:10500/foo/bar...
  1165.  
  1166.  bar  64B                               0B/s 00:00 [                    ]   0.0%
  1167.  bar  64B                           305KiB/s 00:00 [####################] 100.0%
  1168. @ build-succeeded /tmp/guix-tests/store/smca5zf1p63b4gwk8al9x7pjjca91rd6-world.drv -
  1169. @ build-started /tmp/guix-tests/store/v45bx2cbgz6windf4w2mjs5nlnkf88ag-world.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/v4//5bx2cbgz6windf4w2mjs5nlnkf88ag-world.drv.bz2
  1170.  
  1171. Starting download of /tmp/guix-tests/store/56l4ckplfzx8y1mcrh11h4lg027krwgc-world
  1172. From http://localhost:10500/foo/bar...
  1173.  
  1174.  bar  13B                               0B/s 00:00 [                    ]   0.0%
  1175.  bar  13B                            59KiB/s 00:00 [####################] 100.0%
  1176. output path `/tmp/guix-tests/store/56l4ckplfzx8y1mcrh11h4lg027krwgc-world' should have sha256 hash `0srnayadyaqak1i9a7az1lxpbmgq8qpx6xpmi7v93qwra0nv49x4', instead has `0a7pd3rizm1qb3kz1ad1wzrijrhwsnq3lj7qprc86zp6a6r5drk8'
  1177. @ build-failed /tmp/guix-tests/store/v45bx2cbgz6windf4w2mjs5nlnkf88ag-world.drv - 1 output path `/tmp/guix-tests/store/56l4ckplfzx8y1mcrh11h4lg027krwgc-world' should have sha256 hash `0srnayadyaqak1i9a7az1lxpbmgq8qpx6xpmi7v93qwra0nv49x4', instead has `0a7pd3rizm1qb3kz1ad1wzrijrhwsnq3lj7qprc86zp6a6r5drk8'
  1178. @ build-started /tmp/guix-tests/store/169y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/16//9y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv.bz2
  1179.  
  1180. Starting download of /tmp/guix-tests/store/n98dcliqml18ylfx5a4ll82rvqprwhz0-will-never-be-found
  1181. From http://localhost:10500/foo/bar...
  1182. ERROR: download failed "http://localhost:10500/foo/bar" 404 "Such is life"
  1183. failed to download "/tmp/guix-tests/store/n98dcliqml18ylfx5a4ll82rvqprwhz0-will-never-be-found" from "http://localhost:10500/foo/bar"
  1184. builder for `/tmp/guix-tests/store/169y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv' failed to produce output path `/tmp/guix-tests/store/n98dcliqml18ylfx5a4ll82rvqprwhz0-will-never-be-found'
  1185. @ build-failed /tmp/guix-tests/store/169y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv - 1 builder for `/tmp/guix-tests/store/169y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv' failed to produce output path `/tmp/guix-tests/store/n98dcliqml18ylfx5a4ll82rvqprwhz0-will-never-be-found'
  1186. @ build-started /tmp/guix-tests/store/5hqvbsh3kc0mgh41rda902fk0vqjcq01-world.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/5h//qvbsh3kc0mgh41rda902fk0vqjcq01-world.drv.bz2
  1187. guix perform-download: error: /tmp/guix-tests/store/5hqvbsh3kc0mgh41rda902fk0vqjcq01-world.drv is not a fixed-output derivation
  1188. builder for `/tmp/guix-tests/store/5hqvbsh3kc0mgh41rda902fk0vqjcq01-world.drv' failed with exit code 1
  1189. @ build-failed /tmp/guix-tests/store/5hqvbsh3kc0mgh41rda902fk0vqjcq01-world.drv - 1 builder for `/tmp/guix-tests/store/5hqvbsh3kc0mgh41rda902fk0vqjcq01-world.drv' failed with exit code 1
  1190.                  "failed")))
  1191. +            (build-derivations %store (list drv))
  1192. +            #f)))
  1193. actual-value: 75
  1194. result: PASS
  1195.  
  1196. test-name: 'download' built-in builder
  1197. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:227
  1198. source:
  1199. + (test-assert
  1200. +   "'download' built-in builder"
  1201. +   (let ((text (random-text)))
  1202. +     (with-http-server
  1203. +       200
  1204. +       text
  1205. +       (let* ((drv (derivation
  1206. +                     %store
  1207. +                     "world"
  1208. +                     "builtin:download"
  1209. +                     '()
  1210. +                     #:env-vars
  1211. +                     `(("url" unquote (object->string (%local-url))))
  1212. +                     #:hash-algo
  1213. +                     'sha256
  1214. +                     #:hash
  1215. +                     (sha256 (string->utf8 text)))))
  1216. +         (and (build-derivations %store (list drv))
  1217. +              (string=?
  1218. +                (call-with-input-file
  1219. +                  (derivation->output-path drv)
  1220. +                  get-string-all)
  1221. +                text))))))
  1222. actual-value: #t
  1223. result: PASS
  1224.  
  1225. test-name: 'download' built-in builder, invalid hash
  1226. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:243
  1227. source:
  1228. + (test-assert
  1229. +   "'download' built-in builder, invalid hash"
  1230. +   (with-http-server
  1231. +     200
  1232. +     "hello, world!"
  1233. +     (let* ((drv (derivation
  1234. +                   %store
  1235. +                   "world"
  1236. +                   "builtin:download"
  1237. +                   '()
  1238. +                   #:env-vars
  1239. +                   `(("url" unquote (object->string (%local-url))))
  1240. +                   #:hash-algo
  1241. +                   'sha256
  1242. +                   #:hash
  1243. +                   (sha256 (random-bytevector 100)))))
  1244. +       (guard (c ((nix-protocol-error? c)
  1245. +                  (string-contains
  1246. +                    (nix-protocol-error-message c)
  1247. +                    "failed")))
  1248. +              (build-derivations %store (list drv))
  1249. +              #f))))
  1250. actual-value: 76
  1251. result: PASS
  1252.  
  1253. test-name: 'download' built-in builder, not found
  1254. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:258
  1255. source:
  1256. + (test-assert
  1257. +   "'download' built-in builder, not found"
  1258. +   (with-http-server
  1259. +     404
  1260. +     "not found"
  1261. +     (let* ((drv (derivation
  1262. +                   %store
  1263. +                   "will-never-be-found"
  1264. +                   "builtin:download"
  1265. +                   '()
  1266. +                   #:env-vars
  1267. +                   `(("url" unquote (object->string (%local-url))))
  1268. +                   #:hash-algo
  1269. +                   'sha256
  1270. +                   #:hash
  1271. +                   (sha256 (random-bytevector 100)))))
  1272. +       (guard (c ((nix-protocol-error? c)
  1273. +                  (string-contains
  1274. +                    (nix-protocol-error-message (pk c))
  1275. +                    "failed")))
  1276. +              (build-derivations %store (list drv))
  1277. +              #f))))
  1278.  
  1279. ;;; (#<condition &nix-protocol-error [message: "build of `/tmp/guix-tests/store/169y82wnbs4qkhccgqfm10i7zxpq1ind-will-never-be-found.drv' failed" status: 1] 1b94000>)
  1280. actual-value: 90
  1281. result: PASS
  1282.  
  1283. test-name: 'download' built-in builder, not fixed-output
  1284. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:271
  1285. source:
  1286. + (test-assert
  1287. +   "'download' built-in builder, not fixed-output"
  1288. +   (let* ((source (add-text-to-store %store "hello" "hi!"))
  1289. +          (url (string-append "file://" source))
  1290. +          (drv (derivation
  1291. +                 %store
  1292. +                 "world"
  1293. +                 "builtin:download"
  1294. +                 '()
  1295. +                 #:env-vars
  1296. +                 `(("url" unquote (object->string url))))))
  1297. +     (guard (c ((nix-protocol-error? c)
  1298. +                (string-contains
  1299. +                  (nix-protocol-error-message c)
  1300. +                  "failed")))
  1301. +            (build-derivations %store (list drv))
  1302. +            #f)))
  1303. actual-value: 76
  1304. result: PASS
  1305.  
  1306. test-name: 'download' built-in builder, check mode
  1307. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:284
  1308. source:
  1309. + (test-assert
  1310. +   "'download' built-in builder, check mode"
  1311. +   (let* ((text (random-text))
  1312. @ build-started /tmp/guix-tests/store/4qa12ysg1cfvj6z8ldlnsk48c73jyndg-world.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/4q//a12ysg1cfvj6z8ldlnsk48c73jyndg-world.drv.bz2
  1313.  
  1314. Starting download of /tmp/guix-tests/store/6fjrvl6qgrfmk4j891vjj2srnm5s1993-world
  1315. From http://localhost:10500/foo/bar...
  1316.  
  1317.  bar  64B                               0B/s 00:00 [                    ]   0.0%
  1318.  bar  64B                           293KiB/s 00:00 [####################] 100.0%
  1319. @ build-succeeded /tmp/guix-tests/store/4qa12ysg1cfvj6z8ldlnsk48c73jyndg-world.drv -
  1320. @ build-started /tmp/guix-tests/store/4qa12ysg1cfvj6z8ldlnsk48c73jyndg-world.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/4q//a12ysg1cfvj6z8ldlnsk48c73jyndg-world.drv.bz2
  1321.  
  1322. Starting download of /tmp/guix-tests/store/0ki5sxlqh77r1x4n9ra7qqiqzdl194r9-world
  1323. From http://localhost:10500/foo/bar...
  1324.  
  1325.  bar  64B                               0B/s 00:00 [                    ]   0.0%
  1326.  bar  64B                           298KiB/s 00:00 [####################] 100.0%
  1327. warning: rewriting hashes in `/tmp/guix-tests/store/6fjrvl6qgrfmk4j891vjj2srnm5s1993-world'; cross fingers
  1328. span class="sy0"> +         (drv (derivation
  1329. +                 %store
  1330. +                 "world"
  1331. +                 "builtin:download"
  1332. +                 '()
  1333. +                 #:env-vars
  1334. +                 `(("url" unquote (object->string (%local-url))))
  1335. +                 #:hash-algo
  1336. +                 'sha256
  1337. +                 #:hash
  1338. +                 (sha256 (string->utf8 text)))))
  1339. +     (and (with-http-server
  1340. +            200
  1341. +            text
  1342. +            (build-derivations %store (list drv)))
  1343. +          (with-http-server
  1344. +            200
  1345. +            text
  1346. +            (build-derivations
  1347. +              %store
  1348. +              (list drv)
  1349. +              (build-mode check)))
  1350. +          (string=?
  1351. +            (call-with-input-file
  1352. +              (derivation->output-path drv)
  1353. +              get-string-all)
  1354. +            text))))
  1355. actual-value: #t
  1356. result: PASS
  1357.  
  1358. test-name: derivation-name
  1359. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:303
  1360. source:
  1361. + (test-equal
  1362. +   "derivation-name"
  1363. +   "foo-0.0"
  1364. +   (let ((drv (derivation %store "foo-0.0" %bash '())))
  1365. +     (derivation-name drv)))
  1366. expected-value: "foo-0.0"
  1367. actual-value: "foo-0.0"
  1368. result: PASS
  1369.  
  1370. test-name: derivation-output-names
  1371. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:308
  1372. source:
  1373. + (test-equal
  1374. +   "derivation-output-names"
  1375. +   '(("out") ("bar" "chbouib"))
  1376. +   (let ((drv1 (derivation %store "foo-0.0" %bash '()))
  1377. +         (drv2 (derivation
  1378. +                 %store
  1379. +                 "foo-0.0"
  1380. +                 %bash
  1381. +                 '()
  1382. +                 #:outputs
  1383. +                 '("bar" "chbouib"))))
  1384. +     (list (derivation-output-names drv1)
  1385. +           (derivation-output-names drv2))))
  1386. expected-value: (("out") ("bar" "chbouib"))
  1387. actual-value: (("out") ("bar" "chbouib"))
  1388. result: PASS
  1389.  
  1390. test-name: offloadable-derivation?
  1391. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:316
  1392. source:
  1393. + (test-assert
  1394. +   "offloadable-derivation?"
  1395. +   (and (offloadable-derivation?
  1396. +          (derivation %store "foo" %bash '()))
  1397. +        (offloadable-derivation?
  1398. +          (derivation
  1399. +            %store
  1400. +            "foo"
  1401. +            %bash
  1402. +            '()
  1403. +            #:substitutable?
  1404. +            #f))
  1405. +        (not (offloadable-derivation?
  1406. +               (derivation
  1407. +                 %store
  1408. +                 "foo"
  1409. +                 %bash
  1410. +                 '()
  1411. +                 #:local-build?
  1412. +                 #t)))))
  1413. actual-value: #t
  1414. result: PASS
  1415.  
  1416. test-name: substitutable-derivation?
  1417. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:325
  1418. source:
  1419. + (test-assert
  1420. +   "substitutable-derivation?"
  1421. +   (and (substitutable-derivation?
  1422. +          (derivation %store "foo" %bash '()))
  1423. +        (substitutable-derivation?
  1424. +          (derivation
  1425. +            %store
  1426. +            "foo"
  1427. +            %bash
  1428. +            '()
  1429. +            #:local-build?
  1430. +            #t))
  1431. +        (not (substitutable-derivation?
  1432. +               (derivation
  1433. +                 %store
  1434. +                 "foo"
  1435. +                 %bash
  1436. +                 '()
  1437. +                 #:substitutable?
  1438. +                 #f)))))
  1439. actual-value: #t
  1440. result: PASS
  1441.  
  1442. test-name: fixed-output-derivation?
  1443. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:334
  1444. source:
  1445. + (test-assert
  1446. +   "fixed-output-derivation?"
  1447. +   (let* ((builder
  1448. +            (add-text-to-store
  1449. +              %store
  1450. +              "my-fixed-builder.sh"
  1451. +              "echo -n hello > $out"
  1452. +              '()))
  1453. +          (hash (sha256 (string->utf8 "hello")))
  1454. +          (drv (derivation
  1455. +                 %store
  1456. +                 "fixed"
  1457. +                 %bash
  1458. +                 `(,builder)
  1459. +                 #:inputs
  1460. +                 `((,builder))
  1461. +                 #:hash
  1462. +                 hash
  1463. +                 #:hash-algo
  1464. +                 'sha256)))
  1465. +     (fixed-output-derivation? drv)))
  1466. actual-value: #t
  1467. result: PASS
  1468.  
  1469. test-name: fixed-output derivation
  1470. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:344
  1471. source:
  1472. + (test-assert
  1473. +   "fixed-output derivation"
  1474. +   (let* @ build-started /tmp/guix-tests/store/k4nhzjjfk1acbcpsvm2yhxkj5jvqm59l-fixed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/k4//nhzjjfk1acbcpsvm2yhxkj5jvqm59l-fixed.drv.bz2
  1475. @ build-succeeded /tmp/guix-tests/store/k4nhzjjfk1acbcpsvm2yhxkj5jvqm59l-fixed.drv -
  1476. @ build-started /tmp/guix-tests/store/b85qz6zrg22iilj4wcvja2w69vvzp9hy-fixed-rec.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/b8//5qz6zrg22iilj4wcvja2w69vvzp9hy-fixed-rec.drv.bz2
  1477. @ build-succeeded /tmp/guix-tests/store/b85qz6zrg22iilj4wcvja2w69vvzp9hy-fixed-rec.drv -
  1478. ((builder
  1479. +            (add-text-to-store
  1480. +              %store
  1481. +              "my-fixed-builder.sh"
  1482. +              "echo -n hello > $out"
  1483. +              '()))
  1484. +          (hash (sha256 (string->utf8 "hello")))
  1485. +          (drv (derivation
  1486. +                 %store
  1487. +                 "fixed"
  1488. +                 %bash
  1489. +                 `(,builder)
  1490. +                 #:inputs
  1491. +                 `((,builder))
  1492. +                 #:hash
  1493. +                 hash
  1494. +                 #:hash-algo
  1495. +                 'sha256))
  1496. +          (succeeded?
  1497. +            (build-derivations %store (list drv))))
  1498. +     (and succeeded?
  1499. +          (let ((p (derivation->output-path drv)))
  1500. +            (and (equal?
  1501. +                   (string->utf8 "hello")
  1502. +                   (call-with-input-file p get-bytevector-all))
  1503. +                 (bytevector? (query-path-hash %store p)))))))
  1504. actual-value: #t
  1505. result: PASS
  1506.  
  1507. test-name: fixed-output derivation: output paths are equal
  1508. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:359
  1509. source:
  1510. + (test-assert
  1511. +   "fixed-output derivation: output paths are equal"
  1512. +   (let* ((builder1
  1513. +            (add-text-to-store
  1514. +              %store
  1515. +              "fixed-builder1.sh"
  1516. +              "echo -n hello > $out"
  1517. +              '()))
  1518. +          (builder2
  1519. +            (add-text-to-store
  1520. +              %store
  1521. +              "fixed-builder2.sh"
  1522. +              "echo hey; echo -n hello > $out"
  1523. +              '()))
  1524. +          (hash (sha256 (string->utf8 "hello")))
  1525. +          (drv1 (derivation
  1526. +                  %store
  1527. +                  "fixed"
  1528. +                  %bash
  1529. +                  `(,builder1)
  1530. +                  #:hash
  1531. +                  hash
  1532. +                  #:hash-algo
  1533. +                  'sha256))
  1534. +          (drv2 (derivation
  1535. +                  %store
  1536. +                  "fixed"
  1537. +                  %bash
  1538. +                  `(,builder2)
  1539. +                  #:hash
  1540. +                  hash
  1541. +                  #:hash-algo
  1542. +                  'sha256))
  1543. +          (succeeded?
  1544. +            (build-derivations %store (list drv1 drv2))))
  1545. +     (and succeeded?
  1546. +          (equal?
  1547. +            (derivation->output-path drv1)
  1548. +            (derivation->output-path drv2)))))
  1549. actual-value: #t
  1550. result: PASS
  1551.  
  1552. test-name: fixed-output derivation, recursive
  1553. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:376
  1554. source:
  1555. + (test-assert
  1556. +   "fixed-output derivation, recursive"
  1557. +   (let* ((builder
  1558. +            (add-text-to-store
  1559. +              %store
  1560. +              "my-fixed-builder.sh"
  1561. +              "echo -n hello > $out"
  1562. +              '()))
  1563. +          (hash (sha256 (string->utf8 "hello")))
  1564. +          (drv (derivation
  1565. +                 %store
  1566. +                 "fixed-rec"
  1567. +                 %bash
  1568. +                 `(,builder)
  1569. +                 #:inputs
  1570. +                 `((,builder))
  1571. +                 #:hash
  1572. +                 (base32
  1573. +                   "0sg9f58l1jj88w6pdrfdpj5x9b1zrwszk84j81zvby36q9whhhqa")
  1574. +                 #:hash-algo
  1575. +                 'sha256
  1576. +                 #:recursive?
  1577. +                 #t))
  1578. +          (succeeded?
  1579. +            (build-derivations %store (list drv))))
  1580. +     (and succeeded?
  1581. +          (let ((p (derivation->output-path drv)))
  1582. +            (and (equal?
  1583. +                   (string->utf8 "hello")
  1584. +                   (call-with-input-file p get-bytevector-all))
  1585. +                 (bytevector? (query-path-hash %store p)))))))
  1586. actual-value: #t
  1587. result: PASS
  1588.  
  1589. test-name: derivation with a fixed-output input
  1590. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:393
  1591. source:
  1592. + (test-assert
  1593. +   "derivation with a fixed-output input"
  1594. +   (let* ((builder1
  1595. +            (add-text-to-store
  1596. +              %store
  1597. +              "fixed-builder1.sh"
  1598. +              "echo -n hello > $out"
  1599. +              '()))
  1600. +          (builder2
  1601. +            (add-text-to-store
  1602. +              %store
  1603. +              "fixed-builder2.sh"
  1604. +              "echo hey; echo -n hello > $out"
  1605. +              '()))
  1606. +          (hash (sha256 (string->utf8 "hello")))
  1607. +          (fixed1
  1608. +            (derivation
  1609. + @ build-started /tmp/guix-tests/store/2q3q6qs3wvi5d5v807lgn76ab0q4341v-final.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/2q//3q6qs3wvi5d5v807lgn76ab0q4341v-final.drv.bz2
  1610. /tmp/guix-tests/store/7bdcga4xc915pgzf524xhjk677521whr-fixed
  1611. @ build-succeeded /tmp/guix-tests/store/2q3q6qs3wvi5d5v807lgn76ab0q4341v-final.drv -
  1612. @ build-started /tmp/guix-tests/store/jgsbqbf10dnfyjmyjsphx715znbn8rhv-fixed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/jg//sbqbf10dnfyjmyjsphx715znbn8rhv-fixed.drv.bz2
  1613. @ build-succeeded /tmp/guix-tests/store/jgsbqbf10dnfyjmyjsphx715znbn8rhv-fixed.drv -
  1614. @ build-started /tmp/guix-tests/store/1s96ljyrlllvp5b91s56i5hdy2chhyw2-fixed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/1s//96ljyrlllvp5b91s56i5hdy2chhyw2-fixed.drv.bz2
  1615. @ build-succeeded /tmp/guix-tests/store/1s96ljyrlllvp5b91s56i5hdy2chhyw2-fixed.drv -
  1616.              %store
  1617. +              "fixed"
  1618. +              %bash
  1619. +              `(,builder1)
  1620. +              #:hash
  1621. +              hash
  1622. +              #:hash-algo
  1623. +              'sha256))
  1624. +          (fixed2
  1625. +            (derivation
  1626. +              %store
  1627. +              "fixed"
  1628. +              %bash
  1629. +              `(,builder2)
  1630. +              #:hash
  1631. +              hash
  1632. +              #:hash-algo
  1633. +              'sha256))
  1634. +          (fixed-out (derivation->output-path fixed1))
  1635. +          (builder3
  1636. +            (add-text-to-store
  1637. +              %store
  1638. +              "final-builder.sh"
  1639. +              "echo $in ; (read -u 3 c; echo $c) 3< $in > $out"
  1640. +              '()))
  1641. +          (final1
  1642. +            (derivation
  1643. +              %store
  1644. +              "final"
  1645. +              %bash
  1646. +              `(,builder3)
  1647. +              #:env-vars
  1648. +              `(("in" unquote fixed-out))
  1649. +              #:inputs
  1650. +              `((,%bash) (,builder3) (,fixed1))))
  1651. +          (final2
  1652. +            (derivation
  1653. +              %store
  1654. +              "final"
  1655. +              %bash
  1656. +              `(,builder3)
  1657. +              #:env-vars
  1658. +              `(("in" unquote fixed-out))
  1659. +              #:inputs
  1660. +              `((,%bash) (,builder3) (,fixed2))))
  1661. +          (succeeded?
  1662. +            (build-derivations %store (list final1 final2))))
  1663. +     (and succeeded?
  1664. +          (equal?
  1665. +            (derivation->output-path final1)
  1666. +            (derivation->output-path final2)))))
  1667. actual-value: #t
  1668. result: PASS
  1669.  
  1670. test-name: multiple-output derivation
  1671. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:427
  1672. source:
  1673. + (test-assert
  1674. +   "multiple-output derivation"
  1675. +   (let* ((builder
  1676. +            (add-text-to-store
  1677. +              %store
  1678. +              "my-fixed-builder.sh"
  1679. +              "echo one > $out ; echo two > $second"
  1680. +              '()))
  1681. +          (drv (derivation
  1682. +                 %store
  1683. +                 "fixed"
  1684. +                 %bash
  1685. +                 `(,builder)
  1686. +                 #:env-vars
  1687. +                 '(("HOME" . "/homeless")
  1688. +                   ("zzz" . "Z!")
  1689. +                   ("AAA" . "A!"))
  1690. +                 #:inputs
  1691. +                 `((,%bash) (,builder))
  1692. +                 #:outputs
  1693. +                 '("out" "second")))
  1694. +          (succeeded?
  1695. +            (build-derivations %store (list drv))))
  1696. +     (and succeeded?
  1697. +          (let ((one (derivation->output-path drv "out"))
  1698. +                (two (derivation->output-path drv "second")))
  1699. +            (and (lset= equal?
  1700. +                        (derivation->output-paths drv)
  1701. +                        `(("out" unquote one) ("second" unquote two)))
  1702. +                 (eq? 'one (call-with-input-file one read))
  1703. +                 (eq? 'two (call-with-input-file two read)))))))
  1704. actual-value: #t
  1705. result: PASS
  1706.  
  1707. test-name: multiple-output derivation, non-alphabetic order
  1708. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:448
  1709. source:
  1710. + (test-assert
  1711. +   "multiple-output derivation, non-alphabetic order"
  1712. +   (let* ((builder
  1713. +            (add-text-to-store
  1714. +              %store
  1715. +              "my-fixed-builder.sh"
  1716. +              "echo one > $out ; echo two > $AAA"
  1717. +              '()))
  1718. +          (drv (derivation
  1719. +                 %store
  1720. +                 "fixed"
  1721. +                 %bash
  1722. +                 `(,builder)
  1723. +                 #:inputs
  1724. +                 `((,%bash) (,builder))
  1725. +                 #:outputs
  1726. +                 '("out" "AAA")))
  1727. +          (succeeded?
  1728. +            (build-derivations %store (list drv))))
  1729. +     (and succeeded?
  1730. +          (let ((one (derivation->output-path drv "out"))
  1731. +                (two (derivation->output-path drv "AAA")))
  1732. +            (and (eq? 'one (call-with-input-file one read))
  1733. +                 (eq? 'two (call-with-input-file two read)))))))
  1734. actual-value: #t
  1735. result: PASS
  1736.  
  1737. test-name: read-derivation vs. derivation
  1738. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:465
  1739. source:
  1740. + (test-assert
  1741. +   "read-derivation vs. derivation"
  1742. +   (let* ((sources
  1743. +            (unfold
  1744. +              (cut >= <> 10)
  1745. +              (lambda (n)
  1746. +                (add-text-to-store
  1747. +                  %store
  1748. +                  (format #f "input~a" n)
  1749. +                  (random-text)))
  1750. +              #{1+}#
  1751. +              0))
  1752. +          (inputs
  1753. +            (map (lambda (file)
  1754. +                   (derivation
  1755. +                     %store
  1756. +                     "derivation-input"
  1757. +                     %bash
  1758. +                     '()
  1759. +                     #:inputs
  1760. +                     `((,%bash) (,file))))
  1761. +                 sources))
  1762. +          (builder
  1763. +            (add-text-to-store
  1764. +              %store
  1765. +              "builder.sh"
  1766. +              "echo one > $one ; echo two > $two"
  1767. +              '()))
  1768. +          (drv (derivation
  1769. +                 %store
  1770. +                 "derivation"
  1771. +                 %bash
  1772. +                 `(,builder)
  1773. +                 #:inputs
  1774. +                 `((,%bash)
  1775. +                   (,builder)
  1776. +                   ,@(map list (append sources inputs)))
  1777. +                 #:outputs
  1778. +                 '("two" "one")))
  1779. +          (drv* (call-with-input-file
  1780. +                  (derivation-file-name drv)
  1781. +                  read-derivation)))
  1782. +     (equal? drv* drv)))
  1783. actual-value: #t
  1784. result: PASS
  1785.  
  1786. test-name: multiple-output derivation, derivation-path->output-path
  1787. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:492
  1788. source:
  1789. + (test-assert
  1790. +   "multiple-output derivation, derivation-path->output-path"
  1791. +   (let* ((builder
  1792. +            (add-text-to-store
  1793. +              %store
  1794. +              "builder.sh"
  1795. +              "echo one > $out ; echo two > $second"
  1796. +              '()))
  1797. +          (drv (derivation
  1798. +                 %store
  1799. +                 "multiple"
  1800. +                 %bash
  1801. +                 `(,builder)
  1802. +                 #:outputs
  1803. +                 '("out" "second")))
  1804. +          (drv-file (derivation-file-name drv))
  1805. +          (one (derivation->output-path drv "out"))
  1806. +          (two (derivation->output-path drv "second"))
  1807. +          (first (derivation-path->output-path drv-file "out"))
  1808. +          (second
  1809. +            (derivation-path->output-path drv-file "second")))
  1810. +     (and (not (string=? one two))
  1811. +          (string-suffix? "-second" two)
  1812. +          (string=? first one)
  1813. +          (string=? second two))))
  1814. actual-value: #t
  1815. result: PASS
  1816.  
  1817. test-name: user of multiple-output derivation
  1818. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:509
  1819. source:
  1820. + (test-assert
  1821. +   "user of multiple-output derivation"
  1822. +   (let* ((builder1
  1823. +            (add-text-to-store
  1824. +              %store
  1825. +              "my-mo-builder.sh"
  1826. +              "echo one > $out ; echo two > $two"
  1827. +              '()))
  1828. +          (mdrv (derivation
  1829. +                  %store
  1830. +                  "multiple-output"
  1831. +                  %bash
  1832. +                  `(,builder1)
  1833. +                  #:inputs
  1834. +                  `((,%bash) (,builder1))
  1835. +                  #:outputs
  1836. +                  '("out" "two")))
  1837. +          (builder2
  1838. +            (add-text-to-store
  1839. +              %store
  1840. +              "my-mo-user-builder.sh"
  1841. +              "read x < $one;\n                                         read y < $two;\n                                         echo \"($x $y)\" > $out"
  1842. +              '()))
  1843. +          (udrv (derivation
  1844. +                  %store
  1845. +                  "multiple-output-user"
  1846. +                  %bash
  1847. +                  `(,builder2)
  1848. +                  #:env-vars
  1849. +                  `(("one"
  1850. +                     unquote
  1851. +                     (derivation->output-path mdrv "out"))
  1852. +                    ("two"
  1853. +                     unquote
  1854. +                     (derivation->output-path mdrv "two")))
  1855. +                  #:inputs
  1856. +                  `((,%bash) (,builder2) (,mdrv) (,mdrv "two")))))
  1857. +     (and (build-derivations %store (list (pk 'udrv udrv)))
  1858. +          (let ((p (derivation->output-path udrv)))
  1859. +            (and (valid-path? %store p)
  1860. +                 (equal? '(one two) (call-with-input-file p read)))))))
  1861.  
  1862. ;;; (udrv #<derivation /tmp/guix-tests/store/d1iq16cxzglxwmv478pk9viic0vm0ca2-multiple-output-user.drv => @ build-started /tmp/guix-tests/store/iryf8h5akyy02qd3dd9ps1ka026cyanz-multiple-output.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/ir//yf8h5akyy02qd3dd9ps1ka026cyanz-multiple-output.drv.bz2
  1863. @ build-succeeded /tmp/guix-tests/store/iryf8h5akyy02qd3dd9ps1ka026cyanz-multiple-output.drv -
  1864. @ build-started /tmp/guix-tests/store/d1iq16cxzglxwmv478pk9viic0vm0ca2-multiple-output-user.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/d1//iq16cxzglxwmv478pk9viic0vm0ca2-multiple-output-user.drv.bz2
  1865. @ build-succeeded /tmp/guix-tests/store/d1iq16cxzglxwmv478pk9viic0vm0ca2-multiple-output-user.drv -
  1866. @ build-started /tmp/guix-tests/store/mbi7gj0nlckkz5xchza6rl5vwsnybh73-closure-graphs.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/mb//i7gj0nlckkz5xchza6rl5vwsnybh73-closure-graphs.drv.bz2
  1867. @ build-succeeded /tmp/guix-tests/store/mbi7gj0nlckkz5xchza6rl5vwsnybh73-closure-graphs.drv -
  1868. @ build-started /tmp/guix-tests/store/q4wh93j1i84snrx51al231wnj4g5i99b-allowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/q4//wh93j1i84snrx51al231wnj4g5i99b-allowed.drv.bz2
  1869. @ build-succeeded /tmp/guix-tests/store/q4wh93j1i84snrx51al231wnj4g5i99b-allowed.drv -
  1870. @ build-started /tmp/guix-tests/store/nxjmh1ipl69ak2x01igkqr2m0qg312bs-disallowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/nx//jmh1ipl69ak2x01igkqr2m0qg312bs-disallowed.drv.bz2
  1871. output (`/tmp/guix-tests/store/sjsz32mf9z3nwz33v72l68x0l3m4gdy0-disallowed') is not allowed to refer to path `/tmp/guix-tests/store/bdx3lhq3793i8lz6fvldrp917ba52v1v-foo'
  1872. @ build-failed /tmp/guix-tests/store/nxjmh1ipl69ak2x01igkqr2m0qg312bs-disallowed.drv - 1 output (`/tmp/guix-tests/store/sjsz32mf9z3nwz33v72l68x0l3m4gdy0-disallowed') is not allowed to refer to path `/tmp/guix-tests/store/bdx3lhq3793i8lz6fvldrp917ba52v1v-foo'
  1873. /tmp/guix-tests/store/01sib6yydjyifqm8is82l8q4xr6g84lx-multiple-output-user 1d7c8c0>)
  1874. actual-value: #t
  1875. result: PASS
  1876.  
  1877. test-name: derivation with #:references-graphs
  1878. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:542
  1879. source:
  1880. + (test-assert
  1881. +   "derivation with #:references-graphs"
  1882. +   (let* ((input1
  1883. +            (add-text-to-store
  1884. +              %store
  1885. +              "foo"
  1886. +              "hello"
  1887. +              (list %bash)))
  1888. +          (input2
  1889. +            (add-text-to-store
  1890. +              %store
  1891. +              "bar"
  1892. +              (number->string (random 7777))
  1893. +              (list input1)))
  1894. +          (builder
  1895. +            (add-text-to-store
  1896. +              %store
  1897. +              "build-graph"
  1898. +              (format
  1899. +                #f
  1900. +                "\n~a $out\n (while read l ; do echo $l ; done) < bash > $out/bash\n (while read l ; do echo $l ; done) < input1 > $out/input1\n (while read l ; do echo $l ; done) < input2 > $out/input2"
  1901. +                %mkdir)
  1902. +              (list %mkdir)))
  1903. +          (drv (derivation
  1904. +                 %store
  1905. +                 "closure-graphs"
  1906. +                 %bash
  1907. +                 `(,builder)
  1908. +                 #:references-graphs
  1909. +                 `(("bash" unquote %bash)
  1910. +                   ("input1" unquote input1)
  1911. +                   ("input2" unquote input2))
  1912. +                 #:inputs
  1913. +                 `((,%bash) (,builder))))
  1914. +          (out (derivation->output-path drv)))
  1915. +     (define (deps path . deps)
  1916. +       (let ((count (length deps)))
  1917. +         (string-append
  1918. +           path
  1919. +           "\n\n"
  1920. +           (number->string count)
  1921. +           "\n"
  1922. +           (string-join (sort deps string<?) "\n")
  1923. +           (if (zero? count) "" "\n"))))
  1924. +     (and (build-derivations %store (list drv))
  1925. +          (equal?
  1926. +            (directory-contents out get-string-all)
  1927. +            `(("/bash" unquote (string-append %bash "\n\n0\n"))
  1928. +              ("/input1"
  1929. +               unquote
  1930. +               (if (string>? input1 %bash)
  1931. +                 (string-append (deps %bash) (deps input1 %bash))
  1932. +                 (string-append (deps input1 %bash) (deps %bash))))
  1933. +              ("/input2"
  1934. +               unquote
  1935. +               (string-concatenate
  1936. +                 (map cdr
  1937. +                      (sort (map (lambda (p d) (cons p (apply deps p d)))
  1938. +                                 (list %bash input1 input2)
  1939. +                                 (list '() (list %bash) (list input1)))
  1940. +                            (lambda (x y)
  1941. +                              (match x
  1942. +                                     ((p1 . _)
  1943. +                                      (match y
  1944. +                                             ((p2 . _)
  1945. +                                              (string<? p1 p2)))))))))))))))
  1946. actual-value: #t
  1947. result: PASS
  1948.  
  1949. test-name: derivation #:allowed-references, ok
  1950. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:592
  1951. source:
  1952. + (test-assert
  1953. +   "derivation #:allowed-references, ok"
  1954. +   (let ((drv (derivation
  1955. +                %store
  1956. +                "allowed"
  1957. +                %bash
  1958. +                '("-c" "echo hello > $out")
  1959. +                #:inputs
  1960. +                `((,%bash))
  1961. +                #:allowed-references
  1962. +                '())))
  1963. +     (build-derivations %store (list drv))))
  1964. actual-value: #t
  1965. result: PASS
  1966.  
  1967. test-name: derivation #:allowed-references, not allowed
  1968. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:599
  1969. source:
  1970. + (test-assert
  1971. +   "derivation #:allowed-references, not allowed"
  1972. +   (let* ((txt (add-text-to-store %store "foo" "Hello, world."))
  1973. +          (drv (derivation
  1974. +                 %store
  1975. +                 "disallowed"
  1976. +                 %bash
  1977. +                 `("-c" ,(string-append "echo " txt "> $out"))
  1978. +                 #:inputs
  1979. +                 `((,%bash) (,txt))
  1980. +                 #:allowed-references
  1981. +                 '())))
  1982. +     (guard (c ((nix-protocol-error? c) #t))
  1983. +            (build-derivations %store (list drv))
  1984. +            #f)))
  1985. actual-value: #t
  1986. result: PASS
  1987.  
  1988. test-name: @ build-started /tmp/guix-tests/store/gn8l3dbhnpjd4xnaq16jnigicb2yqv68-allowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/gn//8l3dbhnpjd4xnaq16jnigicb2yqv68-allowed.drv.bz2
  1989. @ build-succeeded /tmp/guix-tests/store/gn8l3dbhnpjd4xnaq16jnigicb2yqv68-allowed.drv -
  1990. @ build-started /tmp/guix-tests/store/wi2xv7yipw4nx5xls95bygbj7dl62ml8-disallowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/wi//2xv7yipw4nx5xls95bygbj7dl62ml8-disallowed.drv.bz2
  1991. output (`/tmp/guix-tests/store/x16606f0yf78viwdwhzcgvqcm8p8m1zf-disallowed') is not allowed to refer to path `/tmp/guix-tests/store/x16606f0yf78viwdwhzcgvqcm8p8m1zf-disallowed'
  1992. @ build-failed /tmp/guix-tests/store/wi2xv7yipw4nx5xls95bygbj7dl62ml8-disallowed.drv - 1 output (`/tmp/guix-tests/store/x16606f0yf78viwdwhzcgvqcm8p8m1zf-disallowed') is not allowed to refer to path `/tmp/guix-tests/store/x16606f0yf78viwdwhzcgvqcm8p8m1zf-disallowed'
  1993. @ build-started /tmp/guix-tests/store/vbnwanpq295lszpzd9x5rw8gyvzdai6f-disallowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/vb//nwanpq295lszpzd9x5rw8gyvzdai6f-disallowed.drv.bz2
  1994. @ build-succeeded /tmp/guix-tests/store/vbnwanpq295lszpzd9x5rw8gyvzdai6f-disallowed.drv -
  1995. @ build-started /tmp/guix-tests/store/cbw7ax1vdz8i453gibbky564xs1iggmr-disdisallowed.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/cb//w7ax1vdz8i453gibbky564xs1iggmr-disdisallowed.drv.bz2
  1996. output (`/tmp/guix-tests/store/lnay1n74vhpqndqwd4r7k439xw98kd2a-disdisallowed') is not allowed to refer to path `/tmp/guix-tests/store/bdx3lhq3793i8lz6fvldrp917ba52v1v-foo'
  1997. @ build-failed /tmp/guix-tests/store/cbw7ax1vdz8i453gibbky564xs1iggmr-disdisallowed.drv - 1 output (`/tmp/guix-tests/store/lnay1n74vhpqndqwd4r7k439xw98kd2a-disdisallowed') is not allowed to refer to path `/tmp/guix-tests/store/bdx3lhq3793i8lz6fvldrp917ba52v1v-foo'
  1998. @ build-started /tmp/guix-tests/store/h9mpwgprl6b5b966ravblk34ffy4qaq0-leaked-env-vars.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/h9//mpwgprl6b5b966ravblk34ffy4qaq0-leaked-env-vars.drv.bz2
  1999. @ build-succeeded /tmp/guix-tests/store/h9mpwgprl6b5b966ravblk34ffy4qaq0-leaked-env-vars.drv -
  2000. derivation #:allowed-references, self allowed
  2001. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:611
  2002. source:
  2003. + (test-assert
  2004. +   "derivation #:allowed-references, self allowed"
  2005. +   (let ((drv (derivation
  2006. +                %store
  2007. +                "allowed"
  2008. +                %bash
  2009. +                '("-c" "echo $out > $out")
  2010. +                #:inputs
  2011. +                `((,%bash))
  2012. +                #:allowed-references
  2013. +                '("out"))))
  2014. +     (build-derivations %store (list drv))))
  2015. actual-value: #t
  2016. result: PASS
  2017.  
  2018. test-name: derivation #:allowed-references, self not allowed
  2019. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:618
  2020. source:
  2021. + (test-assert
  2022. +   "derivation #:allowed-references, self not allowed"
  2023. +   (let ((drv (derivation
  2024. +                %store
  2025. +                "disallowed"
  2026. +                %bash
  2027. +                `("-c" ,"echo $out > $out")
  2028. +                #:inputs
  2029. +                `((,%bash))
  2030. +                #:allowed-references
  2031. +                '())))
  2032. +     (guard (c ((nix-protocol-error? c) #t))
  2033. +            (build-derivations %store (list drv))
  2034. +            #f)))
  2035. actual-value: #t
  2036. result: PASS
  2037.  
  2038. test-name: derivation #:disallowed-references, ok
  2039. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:629
  2040. source:
  2041. + (test-assert
  2042. +   "derivation #:disallowed-references, ok"
  2043. +   (let ((drv (derivation
  2044. +                %store
  2045. +                "disallowed"
  2046. +                %bash
  2047. +                '("-c" "echo hello > $out")
  2048. +                #:inputs
  2049. +                `((,%bash))
  2050. +                #:disallowed-references
  2051. +                '("out"))))
  2052. +     (build-derivations %store (list drv))))
  2053. actual-value: #t
  2054. result: PASS
  2055.  
  2056. test-name: derivation #:disallowed-references, not ok
  2057. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:636
  2058. source:
  2059. + (test-assert
  2060. +   "derivation #:disallowed-references, not ok"
  2061. +   (let* ((txt (add-text-to-store %store "foo" "Hello, world."))
  2062. +          (drv (derivation
  2063. +                 %store
  2064. +                 "disdisallowed"
  2065. +                 %bash
  2066. +                 `("-c" ,(string-append "echo " txt "> $out"))
  2067. +                 #:inputs
  2068. +                 `((,%bash) (,txt))
  2069. +                 #:disallowed-references
  2070. +                 (list txt))))
  2071. +     (guard (c ((nix-protocol-error? c) #t))
  2072. +            (build-derivations %store (list drv))
  2073. +            #f)))
  2074. actual-value: #t
  2075. result: PASS
  2076.  
  2077. test-name: derivation #:leaked-env-vars
  2078. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:651
  2079. source:
  2080. + (test-equal
  2081. +   "derivation #:leaked-env-vars"
  2082. +   (getenv "NIX_STATE_DIR")
  2083. +   (let* ((value (getenv "NIX_STATE_DIR"))
  2084. +          (drv (derivation
  2085. +                 %store
  2086. +                 "leaked-env-vars"
  2087. +                 %bash
  2088. +                 '("-c" "echo -n $NIX_STATE_DIR > $out")
  2089. +                 #:hash
  2090. +                 (sha256 (string->utf8 value))
  2091. +                 #:hash-algo
  2092. +                 'sha256
  2093. +                 #:inputs
  2094. +                 `((,%bash))
  2095. +                 #:leaked-env-vars
  2096. +                 '("NIX_STATE_DIR"))))
  2097. +     (and (build-derivations %store (list drv))
  2098. +          (call-with-input-file
  2099. +            (derivation->output-path drv)
  2100. +            get-string-all))))
  2101. expected-value: "/tmp/guix-tests/var/11678"
  2102. actual-value: "/tmp/guix-tests/var/11678"
  2103. result: PASS
  2104.  
  2105. test-name: build derivation with coreutils
  2106. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:672
  2107. source:
  2108. + (test-assert
  2109. +   "build derivation with coreutils"
  2110. +   (let* ((builder
  2111. +            (add-text-to-store
  2112. +              %store
  2113. +              "build-with-coreutils.sh"
  2114. +              "echo $PATH ; mkdir --version ; mkdir $out ; touch $out/good"
  2115. +              '()))
  2116. +          (drv (derivation
  2117. +                 %store
  2118. +                 "foo"
  2119. +                 %bash
  2120. +                 `(,builder)
  2121. +                 #:env-vars
  2122. +                 `(("PATH"
  2123. +                    unquote
  2124. +                    (string-append
  2125. +                      (derivation->output-path %coreutils)
  2126. + @ build-started /tmp/guix-tests/store/9d7mw11w6hmhnzq7ns8fl91plvyyimpj-a.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/9d//7mw11w6hmhnzq7ns8fl91plvyyimpj-a.drv.bz2
  2127. @ build-succeeded /tmp/guix-tests/store/9d7mw11w6hmhnzq7ns8fl91plvyyimpj-a.drv -
  2128.                      "/bin")))
  2129. +                 #:inputs
  2130. +                 `((,builder) (,%coreutils))))
  2131. +          (succeeded?
  2132. +            (build-derivations %store (list drv))))
  2133. +     (and succeeded?
  2134. +          (let ((p (derivation->output-path drv)))
  2135. +            (and (valid-path? %store p)
  2136. +                 (file-exists? (string-append p "/good")))))))
  2137. result: SKIP
  2138.  
  2139. test-name: build-expression->derivation and invalid module name
  2140. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:695
  2141. source:
  2142. + (test-equal
  2143. +   "build-expression->derivation and invalid module name"
  2144. +   '(file-search-error
  2145. +      "guix/module/that/does/not/exist.scm")
  2146. +   (guard (c ((file-search-error? c)
  2147. +              (list 'file-search-error
  2148. +                    (file-search-error-file-name c))))
  2149. +          (build-expression->derivation
  2150. +            %store
  2151. +            "foo"
  2152. +            #t
  2153. +            #:modules
  2154. +            '((guix module that does not exist)))))
  2155. expected-value: (file-search-error "guix/module/that/does/not/exist.scm")
  2156. actual-value: (file-search-error "guix/module/that/does/not/exist.scm")
  2157. result: PASS
  2158.  
  2159. test-name: build-expression->derivation and builder encoding
  2160. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:704
  2161. source:
  2162. + (test-equal
  2163. +   "build-expression->derivation and builder encoding"
  2164. +   '("UTF-8" #t)
  2165. +   (let* ((exp '(λ (α) (+ α 1)))
  2166. +          (drv (build-expression->derivation %store "foo" exp)))
  2167. +     (match (derivation-builder-arguments drv)
  2168. +            ((... builder)
  2169. +             (with-fluids
  2170. +               ((%default-port-encoding "UTF-8"))
  2171. +               (call-with-input-file
  2172. +                 builder
  2173. +                 (lambda (port)
  2174. +                   (list (port-encoding port)
  2175. +                         (->bool
  2176. +                           (string-contains
  2177. +                             (get-string-all port)
  2178. +                             "(λ (α) (+ α 1))"))))))))))
  2179. expected-value: ("UTF-8" #t)
  2180. actual-value: ("UTF-8" #t)
  2181. result: PASS
  2182.  
  2183. test-name: build-expression->derivation and derivation-prerequisites
  2184. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:718
  2185. source:
  2186. + (test-assert
  2187. +   "build-expression->derivation and derivation-prerequisites"
  2188. +   (let ((drv (build-expression->derivation %store "fail" #f)))
  2189. +     (any (match-lambda
  2190. +            (($ <derivation-input> path)
  2191. +             (string=?
  2192. +               path
  2193. +               (derivation-file-name (%guile-for-build)))))
  2194. +          (derivation-prerequisites drv))))
  2195. actual-value: #t
  2196. result: PASS
  2197.  
  2198. test-name: derivation-prerequisites and valid-derivation-input?
  2199. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:725
  2200. source:
  2201. + (test-assert
  2202. +   "derivation-prerequisites and valid-derivation-input?"
  2203. +   (let* ((a (build-expression->derivation
  2204. +               %store
  2205. +               "a"
  2206. +               '(mkdir %output)))
  2207. +          (b (build-expression->derivation
  2208. +               %store
  2209. +               "b"
  2210. +               `(list ,(random-text))))
  2211. +          (c (build-expression->derivation
  2212. +               %store
  2213. +               "c"
  2214. +               `(mkdir %output)
  2215. +               #:inputs
  2216. +               `(("a" ,a) ("b" ,b)))))
  2217. +     (build-derivations
  2218. +       %store
  2219. +       (list a
  2220. +             (package-derivation %store %bootstrap-guile)))
  2221. +     (match (derivation-prerequisites
  2222. +              c
  2223. +              (cut valid-derivation-input? %store <>))
  2224. +            ((($ <derivation-input> file ("out")))
  2225. +             (string=? file (derivation-file-name b)))
  2226. +            (x (pk 'fail x #f)))))
  2227. actual-value: #t
  2228. result: PASS
  2229.  
  2230. test-name: build-expression->derivation without inputs
  2231. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:743
  2232. source:
  2233. + (test-assert
  2234. +   "build-expression->derivation without inputs"
  2235. +   (let* ((builder
  2236. +            '(begin
  2237. +               (mkdir %output)
  2238. +               (call-with-output-file
  2239. +                 (string-append %output "/test")
  2240. +                 (lambda (p) (display '(hello guix) p)))))
  2241. +          (drv (@ build-started /tmp/guix-tests/store/siz27i7vk0g1xngsx049p9vrvss9c712-goo.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/si//z27i7vk0g1xngsx049p9vrvss9c712-goo.drv.bz2
  2242. @ build-succeeded /tmp/guix-tests/store/siz27i7vk0g1xngsx049p9vrvss9c712-goo.drv -
  2243. substitute: warning: authentication and authorization of substitutes disabled!
  2244. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  2245. @ build-started /tmp/guix-tests/store/qfl2559affw2jnz43j8c6dx0rjngqns3-silent.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/qf//l2559affw2jnz43j8c6dx0rjngqns3-silent.drv.bz2
  2246. building of `/tmp/guix-tests/store/qfl2559affw2jnz43j8c6dx0rjngqns3-silent.drv' timed out after 1 seconds of silence
  2247. @ build-failed /tmp/guix-tests/store/qfl2559affw2jnz43j8c6dx0rjngqns3-silent.drv - timeout
  2248. killing process 11945
  2249. substitute: warning: authentication and authorization of substitutes disabled!
  2250. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  2251. @ build-started /tmp/guix-tests/store/6d3dbcj98inv78d5abwp41fbis15kvy6-slow.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/6d//3dbcj98inv78d5abwp41fbis15kvy6-slow.drv.bz2
  2252. building of `/tmp/guix-tests/store/6d3dbcj98inv78d5abwp41fbis15kvy6-slow.drv' timed out after 1 seconds
  2253. @ build-failed /tmp/guix-tests/store/6d3dbcj98inv78d5abwp41fbis15kvy6-slow.drv - timeout
  2254. killing process 11959
  2255. @ build-started /tmp/guix-tests/store/cbc4v7vanc01h71qnngr0k35kvvvik9v-input.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/cb//c4v7vanc01h71qnngr0k35kvvvik9v-input.drv.bz2
  2256. @ build-succeeded /tmp/guix-tests/store/cbc4v7vanc01h71qnngr0k35kvvvik9v-input.drv -
  2257. @ build-started /tmp/guix-tests/store/5ykgrvz6nsm8rz51hww0wfb7kj83s5x7-something.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/5y//kgrvz6nsm8rz51hww0wfb7kj83s5x7-something.drv.bz2
  2258. @ build-succeeded /tmp/guix-tests/store/5ykgrvz6nsm8rz51hww0wfb7kj83s5x7-something.drv -
  2259. finding garbage collector roots...
  2260. removing stale temporary roots file `/tmp/guix-tests/var/11678/temproots/11696'
  2261. deleting unused links...
  2262. build-expression->derivation
  2263. +                 %store
  2264. +                 "goo"
  2265. +                 builder))
  2266. +          (succeeded?
  2267. +            (build-derivations %store (list drv))))
  2268. +     (and succeeded?
  2269. +          (let ((p (derivation->output-path drv)))
  2270. +            (equal?
  2271. +              '(hello guix)
  2272. +              (call-with-input-file
  2273. +                (string-append p "/test")
  2274. +                read))))))
  2275. actual-value: #t
  2276. result: PASS
  2277.  
  2278. test-name: build-expression->derivation and max-silent-time
  2279. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:756
  2280. source:
  2281. + (test-assert
  2282. +   "build-expression->derivation and max-silent-time"
  2283. +   (let* ((store (let ((s (open-connection)))
  2284. +                   (set-build-options s #:max-silent-time 1)
  2285. +                   s))
  2286. +          (builder '(begin (sleep 100) (mkdir %output) #t))
  2287. +          (drv (build-expression->derivation
  2288. +                 store
  2289. +                 "silent"
  2290. +                 builder))
  2291. +          (out-path (derivation->output-path drv)))
  2292. +     (guard (c ((nix-protocol-error? c)
  2293. +                (and (string-contains
  2294. +                       (nix-protocol-error-message c)
  2295. +                       "failed")
  2296. +                     (not (valid-path? store out-path)))))
  2297. +            (build-derivations store (list drv))
  2298. +            #f)))
  2299. actual-value: #t
  2300. result: PASS
  2301.  
  2302. test-name: build-expression->derivation and timeout
  2303. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:770
  2304. source:
  2305. + (test-assert
  2306. +   "build-expression->derivation and timeout"
  2307. +   (let* ((store (let ((s (open-connection)))
  2308. +                   (set-build-options s #:timeout 1)
  2309. +                   s))
  2310. +          (builder '(begin (sleep 100) (mkdir %output) #t))
  2311. +          (drv (build-expression->derivation
  2312. +                 store
  2313. +                 "slow"
  2314. +                 builder))
  2315. +          (out-path (derivation->output-path drv)))
  2316. +     (guard (c ((nix-protocol-error? c)
  2317. +                (and (string-contains
  2318. +                       (nix-protocol-error-message c)
  2319. +                       "failed")
  2320. +                     (not (valid-path? store out-path)))))
  2321. +            (build-derivations store (list drv))
  2322. +            #f)))
  2323. actual-value: #t
  2324. result: PASS
  2325.  
  2326. test-name: build-expression->derivation and derivation-prerequisites-to-build
  2327. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:784
  2328. source:
  2329. + (test-assert
  2330. +   "build-expression->derivation and derivation-prerequisites-to-build"
  2331. +   (let ((drv (build-expression->derivation %store "fail" #f)))
  2332. +     (null? (derivation-prerequisites-to-build %store drv))))
  2333. actual-value: #t
  2334. result: PASS
  2335.  
  2336. test-name: derivation-prerequisites-to-build when outputs already present
  2337. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:790
  2338. source:
  2339. + (test-assert
  2340. +   "derivation-prerequisites-to-build when outputs already present"
  2341. +   (let* ((builder '(begin (mkdir %output) #t))
  2342. +          (input-drv
  2343. +            (build-expression->derivation
  2344. +              %store
  2345. +              "input"
  2346. +              builder))
  2347. +          (input-path
  2348. +            (derivation-output-path
  2349. +              (assoc-ref (derivation-outputs input-drv) "out")))
  2350. +          (drv (build-expression->derivation
  2351. +                 %store
  2352. +                 "something"
  2353. +                 builder
  2354. +                 #:inputs
  2355. +                 `(("i" ,input-drv))))
  2356. +          (output (derivation->output-path drv)))
  2357. +     (when (valid-path? %store input-path)
  2358. +           (delete-paths %store (list input-path)))
  2359. +     (when (valid-path? %store output)
  2360. +           (delete-paths %store (list output)))
  2361. +     (and (equal?
  2362. +            (map derivation-input-path
  2363. +                 (derivation-prerequisites-to-build %store drv))
  2364. +            (list (derivation-file-name input-drv)))
  2365. +          (build-derivations %store (list drv))
  2366. +          (delete-paths %store (list input-path))
  2367. +          (not (valid-path? %store input-path))
  2368. +          (null? (derivation-prerequisites-to-build %store drv)))))
  2369. actual-value: #t
  2370. result: PASS
  2371.  
  2372. test-name: substitute: warning: authentication and authorization of substitutes disabled!
  2373. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  2374. substitute: warning: authentication and authorization of substitutes disabled!
  2375. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  2376. derivation-prerequisites-to-build and substitutes
  2377. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:819
  2378. source:
  2379. + (test-assert
  2380. +   "derivation-prerequisites-to-build and substitutes"
  2381. +   (let* ((store (open-connection))
  2382. +          (drv (build-expression->derivation
  2383. +                 store
  2384. +                 "prereq-subst"
  2385. +                 (random 1000)))
  2386. +          (output (derivation->output-path drv)))
  2387. +     (set-build-options
  2388. +       store
  2389. +       #:use-substitutes?
  2390. +       #t
  2391. +       #:substitute-urls
  2392. +       (%test-substitute-urls))
  2393. +     (with-derivation-narinfo
  2394. +       drv
  2395. +       (let-values
  2396. +         (((build download)
  2397. +           (derivation-prerequisites-to-build store drv))
  2398. +          ((build* download*)
  2399. +           (derivation-prerequisites-to-build
  2400. +             store
  2401. +             drv
  2402. +             #:substitutable?
  2403. +             (const #f))))
  2404. +         (and (null? build)
  2405. +              (equal? download (list output))
  2406. +              (null? download*)
  2407. +              (null? build*))))))
  2408. actual-value: #t
  2409. result: PASS
  2410.  
  2411. test-name: derivation-prerequisites-to-build and substitutes, non-substitutable build
  2412. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:841
  2413. source:
  2414. + (test-assert
  2415. +   "derivation-prerequisites-to-build and substitutes, non-substitutable build"
  2416. +   (let* ((store (open-connection))
  2417. +          (drv (build-expression->derivation
  2418. +                 store
  2419. +                 "prereq-no-subst"
  2420. +                 (random 1000)
  2421. +                 #:substitutable?
  2422. +                 #f))
  2423. +          (output (derivation->output-path drv)))
  2424. +     (set-build-options
  2425. +       store
  2426. +       #:use-substitutes?
  2427. +       #t
  2428. +       #:substitute-urls
  2429. +       (%test-substitute-urls))
  2430. +     (with-derivation-narinfo
  2431. +       drv
  2432. +       (let-values
  2433. +         (((build download)
  2434. +           (derivation-prerequisites-to-build store drv)))
  2435. +         (and (null? download)
  2436. +              (match build
  2437. +                     (((? derivation-input? input))
  2438. +                      (string=?
  2439. +                        (derivation-input-path input)
  2440. +                        (derivation-file-name drv)))))))))
  2441. actual-value: #t
  2442. result: PASS
  2443.  
  2444. test-name: derivation-prerequisites-to-build and substitutes, local build
  2445. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:863
  2446. source:
  2447. + (test-assert
  2448. +   "derivation-prerequisites-to-build and substitutes, local build"
  2449. +   (with-store
  2450. +     store
  2451. +     (let* ((drv (build-expression->derivation
  2452. +                   store
  2453. +                   "prereq-subst-local"
  2454. +                   (random 1000)
  2455. +                   #:local-build?
  2456. +                   #t))
  2457. +            (output (derivation->output-path drv)))
  2458. +       (set-build-options
  2459. +         store
  2460. +         #:use-substitutes?
  2461. +         #t
  2462. +         #:substitute-urls
  2463. +         (%test-substitute-urls))
  2464. +       (with-derivation-narinfo
  2465. +         drv
  2466. +         (let-values
  2467. +           (((build download)
  2468. +             (derivation-prerequisites-to-build store drv)))
  2469. +           (and (null? build)
  2470. +                (match download
  2471. +                       (((? string? item))
  2472. +                        (string=? item (derivation->output-path drv))))))))))
  2473. actual-value: #t
  2474. result: PASS
  2475.  
  2476. test-name: derivation-prerequisites-to-build in 'check' mode
  2477. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:885
  2478. source:
  2479. + (test-assert
  2480. +   "derivation-prerequisites-to-build in 'check' mode"
  2481. +   (with-store
  2482. +     store
  2483. +     (let* ((dep (build-expression->derivation
  2484. +                   store
  2485. +                   "dep"
  2486. +                   `(begin ,(random-text) (mkdir %output))))
  2487. +            (drv (build-expression->derivation
  2488. +                   store
  2489. +                   "to-check"
  2490. +                   '(mkdir %output)
  2491. +                   #:inputs
  2492. +                   `(("dep" ,dep)))))
  2493. +       (build-derivations store (list drv))
  2494. +       (delete-paths
  2495. +         store
  2496. +         (list (derivation->output-path dep)))
  2497. +       (and (null? (derivation-prerequisites-to-build store drv))
  2498. +            (match (substitute: warning: authentication and authorization of substitutes disabled!
  2499. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  2500. building path(s) `/tmp/guix-tests/store/0qkhy40mh59all8jx9v72ywpjlivjjwj-dep'
  2501. building path(s) `/tmp/guix-tests/store/nak33yc70xvmanh7yy1swx9hv5n119l4-to-check'
  2502. finding garbage collector roots...
  2503. removing stale temporary roots file `/tmp/guix-tests/var/11678/temproots/11989'
  2504. removing stale temporary roots file `/tmp/guix-tests/var/11678/temproots/.fuse_hidden0000f99a0000237f'
  2505. deleting `/tmp/guix-tests/store/0qkhy40mh59all8jx9v72ywpjlivjjwj-dep'
  2506. deleting `/tmp/guix-tests/store/trash'
  2507. deleting unused links...
  2508. note: currently hard linking saves 0.14 MiB
  2509. @ build-started /tmp/guix-tests/store/kvz3csrwpha43pk3mvhwsrzw2yz5qviv-fail.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/kv//z3csrwpha43pk3mvhwsrzw2yz5qviv-fail.drv.bz2
  2510. builder for `/tmp/guix-tests/store/kvz3csrwpha43pk3mvhwsrzw2yz5qviv-fail.drv' failed with exit code 1
  2511. @ build-failed /tmp/guix-tests/store/kvz3csrwpha43pk3mvhwsrzw2yz5qviv-fail.drv - 1 builder for `/tmp/guix-tests/store/kvz3csrwpha43pk3mvhwsrzw2yz5qviv-fail.drv' failed with exit code 1
  2512. @ build-started /tmp/guix-tests/store/v3d6ak4h46illn6yqkid6fsid3i749yy-double.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/v3//d6ak4h46illn6yqkid6fsid3i749yy-double.drv.bz2
  2513. @ build-succeeded /tmp/guix-tests/store/v3d6ak4h46illn6yqkid6fsid3i749yy-double.drv -
  2514. derivation-prerequisites-to-build
  2515. +                     store
  2516. +                     drv
  2517. +                     #:mode
  2518. +                     (build-mode check))
  2519. +                   ((input)
  2520. +                    (string=?
  2521. +                      (derivation-input-path input)
  2522. +                      (derivation-file-name dep))))))))
  2523. actual-value: #t
  2524. result: PASS
  2525.  
  2526. test-name: substitution-oracle and #:substitute? #f
  2527. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:905
  2528. source:
  2529. + (test-assert
  2530. +   "substitution-oracle and #:substitute? #f"
  2531. +   (with-store
  2532. +     store
  2533. +     (let* ((dep (build-expression->derivation
  2534. +                   store
  2535. +                   "dep"
  2536. +                   `(begin ,(random-text) (mkdir %output))))
  2537. +            (drv (build-expression->derivation
  2538. +                   store
  2539. +                   "not-subst"
  2540. +                   `(begin ,(random-text) (mkdir %output))
  2541. +                   #:substitutable?
  2542. +                   #f
  2543. +                   #:inputs
  2544. +                   `(("dep" ,dep))))
  2545. +            (query #f))
  2546. +       (define (record-substitutable-path-query store paths)
  2547. +         (when query (error "already called!" query))
  2548. +         (set! query paths)
  2549. +         '())
  2550. +       (mock ((guix store)
  2551. +              substitutable-paths
  2552. +              record-substitutable-path-query)
  2553. +             (let ((pred (substitution-oracle store (list drv))))
  2554. +               (pred (derivation->output-path drv))))
  2555. +       (equal?
  2556. +         (pk 'query query)
  2557. +         (list (derivation->output-path dep))))))
  2558.  
  2559. ;;; (query ("/tmp/guix-tests/store/93m3pmns6b2f5pmvkmrbcz3wjf8mncpg-dep"))
  2560. actual-value: #t
  2561. result: PASS
  2562.  
  2563. test-name: build-expression->derivation with expression returning #f
  2564. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:934
  2565. source:
  2566. + (test-assert
  2567. +   "build-expression->derivation with expression returning #f"
  2568. +   (let* ((builder '(begin (mkdir %output) #f))
  2569. +          (drv (build-expression->derivation
  2570. +                 %store
  2571. +                 "fail"
  2572. +                 builder))
  2573. +          (out-path (derivation->output-path drv)))
  2574. +     (guard (c ((nix-protocol-error? c)
  2575. +                (and (string-match
  2576. +                       "build .* failed"
  2577. +                       (nix-protocol-error-message c))
  2578. +                     (not (valid-path? %store out-path)))))
  2579. +            (build-derivations %store (list drv))
  2580. +            #f)))
  2581. actual-value: #t
  2582. result: PASS
  2583.  
  2584. test-name: build-expression->derivation with two outputs
  2585. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:949
  2586. source:
  2587. + (test-assert
  2588. +   "build-expression->derivation with two outputs"
  2589. +   (let* ((builder
  2590. +            '(begin
  2591. +               (call-with-output-file
  2592. +                 (assoc-ref %outputs "out")
  2593. +                 (lambda (p) (display '(hello) p)))
  2594. +               (call-with-output-file
  2595. +                 (assoc-ref %outputs "second")
  2596. +                 (lambda (p) (display '(world) p)))))
  2597. +          (drv (build-expression->derivation
  2598. +                 %store
  2599. +                 "double"
  2600. +                 builder
  2601. +                 #:outputs
  2602. +                 '("out" "second")))
  2603. +          (succeeded?
  2604. +            (build-derivations %store (list drv))))
  2605. +     (and succeeded?
  2606. +          (let ((one (derivation->output-path drv))
  2607. +                (two (derivation->output-path drv "second")))
  2608. +            (and (equal? '(hello) (call-with-input-file one read))
  2609. +                 (equal? '(world) (call-with-input-file two read)))))))
  2610. actual-value: #t
  2611. result: PASS
  2612.  
  2613. test-name: build-expression->derivation with one input
  2614. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:968
  2615. source:
  2616. + (test-assert
  2617. +   "build-expression->derivation with one input"
  2618. +   (let* ((builder
  2619. +            '(call-with-output-file
  2620. +               %output
  2621. +               (lambda (p)
  2622. +                 (let ((cu (assoc-ref %build-inputs "cu")))
  2623. +                   (close 1)
  2624. +                   (dup2 (port->fdes p) 1)
  2625. +                   (execl (string-append cu "/bin/uname")
  2626. +                 @ build-started /tmp/guix-tests/store/vs63w833h9dn987d6j80x9nggmjhjj6n-module-import.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/vs//63w833h9dn987d6j80x9nggmjhjj6n-module-import.drv.bz2
  2627. @ build-succeeded /tmp/guix-tests/store/vs63w833h9dn987d6j80x9nggmjhjj6n-module-import.drv -
  2628. @ build-started /tmp/guix-tests/store/9xp57zkgn9n85i77xd2975k2lh6hlxrl-module-import-compiled.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/9x//p57zkgn9n85i77xd2975k2lh6hlxrl-module-import-compiled.drv.bz2
  2629. @ build-succeeded /tmp/guix-tests/store/9xp57zkgn9n85i77xd2975k2lh6hlxrl-module-import-compiled.drv -
  2630. @ build-started /tmp/guix-tests/store/yz1m0dxzg68vryd8yra1fiaxlni4ppfp-test-with-modules.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/yz//1m0dxzg68vryd8yra1fiaxlni4ppfp-test-with-modules.drv.bz2
  2631. @ build-succeeded /tmp/guix-tests/store/yz1m0dxzg68vryd8yra1fiaxlni4ppfp-test-with-modules.drv -
  2632.          "uname"
  2633. +                          "-a")))))
  2634. +          (drv (build-expression->derivation
  2635. +                 %store
  2636. +                 "uname"
  2637. +                 builder
  2638. +                 #:inputs
  2639. +                 `(("cu" ,%coreutils))))
  2640. +          (succeeded?
  2641. +            (build-derivations %store (list drv))))
  2642. +     (and succeeded?
  2643. +          (let ((p (derivation->output-path drv)))
  2644. +            (string-contains
  2645. +              (call-with-input-file p read-line)
  2646. +              "GNU")))))
  2647. result: SKIP
  2648.  
  2649. test-name: build-expression->derivation with modules
  2650. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:984
  2651. source:
  2652. + (test-assert
  2653. +   "build-expression->derivation with modules"
  2654. +   (let* ((builder
  2655. +            `(begin
  2656. +               (use-modules (guix build utils))
  2657. +               (let ((out (assoc-ref %outputs "out")))
  2658. +                 (mkdir-p (string-append out "/guile/guix/nix"))
  2659. +                 #t)))
  2660. +          (drv (build-expression->derivation
  2661. +                 %store
  2662. +                 "test-with-modules"
  2663. +                 builder
  2664. +                 #:modules
  2665. +                 '((guix build utils)))))
  2666. +     (and (build-derivations %store (list drv))
  2667. +          (let* ((p (derivation->output-path drv))
  2668. +                 (s (stat (string-append p "/guile/guix/nix"))))
  2669. +            (eq? (stat:type s) 'directory)))))
  2670. actual-value: #t
  2671. result: PASS
  2672.  
  2673. test-name: build-expression->derivation: same fixed-output path
  2674. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:999
  2675. source:
  2676. + (test-assert
  2677. +   "build-expression->derivation: same fixed-output path"
  2678. +   (let* ((builder1
  2679. +            '(call-with-output-file
  2680. +               %output
  2681. +               (lambda (p) (write "hello" p))))
  2682. +          (builder2
  2683. +            '(call-with-output-file
  2684. +               (pk 'difference-here! %output)
  2685. +               (lambda (p) (write "hello" p))))
  2686. +          (hash (sha256 (string->utf8 "hello")))
  2687. +          (input1
  2688. +            (build-expression->derivation
  2689. +              %store
  2690. +              "fixed"
  2691. +              builder1
  2692. +              #:hash
  2693. +              hash
  2694. +              #:hash-algo
  2695. +              'sha256))
  2696. +          (input2
  2697. +            (build-expression->derivation
  2698. +              %store
  2699. +              "fixed"
  2700. +              builder2
  2701. +              #:hash
  2702. +              hash
  2703. +              #:hash-algo
  2704. +              'sha256))
  2705. +          (succeeded?
  2706. +            (build-derivations %store (list input1 input2))))
  2707. +     (and succeeded?
  2708. +          (not (string=?
  2709. +                 (derivation-file-name input1)
  2710. +                 (derivation-file-name input2)))
  2711. +          (string=?
  2712. +            (derivation->output-path input1)
  2713. +            (derivation->output-path input2)))))
  2714. actual-value: #t
  2715. result: PASS
  2716.  
  2717. test-name: build-expression->derivation with a fixed-output input
  2718. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1020
  2719. source:
  2720. + (test-assert
  2721. +   "build-expression->derivation with a fixed-output input"
  2722. +   (let* ((builder1
  2723. +            '(call-with-output-file
  2724. +               %output
  2725. +               (lambda (p) (write "hello" p))))
  2726. +          (builder2
  2727. +            '(call-with-output-file
  2728. +               (pk 'difference-here! %output)
  2729. +               (lambda (p) (write "hello" p))))
  2730. +          (hash (sha256 (string->utf8 "hello")))
  2731. +          (input1
  2732. +            (build-expression->derivation
  2733. +              %store
  2734. +              "fixed"
  2735. +              builder1
  2736. +              #:hash
  2737. +              hash
  2738. +              #:hash-algo
  2739. +              'sha256))
  2740. +          (input2
  2741. +            (build-expression->derivation
  2742. +              %store
  2743. +              "fixed"
  2744. +              builder2
  2745. +              #:hash
  2746. +              hash
  2747. +              #:hash-algo
  2748. +              'sha256))
  2749. +          (builder3
  2750. +            '(let ((input (assoc-ref %build-inputs "input")))
  2751. +               (call-with-output-file
  2752. +                 %output
  2753. +                 (lambda (out)
  2754. +                   (format #f "My input is ~a.~%" input)))))
  2755. +          (final1
  2756. +            (@ build-started /tmp/guix-tests/store/8dkhnfprkjn6p5hh6abjbvhcypif1djn-final.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/8d//khnfprkjn6p5hh6abjbvhcypif1djn-final.drv.bz2
  2757. @ build-succeeded /tmp/guix-tests/store/8dkhnfprkjn6p5hh6abjbvhcypif1djn-final.drv -
  2758. @ build-started /tmp/guix-tests/store/q9ml6iwz4b8jffgd6l3jkllm0lm9g7aw-fixed-rec.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/q9//ml6iwz4b8jffgd6l3jkllm0lm9g7aw-fixed-rec.drv.bz2
  2759. @ build-succeeded /tmp/guix-tests/store/q9ml6iwz4b8jffgd6l3jkllm0lm9g7aw-fixed-rec.drv -
  2760. @ build-started /tmp/guix-tests/store/9a2z4zz7sraa065z4fa12g9sg6mlhkj5-small-fixed-rec.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/9a//2z4zz7sraa065z4fa12g9sg6mlhkj5-small-fixed-rec.drv.bz2
  2761. @ build-succeeded /tmp/guix-tests/store/9a2z4zz7sraa065z4fa12g9sg6mlhkj5-small-fixed-rec.drv -
  2762. @ build-started /tmp/guix-tests/store/aakag457jih22azd1mkhcvnlnv9115ky-fixed-rec-user.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/aa//kag457jih22azd1mkhcvnlnv9115ky-fixed-rec-user.drv.bz2
  2763. @ build-succeeded /tmp/guix-tests/store/aakag457jih22azd1mkhcvnlnv9115ky-fixed-rec-user.drv -
  2764. build-expression->derivation
  2765. +              %store
  2766. +              "final"
  2767. +              builder3
  2768. +              #:inputs
  2769. +              `(("input" ,input1))))
  2770. +          (final2
  2771. +            (build-expression->derivation
  2772. +              %store
  2773. +              "final"
  2774. +              builder3
  2775. +              #:inputs
  2776. +              `(("input" ,input2)))))
  2777. +     (and (string=?
  2778. +            (derivation->output-path final1)
  2779. +            (derivation->output-path final2))
  2780. +          (string=?
  2781. +            (derivation->output-path final1)
  2782. +            (derivation-path->output-path
  2783. +              (derivation-file-name final1)))
  2784. +          (build-derivations %store (list final1 final2)))))
  2785. actual-value: #t
  2786. result: PASS
  2787.  
  2788. test-name: build-expression->derivation produces recursive fixed-output
  2789. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1051
  2790. source:
  2791. + (test-assert
  2792. +   "build-expression->derivation produces recursive fixed-output"
  2793. +   (let* ((builder
  2794. +            '(begin
  2795. +               (use-modules (srfi srfi-26))
  2796. +               (mkdir %output)
  2797. +               (chdir %output)
  2798. +               (call-with-output-file
  2799. +                 "exe"
  2800. +                 (cut display "executable" <>))
  2801. +               (chmod "exe" 511)
  2802. +               (symlink "exe" "symlink")
  2803. +               (mkdir "subdir")))
  2804. +          (drv (build-expression->derivation
  2805. +                 %store
  2806. +                 "fixed-rec"
  2807. +                 builder
  2808. +                 #:hash-algo
  2809. +                 'sha256
  2810. +                 #:hash
  2811. +                 (base32
  2812. +                   "10k1lw41wyrjf9mxydi0is5nkpynlsvgslinics4ppir13g7d74p")
  2813. +                 #:recursive?
  2814. +                 #t)))
  2815. +     (and (build-derivations %store (list drv))
  2816. +          (let* ((dir (derivation->output-path drv))
  2817. +                 (exe (string-append dir "/exe"))
  2818. +                 (link (string-append dir "/symlink"))
  2819. +                 (subdir (string-append dir "/subdir")))
  2820. +            (and (executable-file? exe)
  2821. +                 (string=?
  2822. +                   "executable"
  2823. +                   (call-with-input-file exe get-string-all))
  2824. +                 (string=? "exe" (readlink link))
  2825. +                 (file-is-directory? subdir))))))
  2826. actual-value: #t
  2827. result: PASS
  2828.  
  2829. test-name: build-expression->derivation uses recursive fixed-output
  2830. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1077
  2831. source:
  2832. + (test-assert
  2833. +   "build-expression->derivation uses recursive fixed-output"
  2834. +   (let* ((builder
  2835. +            '(call-with-output-file
  2836. +               %output
  2837. +               (lambda (port) (display "hello" port))))
  2838. +          (fixed (build-expression->derivation
  2839. +                   %store
  2840. +                   "small-fixed-rec"
  2841. +                   builder
  2842. +                   #:hash-algo
  2843. +                   'sha256
  2844. +                   #:hash
  2845. +                   (base32
  2846. +                     "0sg9f58l1jj88w6pdrfdpj5x9b1zrwszk84j81zvby36q9whhhqa")
  2847. +                   #:recursive?
  2848. +                   #t))
  2849. +          (in (derivation->output-path fixed))
  2850. +          (builder
  2851. +            `(begin
  2852. +               (mkdir %output)
  2853. +               (chdir %output)
  2854. +               (symlink ,in "symlink")))
  2855. +          (drv (build-expression->derivation
  2856. +                 %store
  2857. +                 "fixed-rec-user"
  2858. +                 builder
  2859. +                 #:inputs
  2860. +                 `(("fixed" ,fixed)))))
  2861. +     (and (build-derivations %store (list drv))
  2862. +          (let ((out (derivation->output-path drv)))
  2863. +            (string=?
  2864. +              (readlink (string-append out "/symlink"))
  2865. +              in)))))
  2866. actual-value: #t
  2867. result: PASS
  2868.  
  2869. test-name: build-expression->derivation with #:references-graphs
  2870. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1099
  2871. source:
  2872. + (test-assert
  2873. +   "build-expression->derivation with #:references-graphs"
  2874. +   (let* ((input (add-text-to-store
  2875. +                   %store
  2876. +                   "foo"
  2877. +                   "hello"
  2878. +                   (list %bash %mkdir)))
  2879. +          (builder '(copy-file "input" %output))
  2880. + @ build-started /tmp/guix-tests/store/33xr95dfil5qna3dxlzlzyvrlw9nycn0-references-graphs.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/33//xr95dfil5qna3dxlzlzyvrlw9nycn0-references-graphs.drv.bz2
  2881. @ build-succeeded /tmp/guix-tests/store/33xr95dfil5qna3dxlzlzyvrlw9nycn0-references-graphs.drv -
  2882. @ build-started /tmp/guix-tests/store/ajqc0l1rbgd83hdid7ain2wr0wiwvvh4-original-drv2.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/aj//qc0l1rbgd83hdid7ain2wr0wiwvvh4-original-drv2.drv.bz2
  2883. @ build-succeeded /tmp/guix-tests/store/ajqc0l1rbgd83hdid7ain2wr0wiwvvh4-original-drv2.drv -
  2884. @ build-started /tmp/guix-tests/store/vks5g20fjlmi5daip35rrd34869fnql9-drv-to-remap.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/vk//s5g20fjlmi5daip35rrd34869fnql9-drv-to-remap.drv.bz2
  2885. @ build-succeeded /tmp/guix-tests/store/vks5g20fjlmi5daip35rrd34869fnql9-drv-to-remap.drv -
  2886.          (drv (build-expression->derivation
  2887. +                 %store
  2888. +                 "references-graphs"
  2889. +                 builder
  2890. +                 #:references-graphs
  2891. +                 `(("input" unquote input))))
  2892. +          (out (derivation->output-path drv)))
  2893. +     (define (deps path . deps)
  2894. +       (let ((count (length deps)))
  2895. +         (string-append
  2896. +           path
  2897. +           "\n\n"
  2898. +           (number->string count)
  2899. +           "\n"
  2900. +           (string-join (sort deps string<?) "\n")
  2901. +           (if (zero? count) "" "\n"))))
  2902. +     (and (build-derivations %store (list drv))
  2903. +          (equal?
  2904. +            (call-with-input-file out get-string-all)
  2905. +            (string-concatenate
  2906. +              (map cdr
  2907. +                   (sort (map (lambda (p d) (cons p (apply deps p d)))
  2908. +                              (list input %bash %mkdir)
  2909. +                              (list (list %bash %mkdir) '() '()))
  2910. +                         (lambda (x y)
  2911. +                           (match x
  2912. +                                  ((p1 . _)
  2913. +                                   (match y
  2914. +                                          ((p2 . _)
  2915. +                                           (string<? p1 p2)))))))))))))
  2916. actual-value: #t
  2917. result: PASS
  2918.  
  2919. test-name: map-derivation
  2920. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1130
  2921. source:
  2922. + (test-equal
  2923. +   "map-derivation"
  2924. +   "hello"
  2925. +   (let* ((joke (package-derivation %store guile-1.8))
  2926. +          (good (package-derivation %store %bootstrap-guile))
  2927. +          (drv1 (build-expression->derivation
  2928. +                  %store
  2929. +                  "original-drv1"
  2930. +                  #f
  2931. +                  #:guile-for-build
  2932. +                  joke))
  2933. +          (drv2 (build-expression->derivation
  2934. +                  %store
  2935. +                  "original-drv2"
  2936. +                  '(call-with-output-file
  2937. +                     %output
  2938. +                     (lambda (p) (display "hello" p)))))
  2939. +          (drv3 (build-expression->derivation
  2940. +                  %store
  2941. +                  "drv-to-remap"
  2942. +                  '(let ((in (assoc-ref %build-inputs "in")))
  2943. +                     (copy-file in %output))
  2944. +                  #:inputs
  2945. +                  `(("in" ,drv1))
  2946. +                  #:guile-for-build
  2947. +                  joke))
  2948. +          (drv4 (map-derivation
  2949. +                  %store
  2950. +                  drv3
  2951. +                  `((,drv1 unquote drv2) (,joke unquote good))))
  2952. +          (out (derivation->output-path drv4)))
  2953. +     (and (build-derivations
  2954. +            %store
  2955. +            (list (pk 'remapped drv4)))
  2956. +          (call-with-input-file out get-string-all))))
  2957.  
  2958. ;;; (remapped #<derivation /tmp/guix-tests/store/vks5g20fjlmi5daip35rrd34869fnql9-drv-to-remap.drv => /tmp/guix-tests/store/f8prvykpaplzl0gw9qykipviq3vil9ws-drv-to-remap 223ff00>)
  2959. expected-value: "hello"
  2960. actual-value: "hello"
  2961. result: PASS
  2962.  
  2963. test-name: map-derivation, sources
  2964. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/derivations.scm:1153
  2965. source:
  2966. + (test-equal
  2967. +   "map-derivation, sources"
  2968. +   "hello"
  2969. +   (let* ((script1
  2970. +            (add-text-to-store %store "fail.sh" "exit 1"))
  2971. +          (script2
  2972. +            (add-text-to-store
  2973. +              %store
  2974. +              "hi.sh"
  2975. +              "echo -n hello > $out"))
  2976. +          (bash-full
  2977. +            (package-derivation
  2978. +              %store
  2979. +              (@ (gnu packages bash) bash)))
  2980. +          (drv1 (derivation
  2981. +                  %store
  2982. +                  "drv-to-remap"
  2983. +                  (derivation->output-path bash-full)
  2984. +                  `("-e" ,script1)
  2985. +                  #:inputs
  2986. +                  `((,bash-full) (,script1))))
  2987. +          (drv2 (map-derivation
  2988. +                  %store
  2989. +                  drv1
  2990. +                  `((,bash-full unquote %bash)
  2991. +                    (,script1 unquote script2))))
  2992. +          (out (derivation->output-path drv2)))
  2993. +     (and (build-derivations
  2994. +            %store
  2995. +            (list (pk 'remapped* drv2)))
  2996. +          (call-with-input-file out get-string-all))))
  2997.  
  2998. ;;; (remapped* #<derivation @ build-started /tmp/guix-tests/store/3b1r9qvgpcami02g66iqgnbfm3xxsx95-drv-to-remap.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/3b//1r9qvgpcami02g66iqgnbfm3xxsx95-drv-to-remap.drv.bz2
  2999. @ build-succeeded /tmp/guix-tests/store/3b1r9qvgpcami02g66iqgnbfm3xxsx95-drv-to-remap.drv -
  3000. /tmp/guix-tests/store/3b1r9qvgpcami02g66iqgnbfm3xxsx95-drv-to-remap.drv => /tmp/guix-tests/store/d16rf6zch2w23cn1v1gm8r3w12pc7y2m-drv-to-remap 23b6190>)
  3001. expected-value: "hello"
  3002. actual-value: "hello"
  3003. result: PASS
  3004.  
  3005.  
  3006. SKIP: tests/packages
  3007. ====================
  3008.  
  3009. test-name: printer with location
  3010. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:69
  3011. source:
  3012. + (test-assert
  3013. +   "printer with location"
  3014. +   (string-match
  3015. +     "^#<package foo@0 foo.scm:42 [[:xdigit:]]+>$"
  3016. +     (with-output-to-string
  3017. +       (lambda ()
  3018. +         (write (dummy-package
  3019. +                  "foo"
  3020. +                  (location (make-location "foo.scm" 42 7))))))))
  3021. actual-value: #("#<package foo@0 foo.scm:42 1938000>" (0 . 35))
  3022. result: PASS
  3023.  
  3024. test-name: printer without location
  3025. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:77
  3026. source:
  3027. + (test-assert
  3028. +   "printer without location"
  3029. +   (string-match
  3030. +     "^#<package foo@0 [[:xdigit:]]+>$"
  3031. +     (with-output-to-string
  3032. +       (lambda ()
  3033. +         (write (dummy-package "foo" (location #f)))))))
  3034. actual-value: #("#<package foo@0 1a2ce40>" (0 . 24))
  3035. result: PASS
  3036.  
  3037. test-name: hidden-package
  3038. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:84
  3039. source:
  3040. + (test-assert
  3041. +   "hidden-package"
  3042. +   (and (hidden-package?
  3043. +          (hidden-package (dummy-package "foo")))
  3044. +        (not (hidden-package? (dummy-package "foo")))))
  3045. actual-value: #t
  3046. result: PASS
  3047.  
  3048. test-name: package-superseded
  3049. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:88
  3050. source:
  3051. + (test-assert
  3052. +   "package-superseded"
  3053. +   (let* ((new (dummy-package "bar"))
  3054. +          (old (deprecated-package "foo" new)))
  3055. +     (and (eq? (package-superseded old) new)
  3056. +          (mock ((gnu packages)
  3057. +                 find-best-packages-by-name
  3058. +                 (const (list old)))
  3059. +                (specification->package "foo")
  3060. +                (and (eq? new (specification->package "foo"))
  3061. +                     (eq? new (specification->package+output "foo")))))))
  3062. actual-value: #t
  3063. result: PASS
  3064.  
  3065. test-name: transaction-upgrade-entry, zero upgrades
  3066. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:97
  3067. source:
  3068. + (test-assert
  3069. +   "transaction-upgrade-entry, zero upgrades"
  3070. +   (let* ((old (dummy-package "foo" (version "1")))
  3071. +          (tx (mock ((gnu packages)
  3072. +                     find-newest-available-packages
  3073. +                     (const vlist-null))
  3074. +                    ((@@ (guix scripts package)
  3075. +                         transaction-upgrade-entry)
  3076. +                     (manifest-entry
  3077. +                       (inherit (package->manifest-entry old))
  3078. +                       (item (string-append
  3079. +                               (%store-prefix)
  3080. +                               "/"
  3081. +                               (make-string 32 #\e)
  3082. +                               "-foo-1")))
  3083. +                     (manifest-transaction)))))
  3084. +     (manifest-transaction-null? tx)))
  3085. actual-value: #t
  3086. result: PASS
  3087.  
  3088. test-name: transaction-upgrade-entry, one upgrade
  3089. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:109
  3090. source:
  3091. + (test-assert
  3092. +   "transaction-upgrade-entry, one upgrade"
  3093. +   (let* ((old (dummy-package "foo" (version "1")))
  3094. +          (new (dummy-package "foo" (version "2")))
  3095. +          (tx (mock ((gnu packages)
  3096. +                     find-newest-available-packages
  3097. +                     (const (vhash-cons "foo" (list "2" new) vlist-null)))
  3098. +                    ((@@ (guix scripts package)
  3099. +                         transaction-upgrade-entry)
  3100. +                     (manifest-entry
  3101. +                       (inherit (package->manifest-entry old))
  3102. +                       (item (string-append
  3103. +                               (%store-prefix)
  3104. +                               "/"
  3105. +                               (make-string 32 #\e)
  3106. +                               "-foo-1")))
  3107. +                     (manifest-transaction)))))
  3108. +     (and (match (manifest-transaction-install tx)
  3109. +                 ((($ <manifest-entry> "foo" "2" "out" item))
  3110. +                  (eq? item new)))
  3111. +          (null? (manifest-transaction-remove tx)))))
  3112. actual-value: #t
  3113. result: PASS
  3114.  
  3115. test-name: transaction-upgrade-entry, superseded package
  3116. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:125
  3117. source:
  3118. + (test-assert
  3119. +   "transaction-upgrade-entry, superseded package"
  3120. +   (let* ((old (dummy-package "foo" (version "1")))
  3121. +          (new (dummy-package "bar" (version "2")))
  3122. +          (dep (deprecated-package "foo" new))
  3123. +          (tx (mock ((gnu packages)
  3124. +                     find-newest-available-packages
  3125. +                     (const (vhash-cons "foo" (list "2" dep) vlist-null)))
  3126. +                    ((@@ (guix scripts package)
  3127. +                         transaction-upgrade-entry)
  3128. +                     (manifest-entry
  3129. +                       (inherit (package->manifest-entry old))
  3130. +                       (item (string-append
  3131. +                               (%store-prefix)
  3132. +                               "/"
  3133. +                               (make-string 32 #\e)
  3134. +                               "-foo-1")))
  3135. +                     (manifest-transaction)))))
  3136. +     (and (match (manifest-transaction-install tx)
  3137. +                 ((($ <manifest-entry> "bar" "2" "out" item))
  3138. +                  (eq? item new)))
  3139. +          (match (manifest-transaction-remove tx)
  3140. +                 (((? manifest-pattern? pattern))
  3141. +                  (and (string=? (manifest-pattern-name pattern) "foo")
  3142. +                       (string=? (manifest-pattern-version pattern) "1")
  3143. +                       (string=?
  3144. +                         (manifest-pattern-output pattern)
  3145. +                         "out")))))))
  3146. actual-value: #t
  3147. result: PASS
  3148.  
  3149. test-name: package-field-location
  3150. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:146
  3151. source:
  3152. + (test-assert
  3153. +   "package-field-location"
  3154. +   (let ()
  3155. +     (define (goto port line column)
  3156. +       (unless
  3157. +         (and (= (port-column port) (- column 1))
  3158. +              (= (port-line port) (- line 1)))
  3159. +         (unless
  3160. +           (eof-object? (get-char port))
  3161. +           (goto port line column))))
  3162. +     (define read-at
  3163. +       (match-lambda
  3164. +         (($ <location> file line column)
  3165. +          (call-with-input-file
  3166. +            (search-path %load-path file)
  3167. +            (lambda (port)
  3168. +              (goto port line column)
  3169. +              (read port))))))
  3170. +     (and (member
  3171. +            (read-at
  3172. +              (package-field-location %bootstrap-guile 'name))
  3173. +            (let ((name (package-name %bootstrap-guile)))
  3174. +              (list name `(name ,name))))
  3175. +          (member
  3176. +            (read-at
  3177. +              (package-field-location
  3178. +                %bootstrap-guile
  3179. +                'version))
  3180. +            (let ((version (package-version %bootstrap-guile)))
  3181. +              (list version `(version ,version))))
  3182. +          (not (package-field-location
  3183. +                 %bootstrap-guile
  3184. +                 'does-not-exist)))))
  3185. actual-value: #t
  3186. result: PASS
  3187.  
  3188. test-name: package-field-location, relative file name
  3189. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:173
  3190. source:
  3191. + (test-equal
  3192. +   "package-field-location, relative file name"
  3193. +   (location-file
  3194. +     (package-location %bootstrap-guile))
  3195. +   (with-fluids
  3196. +     ((%file-port-name-canonicalization 'absolute))
  3197. +     (location-file
  3198. +       (package-field-location
  3199. +         %bootstrap-guile
  3200. +         'version))))
  3201. expected-value: "gnu/packages/bootstrap.scm"
  3202. actual-value: "gnu/packages/bootstrap.scm"
  3203. result: PASS
  3204.  
  3205. test-name: package-transitive-inputs
  3206. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:178
  3207. source:
  3208. + (test-assert
  3209. +   "package-transitive-inputs"
  3210. +   (let* ((a (dummy-package "a"))
  3211. +          (b (dummy-package
  3212. +               "b"
  3213. +               (propagated-inputs `(("a" ,a)))))
  3214. +          (c (dummy-package "c" (inputs `(("a" ,a)))))
  3215. +          (d (dummy-package
  3216. +               "d"
  3217. +               (propagated-inputs `(("x" "something.drv")))))
  3218. +          (e (dummy-package
  3219. +               "e"
  3220. +               (inputs `(("b" ,b) ("c" ,c) ("d" ,d))))))
  3221. +     (and (null? (package-transitive-inputs a))
  3222. +          (equal?
  3223. +            `(("a" ,a))
  3224. +            (package-transitive-inputs b))
  3225. +          (equal?
  3226. +            `(("a" ,a))
  3227. +            (package-transitive-inputs c))
  3228. +          (equal?
  3229. +            (package-propagated-inputs d)
  3230. +            (package-transitive-inputs d))
  3231. +          (equal?
  3232. +            `(("b" ,b)
  3233. +              ("c" ,c)
  3234. +              ("d" ,d)
  3235. +              ("a" ,a)
  3236. +              ("x" "something.drv"))
  3237. +            (pk 'x (package-transitive-inputs e))))))
  3238.  
  3239. ;;; (x (("b" #<package b@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:180 10eaa80>) ("c" #<package c@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:182 10ea900>) ("d" #<package d@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:184 10ea780>) ("a" #<package a@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:179 10eac00>) ("x" "something.drv")))
  3240. actual-value: #t
  3241. result: PASS
  3242.  
  3243. test-name: package-transitive-inputs, no duplicates
  3244. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:197
  3245. source:
  3246. + (test-assert
  3247. +   "package-transitive-inputs, no duplicates"
  3248. +   (let* ((a (dummy-package "a"))
  3249. +          (b (dummy-package
  3250. +               "b"
  3251. +               (inputs `(("a+" ,a)))
  3252. +               (native-inputs `(("a*" ,a)))
  3253. +               (propagated-inputs `(("a" ,a)))))
  3254. +          (c (dummy-package
  3255. +               "c"
  3256. +               (propagated-inputs `(("b" ,b)))))
  3257. +          (d (dummy-package "d" (inputs `(("a" ,a) ("c" ,c)))))
  3258. +          (e (dummy-package "e" (inputs `(("b" ,b) ("c" ,c))))))
  3259. +     (and (null? (package-transitive-inputs a))
  3260. +          (equal?
  3261. +            `(("a*" ,a) ("a+" ,a) ("a" ,a))
  3262. +            (package-transitive-inputs b))
  3263. +          (equal?
  3264. +            `(("b" ,b) ("a" ,a))
  3265. +            (package-transitive-inputs c))
  3266. +          (equal?
  3267. +            `(("a" ,a) ("c" ,c) ("b" ,b))
  3268. +            (package-transitive-inputs d))
  3269. +          (equal?
  3270. +            `(("b" ,b) ("c" ,c) ("a" ,a))
  3271. +            (package-transitive-inputs e)))))
  3272. actual-value: #t
  3273. result: PASS
  3274.  
  3275. test-name: package-transitive-supported-systems
  3276. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:219
  3277. source:
  3278. + (test-equal
  3279. +   "package-transitive-supported-systems"
  3280. +   '(("x" "y" "z") ("x" "y") ("y") ("y") ("y"))
  3281. +   (let* ((a (dummy-package
  3282. +               "a"
  3283. +               (build-system trivial-build-system)
  3284. +               (supported-systems '("x" "y" "z"))))
  3285. +          (b (dummy-package
  3286. +               "b"
  3287. +               (build-system trivial-build-system)
  3288. +               (supported-systems '("x" "y"))
  3289. +               (inputs `(("a" ,a)))))
  3290. +          (c (dummy-package
  3291. +               "c"
  3292. +               (build-system trivial-build-system)
  3293. +               (supported-systems '("y" "z"))
  3294. +               (inputs `(("b" ,b)))))
  3295. +          (d (dummy-package
  3296. +               "d"
  3297. +               (build-system trivial-build-system)
  3298. +               (supported-systems '("x" "y" "z"))
  3299. +               (inputs `(("b" ,b) ("c" ,c)))))
  3300. +          (e (dummy-package
  3301. +               "e"
  3302. +               (build-system trivial-build-system)
  3303. +               (supported-systems '("x" "y" "z"))
  3304. +               (inputs `(("d" ,d))))))
  3305. +     (list (package-transitive-supported-systems a)
  3306. +           (package-transitive-supported-systems b)
  3307. +           (package-transitive-supported-systems c)
  3308. +           (package-transitive-supported-systems d)
  3309. +           (package-transitive-supported-systems e))))
  3310. expected-value: (("x" "y" "z") ("x" "y") ("y") ("y") ("y"))
  3311. actual-value: (("x" "y" "z") ("x" "y") ("y") ("y") ("y"))
  3312. result: PASS
  3313.  
  3314. test-name: origin-actual-file-name
  3315. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:252
  3316. source:
  3317. + (test-equal
  3318. +   "origin-actual-file-name"
  3319. +   "foo-1.tar.gz"
  3320. +   (let ((o (dummy-origin
  3321. +              (uri "http://www.example.com/foo-1.tar.gz"))))
  3322. +     (origin-actual-file-name o)))
  3323. expected-value: "foo-1.tar.gz"
  3324. actual-value: "foo-1.tar.gz"
  3325. result: PASS
  3326.  
  3327. test-name: origin-actual-file-name, file-name
  3328. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:257
  3329. source:
  3330. + (test-equal
  3331. +   "origin-actual-file-name, file-name"
  3332. +   "foo-1.tar.gz"
  3333. +   (let ((o (dummy-origin
  3334. +              (uri "http://www.example.com/tarball")
  3335. +              (file-name "foo-1.tar.gz"))))
  3336. +     (origin-actual-file-name o)))
  3337. expected-value: "foo-1.tar.gz"
  3338. actual-value: "foo-1.tar.gz"
  3339. result: PASS
  3340.  
  3341. test-name: package-direct-sources, no source
  3342. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:274
  3343. source:
  3344. + (test-assert
  3345. +   "package-direct-sources, no source"
  3346. +   (null? (package-direct-sources a)))
  3347. actual-value: #t
  3348. result: PASS
  3349.  
  3350. test-name: package-direct-sources, #f source
  3351. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:276
  3352. source:
  3353. + (test-equal
  3354. +   "package-direct-sources, #f source"
  3355. +   (list i)
  3356. +   (package-direct-sources b))
  3357. expected-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>)
  3358. actual-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>)
  3359. result: PASS
  3360.  
  3361. test-name: package-direct-sources, not input source
  3362. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:279
  3363. source:
  3364. + (test-equal
  3365. +   "package-direct-sources, not input source"
  3366. +   (list u)
  3367. +   (package-direct-sources d))
  3368. expected-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7420>)
  3369. actual-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7420>)
  3370. result: PASS
  3371.  
  3372. test-name: package-direct-sources
  3373. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:282
  3374. source:
  3375. + (test-assert
  3376. +   "package-direct-sources"
  3377. +   (let ((s (package-direct-sources c)))
  3378. +     (and (= (length (pk 's-sources s)) 2)
  3379. +          (member o s)
  3380. +          (member i s))))
  3381.  
  3382. ;;; (s-sources (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a74e0> #<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>))
  3383. actual-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>)
  3384. result: PASS
  3385.  
  3386. test-name: package-transitive-sources
  3387. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:287
  3388. source:
  3389. + (test-assert
  3390. +   "package-transitive-sources"
  3391. +   (let ((s (package-transitive-sources d)))
  3392. +     (and (= (length (pk 'd-sources s)) 3)
  3393. +          (member o s)
  3394. +          (member i s)
  3395. +          (member u s))))
  3396.  
  3397. ;;; (d-sources (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7420> #<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a74e0> #<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>))
  3398. actual-value: (#<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7420> #<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a74e0> #<origin "http://www.example.com" xx35467pxx35467pxx35467pxx35467pxx35467pxx35467pxx3q () 18a7360>)
  3399. result: PASS
  3400.  
  3401. test-name: transitive-input-references
  3402. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:294
  3403. source:
  3404. + (test-assert
  3405. +   "transitive-input-references"
  3406. +   (let* ((a (dummy-package "a"))
  3407. +          (b (dummy-package "b"))
  3408. +          (c (dummy-package
  3409. +               "c"
  3410. +               (inputs `(("a" ,a)))
  3411. +               (propagated-inputs `(("boo" ,b)))))
  3412. +          (d (dummy-package "d" (inputs `(("c*" ,c)))))
  3413. +          (keys (map (match-lambda (('assoc-ref 'l key) key))
  3414. +                     (pk 'refs
  3415. +                         (transitive-input-references
  3416. +                           'l
  3417. +                           (package-inputs d))))))
  3418. +     (and (= (length keys) 2)
  3419. +          (member "c*" keys)
  3420. +          (member "boo" keys))))
  3421.  
  3422. ;;; (refs ((assoc-ref l "c*") (assoc-ref l "boo")))
  3423. actual-value: ("boo")
  3424. result: PASS
  3425.  
  3426. test-name: package-transitive-supported-systems, implicit inputs
  3427. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:311
  3428. source:
  3429. + (test-equal
  3430. +   "package-transitive-supported-systems, implicit inputs"
  3431. +   %supported-systems
  3432. +   (let ((p (dummy-package
  3433. +              "foo"
  3434. +              (build-system gnu-build-system)
  3435. +              (supported-systems
  3436. +                `("does-not-exist" "foobar" ,@%supported-systems)))))
  3437. +     (package-transitive-supported-systems p)))
  3438. expected-value: ("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")
  3439. actual-value: ("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")
  3440. result: PASS
  3441.  
  3442. test-name: supported-package?
  3443. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:322
  3444. source:
  3445. + (test-assert
  3446. +   "supported-package?"
  3447. +   (let ((p (dummy-package
  3448. +              "foo"
  3449. +              (build-system gnu-build-system)
  3450. +              (supported-systems
  3451. +                '("x86_64-linux" "does-not-exist")))))
  3452. +     (and (supported-package? p "x86_64-linux")
  3453. +          (not (supported-package? p "does-not-exist"))
  3454. +          (not (supported-package? p "i686-linux")))))
  3455. actual-value: #t
  3456. result: PASS
  3457.  
  3458. test-name: package-source-derivation, file
  3459. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:332
  3460. source:
  3461. + (test-assert
  3462. +   "package-source-derivation, file"
  3463. +   (let* ((file (search-path %load-path "guix.scm"))
  3464. +          (package
  3465. +            (package
  3466. +              (inherit (dummy-package "p"))
  3467. +              (source file)))
  3468. +          (source
  3469. +            (package-source-derivation
  3470. +              %store
  3471. +              (package-source package))))
  3472. +     (and (store-path? source)
  3473. +          (valid-path? %store source)
  3474. +          (equal?
  3475. +            (call-with-input-file source get-bytevector-all)
  3476. +            (call-with-input-file file get-bytevector-all)))))
  3477. actual-value: #t
  3478. result: PASS
  3479.  
  3480. test-name: package-source-derivation, store path
  3481. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:343
  3482. source:
  3483. + (test-assert
  3484. +   "package-source-derivation, store path"
  3485. +   (let* ((file (add-to-store
  3486. +                  %store
  3487. +                  "guix.scm"
  3488. +                  #t
  3489. +                  "sha256"
  3490. +                  (search-path %load-path "guix.scm")))
  3491. +          (package
  3492. +            (package
  3493. +              (inherit (dummy-package "p"))
  3494. +              (source file)))
  3495. +          (source
  3496. +            (package-source-derivation
  3497. +              %store
  3498. +              (package-source package))))
  3499. +     (string=? file source)))
  3500. actual-value: #t
  3501. result: PASS
  3502.  
  3503. test-name: package-source-derivation, indirect store path
  3504. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:352
  3505. source:
  3506. + (test-assert
  3507. +   "package-source-derivation, indirect store path"
  3508. +   (let* ((dir (add-to-store
  3509. +                 %store
  3510. +                 "guix-build"
  3511. +                 #t
  3512. +                 "sha256"
  3513. +                 (dirname
  3514. +                   (search-path %load-path "guix/build/utils.scm"))))
  3515. +          (package
  3516. +            (package
  3517. +              (inherit (dummy-package "p"))
  3518. +              (source (string-append dir "/utils.scm"))))
  3519. +          (source
  3520. +            (package-source-derivation
  3521. +              %store
  3522. +              (package-source package))))
  3523. +     (and (direct-store-path? source)
  3524. +          (string-suffix? "utils.scm" source))))
  3525. actual-value: #t
  3526. result: PASS
  3527.  
  3528. test-name: package-source-derivation, local-file
  3529. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:363
  3530. source:
  3531. + (test-assert
  3532. +   "package-source-derivation, local-file"
  3533. +   (let* ((file (local-file "../guix/base32.scm"))
  3534. +          (package
  3535. +            (package
  3536. +              (inherit (dummy-package "p"))
  3537. +              (source file)))
  3538. +          (source
  3539. +            (package-source-derivation
  3540. +              %store
  3541. +              (package-source package))))
  3542. +     (and (store-path? source)
  3543. +          (string-suffix? "base32.scm" source)
  3544. +          (valid-path? %store source)
  3545. +          (equal?
  3546. +            (call-with-input-file source get-bytevector-all)
  3547. +            (call-with-input-file
  3548. +              (search-path %load-path "guix/base32.scm")
  3549. +              get-bytevector-all)))))
  3550. actual-value: #t
  3551. result: PASS
  3552.  
  3553. test-name: package-source-derivation, snippet
  3554. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:378
  3555. source:
  3556. + (test-equal
  3557. +   "package-source-derivation, snippet"
  3558. +   "OK"
  3559. +   (let* ((file (search-bootstrap-binary
  3560. +                  (match (%current-system)
  3561. +                         ("armhf-linux" "guile-2.0.11.tar.xz")
  3562. +                         ("aarch64-linux" "guile-2.0.14.tar.xz")
  3563. +                         (_ "guile-2.0.9.tar.xz"))
  3564. +                  (%current-system)))
  3565. +          (sha256 (call-with-input-file file port-sha256))
  3566. +          (fetch (lambda* (url hash-algo hash #:optional name #:key system)
  3567. +                   (pk 'fetch url hash-algo hash name system)
  3568. +                   (interned-file url)))
  3569. +          (source
  3570. +            (bootstrap-origin
  3571. +              (origin
  3572. +                (method fetch)
  3573. +                (uri file)
  3574. +                (sha256 sha256)
  3575. +                (patch-inputs
  3576. +                  `(("tar" ,%bootstrap-coreutils&co)
  3577. +                    ("xz" ,%bootstrap-coreutils&co)
  3578. +                    ("patch" ,%bootstrap-coreutils&co)))
  3579. +                (patch-guile %bootstrap-guile)
  3580. +                (modules '((guix build utils)))
  3581. +                (snippet
  3582. +                  '(begin
  3583. +                     (chmod "." 511)
  3584. +                     (symlink "guile" "guile-rocks")
  3585. +                     (copy-recursively
  3586. +                       "../share/guile/2.0/scripts"
  3587. +                       "scripts")
  3588. +                     (chmod ".." 511))))))
  3589. +          (package
  3590. +            (package
  3591. +              (inherit (dummy-package "with-snippet"))
  3592. +              (source source)
  3593. +              (build-system trivial-build-system)
  3594. +              (inputs
  3595. +                `(("tar"
  3596. +                   ,(search-bootstrap-binary "tar" (%current-system)))
  3597. +                  ("xz"
  3598. +                   ,(search-bootstrap-binary "xz" (%current-system)))))
  3599. +              (arguments
  3600. +                `(#:guile
  3601. +                  ,%bootstrap-guile
  3602. +                  #:builder
  3603. +                  (let ((tar (assoc-ref %build-inputs "tar"))
  3604. +                        (xz (assoc-ref %build-inputs "xz"))
  3605. +                        (source (assoc-ref %build-inputs "source")))
  3606. +                    (and (zero? (system*
  3607. +                                  tar
  3608. +                                  "xvf"
  3609. +                                  source
  3610. +                                  "--use-compress-program"
  3611. +                                  xz))
  3612. +                         (string=? "guile" (readlink "bin/guile-rocks"))
  3613. +                         (file-exists? "bin/scripts/compile.scm")
  3614. +                         (let ((out (assoc-ref %outputs "out")))
  3615. +                           (call-with-output-file
  3616. +                             out
  3617. +                             (lambda (p) (display "OK" p))))))))))
  3618. +          (drv (package-derivation %store package))
  3619. +          (out (derivation->output-path drv)))
  3620. +     (and (build-derivations
  3621. +            %store
  3622. +            (list (pk 'snippet-drv drv)))
  3623. +          (call-with-input-file out get-string-all))))
  3624. result: SKIP
  3625.  
  3626. test-name: return value
  3627. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:442
  3628. source:
  3629. + (test-assert
  3630. +   "return value"
  3631. +   (let ((drv (package-derivation %store (dummy-package "p"))))
  3632. +     (and (derivation? drv)
  3633. +          (file-exists? (derivation-file-name drv)))))
  3634. actual-value: #t
  3635. result: PASS
  3636.  
  3637. test-name: package-output
  3638. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:447
  3639. source:
  3640. + (test-assert
  3641. +   "package-output"
  3642. +   (let* ((package (dummy-package "p"))
  3643. +          (drv (package-derivation %store package)))
  3644. +     (and (derivation? drv)
  3645. +          (string=?
  3646. +            (derivation->output-path drv)
  3647. +            (package-output %store package "out")))))
  3648. actual-value: #t
  3649. result: PASS
  3650.  
  3651. test-name: patch not found yields a run-time error
  3652. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:454
  3653. source:
  3654. + (test-assert
  3655. +   "patch not found yields a run-time error"
  3656. +   (guard (c ((condition-has-type? c &message)
  3657. +              (and (string-contains
  3658. +         random seed for tests: 1495495375
  3659. package 'foo' has been superseded by 'bar'
  3660. package 'foo' has been superseded by 'bar'
  3661. package 'foo' has been superseded by 'bar'
  3662. package 'foo' has been superseded by 'bar'
  3663. @ build-started /tmp/guix-tests/store/hvyvgjygf729vfvbpl2k3dqvsiwx59cw-trivial-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/hv//yvgjygf729vfvbpl2k3dqvsiwx59cw-trivial-0.drv.bz2
  3664. @ build-succeeded /tmp/guix-tests/store/hvyvgjygf729vfvbpl2k3dqvsiwx59cw-trivial-0.drv -
  3665.             (condition-message c)
  3666. +                     "does-not-exist.patch")
  3667. +                   (string-contains
  3668. +                     (condition-message c)
  3669. +                     "not found"))))
  3670. +          (let ((p (package
  3671. +                     (inherit (dummy-package "p"))
  3672. +                     (source
  3673. +                       (origin
  3674. +                         (method (const #f))
  3675. +                         (uri "http://whatever")
  3676. +                         (patches
  3677. +                           (list (search-patch "does-not-exist.patch")))
  3678. +                         (sha256
  3679. +                           (base32
  3680. +                             "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks4")))))))
  3681. +            (package-derivation %store p)
  3682. +            #f)))
  3683. actual-value: 28
  3684. result: PASS
  3685.  
  3686. test-name: &package-input-error
  3687. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:474
  3688. source:
  3689. + (test-equal
  3690. +   "&package-input-error"
  3691. +   (list dummy (current-module))
  3692. +   (guard (c ((package-input-error? c)
  3693. +              (list (package-error-package c)
  3694. +                    (package-error-invalid-input c))))
  3695. +          (package-derivation %store dummy)))
  3696. expected-value: (#<package foo@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:473 20f7900> #<directory (test-packages) 801320>)
  3697. actual-value: (#<package foo@0 /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:473 20f7900> #<directory (test-packages) 801320>)
  3698. result: PASS
  3699.  
  3700. test-name: reference to non-existent output
  3701. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:481
  3702. source:
  3703. + (test-assert
  3704. +   "reference to non-existent output"
  3705. +   (parameterize
  3706. +     ((%graft? #f))
  3707. +     (let* ((dep (dummy-package "dep"))
  3708. +            (p (dummy-package
  3709. +                 "p"
  3710. +                 (inputs `(("dep" ,dep "non-existent"))))))
  3711. +       (guard (c ((derivation-missing-output-error? c)
  3712. +                  (and (string=?
  3713. +                         (derivation-missing-output c)
  3714. +                         "non-existent")
  3715. +                       (equal?
  3716. +                         (package-derivation %store dep)
  3717. +                         (derivation-error-derivation c)))))
  3718. +              (package-derivation %store p)))))
  3719. actual-value: #t
  3720. result: PASS
  3721.  
  3722. test-name: trivial
  3723. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:493
  3724. source:
  3725. + (test-assert
  3726. +   "trivial"
  3727. +   (let* ((p (package
  3728. +               (inherit (dummy-package "trivial"))
  3729. +               (build-system trivial-build-system)
  3730. +               (source #f)
  3731. +               (arguments
  3732. +                 `(#:guile
  3733. +                   ,%bootstrap-guile
  3734. +                   #:builder
  3735. +                   (begin
  3736. +                     (mkdir %output)
  3737. +                     (call-with-output-file
  3738. +                       (string-append %output "/test")
  3739. +                       (lambda (p) (display '(hello guix) p))))))))
  3740. +          (d (package-derivation %store p)))
  3741. +     (and (build-derivations %store (list d))
  3742. +          (let ((p (pk 'drv d (derivation->output-path d))))
  3743. +            (equal?
  3744. +              '(hello guix)
  3745. +              (call-with-input-file
  3746. +                (string-append p "/test")
  3747. +                read))))))
  3748.  
  3749. ;;; (drv #<derivation /tmp/guix-tests/store/hvyvgjygf729vfvbpl2k3dqvsiwx59cw-trivial-0.drv => /tmp/guix-tests/store/3pp7cs8ycxg16yldqd62lrk306ck1g72-trivial-0 1ab4f00> "/tmp/guix-tests/store/3pp7cs8ycxg16yldqd62lrk306ck1g72-trivial-0")
  3750. actual-value: #t
  3751. result: PASS
  3752.  
  3753. test-name: trivial with local file as input
  3754. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:511
  3755. source:
  3756. + (test-assert
  3757. +   "trivial with local file as input"
  3758. +   (let* ((i (search-path %load-path "ice-9/boot-9.scm"))
  3759. +          (p (package
  3760. +               (inherit
  3761. +                 (dummy-package "trivial-with-input-file"))
  3762. +               (build-system trivial-build-system)
  3763. +               (source #f)
  3764. +               (arguments
  3765. +                 `(#:guile
  3766. +                   ,%bootstrap-guile
  3767. +                   #:builder
  3768. +                   (copy-file
  3769. +         @ build-started /tmp/guix-tests/store/a6yjh360wy274bw6v69b7i4ybgznhc72-trivial-with-input-file-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/a6//yjh360wy274bw6v69b7i4ybgznhc72-trivial-with-input-file-0.drv.bz2
  3770. @ build-succeeded /tmp/guix-tests/store/a6yjh360wy274bw6v69b7i4ybgznhc72-trivial-with-input-file-0.drv -
  3771. @ build-started /tmp/guix-tests/store/62hvlyvzl8zdm919i5f51clhvy5a5yab-trivial-with-source-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/62//hvlyvzl8zdm919i5f51clhvy5a5yab-trivial-with-source-0.drv.bz2
  3772. @ build-succeeded /tmp/guix-tests/store/62hvlyvzl8zdm919i5f51clhvy5a5yab-trivial-with-source-0.drv -
  3773. @ build-started /tmp/guix-tests/store/jmw8n1jv0clislyswj0gnc7mm52q0kjv-trivial-system-dependent-input-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/jm//w8n1jv0clislyswj0gnc7mm52q0kjv-trivial-system-dependent-input-0.drv.bz2
  3774. @ build-succeeded /tmp/guix-tests/store/jmw8n1jv0clislyswj0gnc7mm52q0kjv-trivial-system-dependent-input-0.drv -
  3775.             (assoc-ref %build-inputs "input")
  3776. +                     %output)))
  3777. +               (inputs `(("input" ,i)))))
  3778. +          (d (package-derivation %store p)))
  3779. +     (and (build-derivations %store (list d))
  3780. +          (let ((p (pk 'drv d (derivation->output-path d))))
  3781. +            (equal?
  3782. +              (call-with-input-file p get-bytevector-all)
  3783. +              (call-with-input-file i get-bytevector-all))))))
  3784.  
  3785. ;;; (drv #<derivation /tmp/guix-tests/store/a6yjh360wy274bw6v69b7i4ybgznhc72-trivial-with-input-file-0.drv => /tmp/guix-tests/store/ig6yxsjih7q2g4zmlplm1psjz5yprqad-trivial-with-input-file-0 1ab4dc0> "/tmp/guix-tests/store/ig6yxsjih7q2g4zmlplm1psjz5yprqad-trivial-with-input-file-0")
  3786. actual-value: #t
  3787. result: PASS
  3788.  
  3789. test-name: trivial with source
  3790. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:527
  3791. source:
  3792. + (test-assert
  3793. +   "trivial with source"
  3794. +   (let* ((i (search-path %load-path "ice-9/boot-9.scm"))
  3795. +          (p (package
  3796. +               (inherit (dummy-package "trivial-with-source"))
  3797. +               (build-system trivial-build-system)
  3798. +               (source i)
  3799. +               (arguments
  3800. +                 `(#:guile
  3801. +                   ,%bootstrap-guile
  3802. +                   #:builder
  3803. +                   (copy-file
  3804. +                     (assoc-ref %build-inputs "source")
  3805. +                     %output)))))
  3806. +          (d (package-derivation %store p)))
  3807. +     (and (build-derivations %store (list d))
  3808. +          (let ((p (derivation->output-path d)))
  3809. +            (equal?
  3810. +              (call-with-input-file p get-bytevector-all)
  3811. +              (call-with-input-file i get-bytevector-all))))))
  3812. actual-value: #t
  3813. result: PASS
  3814.  
  3815. test-name: trivial with system-dependent input
  3816. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:542
  3817. source:
  3818. + (test-assert
  3819. +   "trivial with system-dependent input"
  3820. +   (let* ((p (package
  3821. +               (inherit
  3822. +                 (dummy-package "trivial-system-dependent-input"))
  3823. +               (build-system trivial-build-system)
  3824. +               (source #f)
  3825. +               (arguments
  3826. +                 `(#:guile
  3827. +                   ,%bootstrap-guile
  3828. +                   #:builder
  3829. +                   (let ((out (assoc-ref %outputs "out"))
  3830. +                         (bash (assoc-ref %build-inputs "bash")))
  3831. +                     (zero? (system*
  3832. +                              bash
  3833. +                              "-c"
  3834. +                              (format #f "echo hello > ~a" out))))))
  3835. +               (inputs
  3836. +                 `(("bash"
  3837. +                    ,(search-bootstrap-binary
  3838. +                       "bash"
  3839. +                       (%current-system)))))))
  3840. +          (d (package-derivation %store p)))
  3841. +     (and (build-derivations %store (list d))
  3842. +          (let ((p (pk 'drv d (derivation->output-path d))))
  3843. +            (eq? 'hello (call-with-input-file p read))))))
  3844.  
  3845. ;;; (drv #<derivation /tmp/guix-tests/store/jmw8n1jv0clislyswj0gnc7mm52q0kjv-trivial-system-dependent-input-0.drv => /tmp/guix-tests/store/8pqmam9mmnpd071ya49hv33dnp8p24f5-trivial-system-dependent-input-0 1ab4960> "/tmp/guix-tests/store/8pqmam9mmnpd071ya49hv33dnp8p24f5-trivial-system-dependent-input-0")
  3846. actual-value: #t
  3847. result: PASS
  3848.  
  3849. test-name: search paths
  3850. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:560
  3851. source:
  3852. + (test-assert
  3853. +   "search paths"
  3854. +   (let* ((p (make-prompt-tag "return-search-paths"))
  3855. +          (s (build-system
  3856. +               (name 'raw)
  3857. +               (description
  3858. +                 "Raw build system with direct store access")
  3859. +               (lower (lambda* (name
  3860. +                                #:key
  3861. +                                source
  3862. +                                inputs
  3863. +                                system
  3864. +                                target
  3865. +                                #:allow-other-keys)
  3866. +                        (bag (name name)
  3867. +                             (system system)
  3868. +                             (target target)
  3869. +                             (build-inputs inputs)
  3870. +                             (build (lambda* (store
  3871. +                                              name
  3872. +                                              inputs
  3873. +                                              #:key
  3874. +                                              outputs
  3875. +                                              system
  3876. +                                              search-paths)
  3877. +                                      search-paths)))))))
  3878. +          (x (list (search-path-specification
  3879. +                     (variable "GUILE_LOAD_PATH")
  3880. +                     (files '("share/guile/site/2.0")))
  3881. +                   (search-path-specification
  3882. +                     (variable "GUILE_LOAD_COMPILED_PATH")
  3883. +                     (files '("share/guile/site/2.0")))))
  3884. +          (a (package
  3885. +               (inherit (dummy-package "guile"))
  3886. +               (build-system s)
  3887. +               (native-search-paths x)))
  3888. +          (b (package
  3889. +               (inherit (dummy-package "guile-foo"))
  3890. +               (build-system s)
  3891. +               (inputs `(("guile" ,a)))))
  3892. +          (c (package
  3893. +               (inherit (dummy-package "guile-bar"))
  3894. +               (build-system s)
  3895. +               (inputs `(("guile" ,a) ("guile-foo" ,b))))))
  3896. +     (let-syntax ((collect
  3897. +                    (syntax-rules ()
  3898. +                      ((_ body ...)
  3899. +                       (call-with-prompt
  3900. +                         p
  3901. +                         (lambda () body ...)
  3902. +                         (lambda (k search-paths) search-paths))))))
  3903. +       (and (null? (collect (package-derivation %store a)))
  3904. +            (equal?
  3905. +              x
  3906. +              (collect (package-derivation %store b)))
  3907. +            (equal?
  3908. +              x
  3909. +              (collect (package-derivation %store c)))))))
  3910. actual-value: #t
  3911. result: PASS
  3912.  
  3913. test-name: package-transitive-native-search-paths
  3914. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:602
  3915. source:
  3916. + (test-assert
  3917. +   "package-transitive-native-search-paths"
  3918. +   (let* ((sp (lambda (name)
  3919. +                (list (search-path-specification
  3920. +                        (variable name)
  3921. +                        (files '("foo/bar"))))))
  3922. +          (p0 (dummy-package
  3923. +                "p0"
  3924. +                (native-search-paths (sp "PATH0"))))
  3925. +          (p1 (dummy-package
  3926. +                "p1"
  3927. +                (native-search-paths (sp "PATH1"))))
  3928. +          (p2 (dummy-package
  3929. +                "p2"
  3930. +                (native-search-paths (sp "PATH2"))
  3931. +                (inputs `(("p0" ,p0)))
  3932. +                (propagated-inputs `(("p1" ,p1)))))
  3933. +          (p3 (dummy-package
  3934. +                "p3"
  3935. +                (native-search-paths (sp "PATH3"))
  3936. +                (native-inputs `(("p0" ,p0)))
  3937. +                (propagated-inputs `(("p2" ,p2))))))
  3938. +     (lset= string=?
  3939. +            '("PATH1" "PATH2" "PATH3")
  3940. +            (map search-path-specification-variable
  3941. +                 (package-transitive-native-search-paths p3)))))
  3942. actual-value: #t
  3943. result: PASS
  3944.  
  3945. test-name: package-cross-derivation
  3946. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:622
  3947. source:
  3948. + (test-assert
  3949. +   "package-cross-derivation"
  3950. +   (let ((drv (package-cross-derivation
  3951. +                %store
  3952. +                (dummy-package "p")
  3953. +                "mips64el-linux-gnu")))
  3954. +     (and (derivation? drv)
  3955. +          (file-exists? (derivation-file-name drv)))))
  3956. actual-value: #t
  3957. result: PASS
  3958.  
  3959. test-name: package-cross-derivation, trivial-build-system
  3960. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:628
  3961. source:
  3962. + (test-assert
  3963. +   "package-cross-derivation, trivial-build-system"
  3964. +   (let ((p (package
  3965. +              (inherit (dummy-package "p"))
  3966. +              (build-system trivial-build-system)
  3967. +              (arguments '(#:builder (exit 1))))))
  3968. +     (let ((drv (package-cross-derivation
  3969. +                  %store
  3970. +                  p
  3971. +                  "mips64el-linux-gnu")))
  3972. +       (derivation? drv))))
  3973. actual-value: #t
  3974. result: PASS
  3975.  
  3976. test-name: package-cross-derivation, no cross builder
  3977. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:635
  3978. source:
  3979. + (test-assert
  3980. +   "package-cross-derivation, no cross builder"
  3981. +   (let* ((b (build-system
  3982. +               (inherit trivial-build-system)
  3983. +               (lower (const #f))))
  3984. +          (p (package
  3985. +               (inherit (dummy-package "p"))
  3986. +               (build-system b))))
  3987. +     (guard (c ((package-cross-build-system-error? c)
  3988. +                (eq? (package-error-package c) p)))
  3989. +            (package-cross-derivation
  3990. +              %store
  3991. +              p
  3992. +              "mips64el-linux-gnu")
  3993. +            #f)))
  3994. actual-value: #t
  3995. result: PASS
  3996.  
  3997. test-name: package-grafts, indirect grafts
  3998. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:663
  3999. source:
  4000. + (test-assert
  4001. +   "package-grafts, indirect grafts"
  4002. +   (let* ((new (dummy-package
  4003. +                 "dep"
  4004. +                 (arguments '(#:implicit-inputs? #f))))
  4005. +          (dep (package (inherit new) (version "0.0")))
  4006. +          (dep* (package (inherit dep) (replacement new)))
  4007. +          (dummy (dummy-package
  4008. +                   "dummy"
  4009. +                   (arguments '(#:implicit-inputs? #f))
  4010. +                   (inputs `(("dep" ,dep*))))))
  4011. +     (equal?
  4012. +       (package-grafts %store dummy)
  4013. +       (list (graft (origin (package-derivation %store dep))
  4014. +                    (replacement (package-derivation %store new)))))))
  4015. actual-value: #t
  4016. result: PASS
  4017.  
  4018. test-name: package-grafts, indirect grafts, propagated inputs
  4019. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:696
  4020. source:
  4021. + (test-assert
  4022. +   "package-grafts, indirect grafts, propagated inputs"
  4023. +   (let* ((new (dummy-package
  4024. +                 "dep"
  4025. +                 (arguments '(#:implicit-inputs? #f))))
  4026. +          (dep (package (inherit new) (version "0.0")))
  4027. +          (dep* (package (inherit dep) (replacement new)))
  4028. +          (prop (dummy-package
  4029. +                  "propagated"
  4030. +                  (propagated-inputs `(("dep" ,dep*)))
  4031. +                  (arguments '(#:implicit-inputs? #f))))
  4032. +          (dummy (dummy-package
  4033. +                   "dummy"
  4034. +                   (arguments '(#:implicit-inputs? #f))
  4035. +                   (inputs `(("prop" ,prop))))))
  4036. +     (equal?
  4037. +       (package-grafts %store dummy)
  4038. +       (list (graft (origin (package-derivation %store dep))
  4039. +                    (replacement (package-derivation %store new)))))))
  4040. actual-value: #t
  4041. result: PASS
  4042.  
  4043. test-name: package-grafts, same replacement twice
  4044. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:712
  4045. source:
  4046. + (test-assert
  4047. +   "package-grafts, same replacement twice"
  4048. +   (let* ((new (dummy-package
  4049. +                 "dep"
  4050. +                 (version "1")
  4051. +                 (arguments '(#:implicit-inputs? #f))))
  4052. +          (dep (package
  4053. +                 (inherit new)
  4054. +                 (version "0")
  4055. +                 (replacement new)))
  4056. +          (p1 (dummy-package
  4057. +                "intermediate1"
  4058. +                (arguments '(#:implicit-inputs? #f))
  4059. +                (inputs `(("dep" ,dep)))))
  4060. +          (p2 (dummy-package
  4061. +                "intermediate2"
  4062. +                (arguments '(#:implicit-inputs? #f))
  4063. +                (inputs `(("dep" ,(package (inherit dep)))))))
  4064. +          (p3 (dummy-package
  4065. +                "final"
  4066. +                (arguments '(#:implicit-inputs? #f))
  4067. +                (inputs `(("p1" ,p1) ("p2" ,p2))))))
  4068. +     (equal?
  4069. +       (package-grafts %store p3)
  4070. +       (list (graft (origin
  4071. +                      (package-derivation
  4072. +                        %store
  4073. +                        (package (inherit dep) (replacement #f))))
  4074. +                    (replacement (package-derivation %store new)))))))
  4075. actual-value: #t
  4076. result: PASS
  4077.  
  4078. test-name: replacement also grafted
  4079. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:736
  4080. source:
  4081. + (test-assert
  4082. +   "replacement also grafted"
  4083. +   (let* ((p1r (dummy-package
  4084. +                 "P1"
  4085. +                 (build-system trivial-build-system)
  4086. +                 (arguments
  4087. +                   `(#:guile
  4088. +                     ,%bootstrap-guile
  4089. +                     #:builder
  4090. +                     (let ((out (assoc-ref %outputs "out")))
  4091. + @ build-started /tmp/guix-tests/store/4fy6qbf23zv784brzwpkkrmwpnmbp2gr-p1-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/4f//y6qbf23zv784brzwpkkrmwpnmbp2gr-p1-0.drv.bz2
  4092. @ build-succeeded /tmp/guix-tests/store/4fy6qbf23zv784brzwpkkrmwpnmbp2gr-p1-0.drv -
  4093. @ build-started /tmp/guix-tests/store/107g7qq7946g9vvbp8vqcpx98xjb79df-P2-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/10//7g7qq7946g9vvbp8vqcpx98xjb79df-P2-0.drv.bz2
  4094. @ build-succeeded /tmp/guix-tests/store/107g7qq7946g9vvbp8vqcpx98xjb79df-P2-0.drv -
  4095.                       (mkdir out)
  4096. +                       (call-with-output-file
  4097. +                         (string-append out "/replacement")
  4098. +                         (const #t)))))))
  4099. +          (p1 (package
  4100. +                (inherit p1r)
  4101. +                (name "p1")
  4102. +                (replacement p1r)
  4103. +                (arguments
  4104. +                  `(#:guile
  4105. +                    ,%bootstrap-guile
  4106. +                    #:builder
  4107. +                    (mkdir (assoc-ref %outputs "out"))))))
  4108. +          (p2r (dummy-package
  4109. +                 "P2"
  4110. +                 (build-system trivial-build-system)
  4111. +                 (inputs `(("p1" ,p1)))
  4112. +                 (arguments
  4113. +                   `(#:guile
  4114. +                     ,%bootstrap-guile
  4115. +                     #:builder
  4116. +                     (let ((out (assoc-ref %outputs "out")))
  4117. +                       (mkdir out)
  4118. +                       (chdir out)
  4119. +                       (symlink (assoc-ref %build-inputs "p1") "p1")
  4120. +                       (call-with-output-file
  4121. +                         (string-append out "/replacement")
  4122. +                         (const #t)))))))
  4123. +          (p2 (package
  4124. +                (inherit p2r)
  4125. +                (name "p2")
  4126. +                (replacement p2r)
  4127. +                (arguments
  4128. +                  `(#:guile
  4129. +                    ,%bootstrap-guile
  4130. +                    #:builder
  4131. +                    (let ((out (assoc-ref %outputs "out")))
  4132. +                      (mkdir out)
  4133. +                      (chdir out)
  4134. +                      (symlink (assoc-ref %build-inputs "p1") "p1"))))))
  4135. +          (p3 (dummy-package
  4136. +                "p3"
  4137. +                (build-system trivial-build-system)
  4138. +                (inputs `(("p2" ,p2)))
  4139. +                (arguments
  4140. +                  `(#:guile
  4141. +                    ,%bootstrap-guile
  4142. +                    #:builder
  4143. +                    (let ((out (assoc-ref %outputs "out")))
  4144. +                      (mkdir out)
  4145. +                      (chdir out)
  4146. +                      (symlink (assoc-ref %build-inputs "p2") "p2")))))))
  4147. +     (lset= equal?
  4148. +            (package-grafts %store p3)
  4149. +            (list (graft (origin
  4150. +                           (package-derivation %store p1 #:graft? #f))
  4151. +                         (replacement (package-derivation %store p1r)))
  4152. +                  (graft (origin
  4153. +                           (package-derivation %store p2 #:graft? #f))
  4154. +                         (replacement
  4155. +                           (package-derivation %store p2r #:graft? #t)))))))
  4156. actual-value: #t
  4157. result: PASS
  4158.  
  4159. test-name: package->bag
  4160. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:829
  4161. source:
  4162. + (test-equal
  4163. +   "package->bag"
  4164. +   `("foo86-hurd"
  4165. +     #f
  4166. +     (,(package-source gnu-make))
  4167. +     (,(canonical-package glibc))
  4168. +     (,(canonical-package coreutils)))
  4169. +   (let ((bag (package->bag gnu-make "foo86-hurd")))
  4170. +     (list (bag-system bag)
  4171. +           (bag-target bag)
  4172. +           (assoc-ref (bag-build-inputs bag) "source")
  4173. +           (assoc-ref (bag-build-inputs bag) "libc")
  4174. +           (assoc-ref (bag-build-inputs bag) "coreutils"))))
  4175. expected-value: ("foo86-hurd" #f (#<origin "mirror://gnu/make/make-4.2.1.tar.bz2" 23rgfpzwag2c2ky6j34dcabj4hopeaedyvcgws32uzyid7p7yweq ("/tmp/guix-build-guix-0.13.0.drv-0/source/gnu/packages/patches/make-impure-dirs.patch") 192d420>) (#<package glibc@2.25 gnu/packages/commencement.scm:643 1c0b240>) (#<package coreutils@8.26 gnu/packages/bootstrap.scm:147 1c0d180>))
  4176. actual-value: ("foo86-hurd" #f (#<origin "mirror://gnu/make/make-4.2.1.tar.bz2" 23rgfpzwag2c2ky6j34dcabj4hopeaedyvcgws32uzyid7p7yweq ("/tmp/guix-build-guix-0.13.0.drv-0/source/gnu/packages/patches/make-impure-dirs.patch") 192d420>) (#<package glibc@2.25 gnu/packages/commencement.scm:643 1c0b240>) (#<package coreutils@8.26 gnu/packages/bootstrap.scm:147 1c0d180>))
  4177. result: PASS
  4178.  
  4179. test-name: package->bag, cross-compilation
  4180. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:838
  4181. source:
  4182. + (test-equal
  4183. +   "package->bag, cross-compilation"
  4184. +   `(,(%current-system)
  4185. +     "foo86-hurd"
  4186. +     (,(package-source gnu-make))
  4187. +     (,(canonical-package glibc))
  4188. +     (,(canonical-package coreutils)))
  4189. +   (let ((bag (package->bag
  4190. +                gnu-make
  4191. +                (%current-system)
  4192. +                "foo86-hurd")))
  4193. +     (list (bag-system bag)
  4194. +           (bag-target bag)
  4195. +           (assoc-ref (bag-build-inputs bag) "source")
  4196. +           (assoc-ref (bag-build-inputs bag) "libc")
  4197. +           (assoc-ref (bag-build-inputs bag) "coreutils"))))
  4198. expected-value: ("x86_64-linux" "foo86-hurd" (#<origin "mirror://gnu/make/make-4.2.1.tar.bz2" 23rgfpzwag2c2ky6j34dcabj4hopeaedyvcgws32uzyid7p7yweq ("/tmp/guix-build-guix-0.13.0.drv-0/source/gnu/packages/patches/make-impure-dirs.patch") 192d420>) (#<package glibc@2.25 gnu/packages/commencement.scm:643 1c0b240>) (#<package coreutils@8.26 gnu/packages/bootstrap.scm:147 1c0d180>))
  4199. actual-value: ("x86_64-linux" "foo86-hurd" (#<origin "mirror://gnu/make/make-4.2.1.tar.bz2" 23rgfpzwag2c2ky6j34dcabj4hopeaedyvcgws32uzyid7p7yweq ("/tmp/guix-build-guix-0.13.0.drv-0/source/gnu/packages/patches/make-impure-dirs.patch") 192d420>) (#<package glibc@2.25 gnu/packages/commencement.scm:643 1c0b240>) (#<package coreutils@8.26 gnu/packages/bootstrap.scm:147 1c0d180>))
  4200. result: PASS
  4201.  
  4202. test-name: package->bag, propagated inputs
  4203. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:848
  4204. source:
  4205. + (test-assert
  4206. +   "package->bag, propagated inputs"
  4207. +   (let* ((dep (dummy-package "dep"))
  4208. +          (prop (dummy-package
  4209. +                  "prop"
  4210. +                  (propagated-inputs `(("dep" ,dep)))))
  4211. +          (dummy (dummy-package
  4212. +                   "dummy"
  4213. +                   (inputs `(("prop" ,prop)))))
  4214. +          (inputs
  4215. +            (bag-transitive-inputs
  4216. +              (package->bag dummy #:graft? #f))))
  4217. +     (match (assoc "dep" inputs)
  4218. +            (("dep" package) (eq? package dep)))))
  4219. actual-value: #t
  4220. result: PASS
  4221.  
  4222. test-name: bag->derivation
  4223. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:859
  4224. source:
  4225. + (test-assert
  4226. +   "bag->derivation"
  4227. +   (parameterize
  4228. +     ((%graft? #f))
  4229. +     (let ((bag (package->bag gnu-make))
  4230. +           (drv (package-derivation %store gnu-make)))
  4231. +       (parameterize
  4232. +         ((%current-system "foox86-hurd"))
  4233. +         (equal? drv (bag->derivation %store bag))))))
  4234. actual-value: #t
  4235. result: PASS
  4236.  
  4237. test-name: bag->derivation, cross-compilation
  4238. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:866
  4239. source:
  4240. + (test-assert
  4241. +   "bag->derivation, cross-compilation"
  4242. +   (parameterize
  4243. +     ((%graft? #f))
  4244. +     (let* ((target "mips64el-linux-gnu")
  4245. +            (bag (package->bag gnu-make (%current-system) target))
  4246. +            (drv (package-cross-derivation %store gnu-make target)))
  4247. +       (parameterize
  4248. +         ((%current-system "foox86-hurd")
  4249. +          (%current-target-system "foo64-linux-gnu"))
  4250. +         (equal? drv (bag->derivation %store bag))))))
  4251. actual-value: #t
  4252. result: PASS
  4253.  
  4254. test-name: GNU Make, bootstrap
  4255. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:877
  4256. source:
  4257. + (test-assert
  4258. +   "GNU Make, bootstrap"
  4259. +   (let ((gnu-make
  4260. +           (@@ (gnu packages commencement) gnu-make-boot0)))
  4261. +     (and (package? gnu-make)
  4262. +          (or (location? (package-location gnu-make))
  4263. +              (not (package-location gnu-make)))
  4264. +          (let* ((drv (package-derivation %store gnu-make))
  4265. +                 (out (derivation->output-path drv)))
  4266. +            (and (build-derivations %store (list drv))
  4267. +                 (file-exists? (string-append out "/bin/make")))))))
  4268. result: SKIP
  4269.  
  4270. test-name: package-mapping
  4271. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:889
  4272. source:
  4273. + (test-equal
  4274. +   "package-mapping"
  4275. +   42
  4276. +   (let* ((dep (dummy-package
  4277. +                 "chbouib"
  4278. +                 (native-inputs `(("x" ,grep)))))
  4279. +          (p0 (dummy-package
  4280. +                "example"
  4281. +                (inputs
  4282. +                  `(("foo" ,coreutils) ("bar" ,grep) ("baz" ,dep)))))
  4283. +          (transform
  4284. +            (lambda (p) (package (inherit p) (source 42))))
  4285. +          (rewrite (package-mapping transform))
  4286. +          (p1 (rewrite p0)))
  4287. +     (and (eq? p1 (rewrite p0))
  4288. +          (eqv? 42 (package-source p1))
  4289. +          (match (package-inputs p1)
  4290. +                 ((("foo" dep1) ("bar" dep2) ("baz" dep3))
  4291. +                  (and (eq? dep1 (rewrite coreutils))
  4292. +                       (eq? dep2 (rewrite grep))
  4293. +                       (eq? dep3 (rewrite dep))
  4294. +                       (eqv? 42
  4295. +                             (package-source dep1)
  4296. +                             (package-source dep2)
  4297. +                             (package-source dep3))
  4298. +                       (match (package-native-inputs dep3)
  4299. +                              ((("x" dep))
  4300. +                               (and (eq? dep (rewrite grep))
  4301. +                                    (package-source dep))))))))))
  4302. expected-value: 42
  4303. actual-value: 42
  4304. result: PASS
  4305.  
  4306. test-name: package-input-rewriting
  4307. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:916
  4308. source:
  4309. + (test-assert
  4310. +   "package-input-rewriting"
  4311. +   (let* ((dep (dummy-package
  4312. +                 "chbouib"
  4313. +                 (native-inputs `(("x" ,grep)))))
  4314. +          (p0 (dummy-package
  4315. +                "example"
  4316. +                (inputs
  4317. +                  `(("foo" ,coreutils) ("bar" ,grep) ("baz" ,dep)))))
  4318. +          (rewrite
  4319. +            (package-input-rewriting
  4320. +              `((,coreutils unquote sed)
  4321. +                (,grep unquote findutils))
  4322. +              (cut string-append "r-" <>)))
  4323. +          (p1 (rewrite p0))
  4324. +          (p2 (rewrite p0)))
  4325. +     (and (not (eq? p1 p0))
  4326. +          (eq? p1 p2)
  4327. +          (string=? "r-example" (package-name p1))
  4328. +          (match (package-inputs p1)
  4329. +                 ((("foo" dep1) ("bar" dep2) ("baz" dep3))
  4330. +                  (and (eq? dep1 sed)
  4331. +                       (eq? dep2 findutils)
  4332. +                       (string=? (package-name dep3) "r-chbouib")
  4333. +                       (eq? dep3 (rewrite dep))
  4334. +                       (match (package-native-inputs dep3)
  4335. +                              ((("x" dep)) (eq? dep findutils)))))))))
  4336. actual-value: #t
  4337. result: PASS
  4338.  
  4339. test-name: fold-packages
  4340. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:941
  4341. source:
  4342. + (test-eq
  4343. +   "fold-packages"
  4344. +   hello
  4345. +   (fold-packages
  4346. +     (lambda (p r)
  4347. +       (if (string=? (package-name p) "hello") p r))
  4348. +     #f))
  4349. expected-value: #<package hello@2.10 gnu/packages/base.scm:60 19303c0>
  4350. actual-value: #<package hello@2.10 gnu/packages/base.scm:60 19303c0>
  4351. result: PASS
  4352.  
  4353. test-name: fold-packages, hidden package
  4354. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:948
  4355. source:
  4356. + (test-assert
  4357. +   "fold-packages, hidden package"
  4358. +   (match (fold-packages
  4359. +            (lambda (p r)
  4360. +              (if (and (string=? (package-name p) "guile")
  4361. +                       (string-prefix? "2.0" (package-version p)))
  4362. +                (cons p r)
  4363. +                r))
  4364. +            '())
  4365. +          ((one) (eq? one guile-2.0))))
  4366. actual-value: #t
  4367. result: PASS
  4368.  
  4369. test-name: find-packages-by-name
  4370. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:962
  4371. source:
  4372. + (test-assert
  4373. +   "find-packages-by-name"
  4374. +   (match (find-packages-by-name "hello")
  4375. +          (((? (cut eq? hello <>))) #t)
  4376. +          (wrong (pk 'find-packages-by-name wrong #f))))
  4377. actual-value: #t
  4378. result: PASS
  4379.  
  4380. test-name: find-packages-by-name with version
  4381. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:967
  4382. source:
  4383. + (test-assert
  4384. +   "find-packages-by-name with version"
  4385. +   (match (find-packages-by-name
  4386. +            "hello"
  4387. +            (package-version hello))
  4388. +          (((? (cut eq? hello <>))) #t)
  4389. +          (wrong (pk 'find-packages-by-name wrong #f))))
  4390. actual-value: #t
  4391. result: PASS
  4392.  
  4393. test-name: --search-paths with pattern
  4394. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:972
  4395. source:
  4396. + (test-assert
  4397. +   "--search-paths with pattern"
  4398. +   (let* ((p1 (package
  4399. +                (name "foo")
  4400. +                (version "0")
  4401. +                (source #f)
  4402. +                (build-system trivial-build-system)
  4403. +         @ build-started /tmp/guix-tests/store/776fmfgvl86sycqhwylvbxvj8lampqyr-foo-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/77//6fmfgvl86sycqhwylvbxvj8lampqyr-foo-0.drv.bz2
  4404. @ build-succeeded /tmp/guix-tests/store/776fmfgvl86sycqhwylvbxvj8lampqyr-foo-0.drv -
  4405. @ build-started /tmp/guix-tests/store/r2cwc0ymafj3fih71ddlpvv48ibh3r5f-libxml2-0.0.0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/r2//cwc0ymafj3fih71ddlpvv48ibh3r5f-libxml2-0.0.0.drv.bz2
  4406. @ build-succeeded /tmp/guix-tests/store/r2cwc0ymafj3fih71ddlpvv48ibh3r5f-libxml2-0.0.0.drv -
  4407. @ build-started /tmp/guix-tests/store/2kgydlmck3v1yhapigr0nngwsii3zg09-module-import.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/2k//gydlmck3v1yhapigr0nngwsii3zg09-module-import.drv.bz2
  4408. @ build-succeeded /tmp/guix-tests/store/2kgydlmck3v1yhapigr0nngwsii3zg09-module-import.drv -
  4409. @ build-started /tmp/guix-tests/store/zlmj31wzwc9zr5x2jcjlbcq8v04jfmli-module-import-compiled.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/zl//mj31wzwc9zr5x2jcjlbcq8v04jfmli-module-import-compiled.drv.bz2
  4410. @ build-succeeded /tmp/guix-tests/store/zlmj31wzwc9zr5x2jcjlbcq8v04jfmli-module-import-compiled.drv -
  4411. @ build-started /tmp/guix-tests/store/vpkk5ncdij2jxrq5rzbkanigs8ykfzvb-profile.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/vp//kk5ncdij2jxrq5rzbkanigs8ykfzvb-profile.drv.bz2
  4412. @ build-succeeded /tmp/guix-tests/store/vpkk5ncdij2jxrq5rzbkanigs8ykfzvb-profile.drv -
  4413.        (arguments
  4414. +                  `(#:guile
  4415. +                    ,%bootstrap-guile
  4416. +                    #:modules
  4417. +                    ((guix build utils))
  4418. +                    #:builder
  4419. +                    (begin
  4420. +                      (use-modules (guix build utils))
  4421. +                      (let ((out (assoc-ref %outputs "out")))
  4422. +                        (mkdir-p (string-append out "/xml/bar/baz"))
  4423. +                        (call-with-output-file
  4424. +                          (string-append out "/xml/bar/baz/catalog.xml")
  4425. +                          (lambda (port) (display "xml? wat?!" port)))))))
  4426. +                (synopsis #f)
  4427. +                (description #f)
  4428. +                (home-page #f)
  4429. +                (license #f)))
  4430. +          (p2 (package
  4431. +                (name "libxml2")
  4432. +                (version "0.0.0")
  4433. +                (source #f)
  4434. +                (build-system trivial-build-system)
  4435. +                (arguments
  4436. +                  `(#:guile
  4437. +                    ,%bootstrap-guile
  4438. +                    #:builder
  4439. +                    (mkdir (assoc-ref %outputs "out"))))
  4440. +                (native-search-paths
  4441. +                  (package-native-search-paths libxml2))
  4442. +                (synopsis #f)
  4443. +                (description #f)
  4444. +                (home-page #f)
  4445. +                (license #f)))
  4446. +          (prof (run-with-store
  4447. +                  %store
  4448. +                  (profile-derivation
  4449. +                    (manifest
  4450. +                      (map package->manifest-entry (list p1 p2)))
  4451. +                    #:hooks
  4452. +                    '()
  4453. +                    #:locales?
  4454. +                    #f)
  4455. +                  #:guile-for-build
  4456. +                  (%guile-for-build))))
  4457. +     (build-derivations %store (list prof))
  4458. +     (string-match
  4459. +       (format
  4460. +         #f
  4461. +         "^export XML_CATALOG_FILES=\"~a/xml/+bar/baz/catalog\\.xml\"\n"
  4462. +         (regexp-quote (derivation->output-path prof)))
  4463. +       (with-output-to-string
  4464. +         (lambda ()
  4465. +           (guix-package
  4466. +             "-p"
  4467. +             (derivation->output-path prof)
  4468. +             "--search-paths"))))))
  4469. actual-value: #("export XML_CATALOG_FILES=\"/tmp/guix-tests/store/xfvb2php359331lx0yvs40csll9rag95-profile/xml/bar/baz/catalog.xml\"\n" (0 . 114))
  4470. result: PASS
  4471.  
  4472. test-name: --search-paths with single-item search path
  4473. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:1020
  4474. source:
  4475. + (test-assert
  4476. +   "--search-paths with single-item search path"
  4477. +   (let* ((p1 (dummy-package
  4478. +                "foo"
  4479. +                (build-system trivial-build-system)
  4480. +                (arguments
  4481. +                  `(#:guile
  4482. +                    ,%bootstrap-guile
  4483. +                    #:modules
  4484. +                    ((guix build utils))
  4485. +                    #:builder
  4486. +                    (begin
  4487. +                      (use-modules (guix build utils))
  4488. +                      (let ((out (assoc-ref %outputs "out")))
  4489. +                        (mkdir-p (string-append out "/etc/ssl/certs"))
  4490. +                        (call-with-output-file
  4491. +                          (string-append
  4492. +                            out
  4493. +                            "/etc/ssl/certs/ca-certificates.crt")
  4494. +                          (const #t))))))))
  4495. +          (p2 (package (inherit p1) (name "bar")))
  4496. +          (p3 (dummy-package
  4497. +                "git"
  4498. +                (build-system trivial-build-system)
  4499. +                (arguments
  4500. +                  `(#:guile
  4501. +                    ,%bootstrap-guile
  4502. +                    #:builder
  4503. +                    (mkdir (assoc-ref %outputs "out"))))
  4504. +                (native-search-paths
  4505. +                  (package-native-search-paths git))))
  4506. +          (prof1 (run-with-store
  4507. +                   %store
  4508. +                   (profile-derivation
  4509. +                     (packages->manifest (list p1 p3))
  4510. +                     #:hooks
  4511. +                     '()
  4512. +                     #:locales?
  4513. +                     #f)
  4514. +                   #:guile-for-build
  4515. +                   (%guile-for-build)))
  4516. +          (prof2 (run-with-store
  4517. +                   %store
  4518. +         @ build-started /tmp/guix-tests/store/z037c1pxr6gd46nxgv66r14x3bvmacc6-bar-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/z0//37c1pxr6gd46nxgv66r14x3bvmacc6-bar-0.drv.bz2
  4519. @ build-succeeded /tmp/guix-tests/store/z037c1pxr6gd46nxgv66r14x3bvmacc6-bar-0.drv -
  4520. @ build-started /tmp/guix-tests/store/rvhc8kmr5b52q16m0cmhlm321sy7cczb-foo-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/rv//hc8kmr5b52q16m0cmhlm321sy7cczb-foo-0.drv.bz2
  4521. @ build-succeeded /tmp/guix-tests/store/rvhc8kmr5b52q16m0cmhlm321sy7cczb-foo-0.drv -
  4522. @ build-started /tmp/guix-tests/store/ilbcggmc6x2s6gffll2k7b1ryyvr0p3j-git-0.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/il//bcggmc6x2s6gffll2k7b1ryyvr0p3j-git-0.drv.bz2
  4523. @ build-succeeded /tmp/guix-tests/store/ilbcggmc6x2s6gffll2k7b1ryyvr0p3j-git-0.drv -
  4524. @ build-started /tmp/guix-tests/store/6dls0qzhbnza3g7f93p1a612dqkr76hz-profile.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/6d//ls0qzhbnza3g7f93p1a612dqkr76hz-profile.drv.bz2
  4525. @ build-succeeded /tmp/guix-tests/store/6dls0qzhbnza3g7f93p1a612dqkr76hz-profile.drv -
  4526. @ build-started /tmp/guix-tests/store/wlbck30fx0hyrvw6w83fn0a3y2rc0gbp-profile.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/wl//bck30fx0hyrvw6w83fn0a3y2rc0gbp-profile.drv.bz2
  4527. @ build-succeeded /tmp/guix-tests/store/wlbck30fx0hyrvw6w83fn0a3y2rc0gbp-profile.drv -
  4528. error: this-package-does-not-exist: unknown package
  4529.           (profile-derivation
  4530. +                     (packages->manifest (list p2 p3))
  4531. +                     #:hooks
  4532. +                     '()
  4533. +                     #:locales?
  4534. +                     #f)
  4535. +                   #:guile-for-build
  4536. +                   (%guile-for-build))))
  4537. +     (build-derivations %store (list prof1 prof2))
  4538. +     (string-match
  4539. +       (format
  4540. +         #f
  4541. +         "^export GIT_SSL_CAINFO=\"~a/etc/ssl/certs/ca-certificates.crt"
  4542. +         (regexp-quote (derivation->output-path prof1)))
  4543. +       (with-output-to-string
  4544. +         (lambda ()
  4545. +           (guix-package
  4546. +             "-p"
  4547. +             (derivation->output-path prof1)
  4548. +             "-p"
  4549. +             (derivation->output-path prof2)
  4550. +             "--search-paths"))))))
  4551. actual-value: #("export GIT_SSL_CAINFO=\"/tmp/guix-tests/store/gvd1ajkzd5yvzqs3z4cdqixk2gll8245-profile/etc/ssl/certs/ca-certificates.crt\"\n" (0 . 119))
  4552. result: PASS
  4553.  
  4554. test-name: specification->package when not found
  4555. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/packages.scm:1066
  4556. source:
  4557. + (test-equal
  4558. +   "specification->package when not found"
  4559. +   'quit
  4560. +   (catch 'quit
  4561. +          (lambda ()
  4562. +            (specification->package
  4563. +              "this-package-does-not-exist"))
  4564. +          (lambda (key . args) key)))
  4565. expected-value: quit
  4566. actual-value: quit
  4567. result: PASS
  4568.  
  4569.  
  4570. SKIP: tests/snix
  4571. ================
  4572.  
  4573. test-name: factorize-uri
  4574. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/snix.scm:36
  4575. source:
  4576. + (test-assert
  4577. +   "factorize-uri"
  4578. +   (every?
  4579. +     (match-lambda
  4580. +       ((uri version '-> expected)
  4581. +        (equal? (factorize-uri uri version) expected)))
  4582. +     '(("http://example.com/foo.tgz"
  4583. +        "1.0"
  4584. +        ->
  4585. +        "http://example.com/foo.tgz")
  4586. +       ("http://example.com/foo-2.8.tgz"
  4587. +        "2.8"
  4588. +        ->
  4589. +        ("http://example.com/foo-" version ".tgz"))
  4590. +       ("http://example.com/2.8/foo-2.8.tgz"
  4591. +        "2.8"
  4592. +        ->
  4593. +        ("http://example.com/"
  4594. +         version
  4595. +         "/foo-"
  4596. +         version
  4597. +         ".tgz")))))
  4598. actual-value: #t
  4599. result: PASS
  4600.  
  4601. test-name: nixpkgs->guix-package
  4602. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/snix.scm:54
  4603. source:
  4604. + (test-assert
  4605. +   "nixpkgs->guix-package"
  4606. +   (match (nixpkgs->guix-package
  4607. +            %nixpkgs-directory
  4608. +            "guile")
  4609. +          (('package
  4610. +            ('name "guile")
  4611. +            ('version (? string?))
  4612. +            ('source ('origin _ ...))
  4613. +            ('build-system _)
  4614. +            ('inputs ('quasiquote (inputs ...)))
  4615. +            ('propagated-inputs ('quasiquote (pinputs ...)))
  4616. +            ('home-page (? string?))
  4617. +            ('synopsis (? string?))
  4618. +            ('description (? string?))
  4619. +            ('license (? symbol?)))
  4620. +           (and (member '("libffi" ,libffi) inputs)
  4621. +                (member '("gmp" ,gmp) pinputs)
  4622. +                #t))
  4623. +          (x (pk 'fail x #f))))
  4624. result: SKIP
  4625.  
  4626.  
  4627. FAIL: tests/store
  4628. =================
  4629.  
  4630. test-name: open-connection with file:// URI
  4631. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:51
  4632. source:
  4633. + (test-assert
  4634. +   "open-connection with file:// URI"
  4635. +   (let ((store (open-connection
  4636. +                  (string-append "file://" (%daemon-socket-uri)))))
  4637. +     (and (add-text-to-store store "foo" "bar")
  4638. +          (begin (close-connection store) #t))))
  4639. actual-value: #t
  4640. result: PASS
  4641.  
  4642. test-name: connection handshake error
  4643. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:59
  4644. source:
  4645. + (test-equal
  4646. +   "connection handshake error"
  4647. +   EPROTO
  4648. +   (let ((port (%make-void-port "rw")))
  4649. +     (guard (c ((nix-connection-error? c)
  4650. +                (and (eq? port (nix-connection-error-file c))
  4651. +                     (nix-connection-error-code c))))
  4652. +            (open-connection #f #:port port)
  4653. +            'broken)))
  4654. expected-value: 71
  4655. actual-value: 71
  4656. result: PASS
  4657.  
  4658. test-name: store-path-hash-part
  4659. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:68
  4660. source:
  4661. + (test-equal
  4662. +   "store-path-hash-part"
  4663. +   "283gqy39v3g9dxjy26rynl0zls82fmcg"
  4664. +   (store-path-hash-part
  4665. +     (string-append
  4666. +       (%store-prefix)
  4667. +       "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
  4668. expected-value: "283gqy39v3g9dxjy26rynl0zls82fmcg"
  4669. actual-value: "283gqy39v3g9dxjy26rynl0zls82fmcg"
  4670. result: PASS
  4671.  
  4672. test-name: store-path-hash-part #f
  4673. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:74
  4674. source:
  4675. + (test-equal
  4676. +   "store-path-hash-part #f"
  4677. +   #f
  4678. +   (store-path-hash-part
  4679. +     (string-append
  4680. +       (%store-prefix)
  4681. +       "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
  4682. expected-value: #f
  4683. actual-value: #f
  4684. result: PASS
  4685.  
  4686. test-name: store-path-package-name
  4687. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:80
  4688. source:
  4689. + (test-equal
  4690. +   "store-path-package-name"
  4691. +   "guile-2.0.7"
  4692. +   (store-path-package-name
  4693. +     (string-append
  4694. +       (%store-prefix)
  4695. +       "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
  4696. expected-value: "guile-2.0.7"
  4697. actual-value: "guile-2.0.7"
  4698. result: PASS
  4699.  
  4700. test-name: store-path-package-name #f
  4701. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:86
  4702. source:
  4703. + (test-equal
  4704. +   "store-path-package-name #f"
  4705. +   #f
  4706. +   (store-path-package-name
  4707. +     "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))
  4708. expected-value: #f
  4709. actual-value: #f
  4710. result: PASS
  4711.  
  4712. test-name: direct-store-path?
  4713. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:91
  4714. source:
  4715. + (test-assert
  4716. +   "direct-store-path?"
  4717. +   (and (direct-store-path?
  4718. +          (string-append
  4719. +            (%store-prefix)
  4720. +            "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))
  4721. +        (not (direct-store-path?
  4722. +               (string-append
  4723. +                 (%store-prefix)
  4724. +                 "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile")))
  4725. +        (not (direct-store-path? (%store-prefix)))))
  4726. actual-value: #t
  4727. result: PASS
  4728.  
  4729. test-name: add-data-to-store
  4730. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:103
  4731. source:
  4732. + (test-equal
  4733. +   "add-data-to-store"
  4734. +   #vu8(1 2 3 4 5)
  4735. +   (call-with-input-file
  4736. +     (add-data-to-store %store "data" #vu8(1 2 3 4 5))
  4737. +     get-bytevector-all))
  4738. expected-value: #vu8(1 2 3 4 5)
  4739. actual-value: #vu8(1 2 3 4 5)
  4740. result: PASS
  4741.  
  4742. test-name: valid-path? live
  4743. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:108
  4744. source:
  4745. + (test-assert
  4746. +   "valid-path? live"
  4747. +   (let ((p (add-text-to-store %store "hello" "hello, world")))
  4748. +     (valid-path? %store p)))
  4749. actual-value: #t
  4750. result: PASS
  4751.  
  4752. test-name: valid-path? false
  4753. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:112
  4754. source:
  4755. + (test-assert
  4756. +   "valid-path? false"
  4757. +   (not (valid-path?
  4758. +          %store
  4759. +          (string-append
  4760. +            (%store-prefix)
  4761. +            "/"
  4762. +            (make-string 32 #\e)
  4763. +            "-foobar"))))
  4764. actual-value: #t
  4765. result: PASS
  4766.  
  4767. test-name: valid-path? error
  4768. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:117
  4769. source:
  4770. + (test-assert
  4771. +   "valid-path? error"
  4772. +   (with-store
  4773. +     s
  4774. +     (random seed for tests: 1495495557
  4775. finding garbage collector roots...
  4776. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/12718'
  4777. determining live/dead paths...
  4778. finding garbage collector roots...
  4779. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/.fuse_hidden0001096600002605'
  4780. determining live/dead paths...
  4781. finding garbage collector roots...
  4782. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/.fuse_hidden0001096600002607'
  4783. determining live/dead paths...
  4784. finding garbage collector roots...
  4785. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/.fuse_hidden0001096600002608'
  4786. deleting unused links...
  4787. finding garbage collector roots...
  4788. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/12747'
  4789. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/.fuse_hidden000109660000260a'
  4790. deleting `/tmp/guix-tests/store/82kp2v2zf1mr8ay3pm6nnkc1537fz8qr-delete-me'
  4791. deleting `/tmp/guix-tests/store/trash'
  4792. deleting unused links...
  4793. note: currently hard linking saves 0.61 MiB
  4794. finding garbage collector roots...
  4795. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/12754'
  4796. removing stale temporary roots file `/tmp/guix-tests/var/12700/temproots/.fuse_hidden000109660000260d'
  4797. deleting `/tmp/guix-tests/store/a27v317kpgsn1k82vnqhn02s9hjqwg5f-delete-me'
  4798. deleting `/tmp/guix-tests/store/trash'
  4799. deleting unused links...
  4800. note: currently hard linking saves 0.61 MiB
  4801. guard (c ((nix-protocol-error? c) #t))
  4802. +            (valid-path? s "foo")
  4803. +            #f)))
  4804. actual-value: #t
  4805. result: PASS
  4806.  
  4807. test-name: valid-path? recovery
  4808. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:123
  4809. source:
  4810. + (test-assert
  4811. +   "valid-path? recovery"
  4812. +   (with-store
  4813. +     s
  4814. +     (let-syntax ((true-if-error
  4815. +                    (syntax-rules ()
  4816. +                      ((_ exp)
  4817. +                       (guard (c ((nix-protocol-error? c) #t)) exp #f)))))
  4818. +       (and (true-if-error (valid-path? s "foo"))
  4819. +            (true-if-error (valid-path? s "bar"))
  4820. +            (true-if-error (valid-path? s "baz"))
  4821. +            (true-if-error (valid-path? s "chbouib"))
  4822. +            (valid-path?
  4823. +              s
  4824. +              (add-text-to-store s "valid" "yeah"))))))
  4825. actual-value: #t
  4826. result: PASS
  4827.  
  4828. test-name: hash-part->path
  4829. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:140
  4830. source:
  4831. + (test-assert
  4832. +   "hash-part->path"
  4833. +   (let ((p (add-text-to-store %store "hello" "hello, world")))
  4834. +     (equal?
  4835. +       (hash-part->path %store (store-path-hash-part p))
  4836. +       p)))
  4837. actual-value: #t
  4838. result: PASS
  4839.  
  4840. test-name: dead-paths
  4841. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:145
  4842. source:
  4843. + (test-assert
  4844. +   "dead-paths"
  4845. +   (let ((p (add-text-to-store
  4846. +              %store
  4847. +              "random-text"
  4848. +              (random-text))))
  4849. +     (->bool (member p (dead-paths %store)))))
  4850. actual-value: #t
  4851. result: PASS
  4852.  
  4853. test-name: permanent root
  4854. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:166
  4855. source:
  4856. + (test-assert
  4857. +   "permanent root"
  4858. +   (let* ((p (with-store
  4859. +               store
  4860. +               (let ((p (add-text-to-store
  4861. +                          store
  4862. +                          "random-text"
  4863. +                          (random-text))))
  4864. +                 (add-permanent-root p)
  4865. +                 (add-permanent-root p)
  4866. +                 p))))
  4867. +     (and (member p (live-paths %store))
  4868. +          (begin
  4869. +            (remove-permanent-root p)
  4870. +            (->bool (member p (dead-paths %store)))))))
  4871. actual-value: #t
  4872. result: PASS
  4873.  
  4874. test-name: dead path can be explicitly collected
  4875. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:178
  4876. source:
  4877. + (test-assert
  4878. +   "dead path can be explicitly collected"
  4879. +   (let ((p (add-text-to-store
  4880. +              %store
  4881. +              "random-text"
  4882. +              (random-text)
  4883. +              '())))
  4884. +     (let-values
  4885. +       (((paths freed) (delete-paths %store (list p))))
  4886. +       (and (equal? paths (list p))
  4887. +            (> freed 0)
  4888. +            (not (file-exists? p))))))
  4889. actual-value: #f
  4890. result: FAIL
  4891.  
  4892. test-name: add-text-to-store vs. delete-paths
  4893. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:186
  4894. source:
  4895. + (test-assert
  4896. +   "add-text-to-store vs. delete-paths"
  4897. +   (with-store
  4898. +     store
  4899. +     (let* ((text (random-text))
  4900. +            (path (add-text-to-store store "delete-me" text))
  4901. +            (deleted (delete-paths store (list path)))
  4902. +            (path2 (add-text-to-store store "delete-me" text)))
  4903. +       (and (string=? path path2)
  4904. +            (equal? deleted (list path))
  4905. +            (valid-path? store path)
  4906. +            (file-exists? path)))))
  4907. actual-value: #t
  4908. result: PASS
  4909.  
  4910. test-name: add-to-store vs. delete-paths
  4911. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:199
  4912. source:
  4913. + (test-assert
  4914. +   "add-to-store vs. delete-paths"
  4915. +   (with-store
  4916. +     store
  4917. +     (let* ((file (search-path %load-path "guix.scm"))
  4918. +            (path (add-to-store store "delete-me" #t "sha256" file))
  4919. +            (deleted (delete-paths store (list path)))
  4920. +            (path2 (add-to-store store "delete-me" #t "sha256" file)))
  4921. +       (and (string=? path path2)
  4922. +            (equal? deleted (list path))
  4923. +            (valid-path? store path)
  4924. +            (file-exists? path)))))
  4925. actual-value: #t
  4926. result: PASS
  4927.  
  4928. test-name: references
  4929. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:211
  4930. source:
  4931. + (test-assert
  4932. +   "references"
  4933. +   (let* ((t1 (add-text-to-store
  4934. +                %store
  4935. +         substitute: warning: authentication and authorization of substitutes disabled!
  4936. substitute: guix substitute: warning: ACL for archive imports seems to be uninitialized, substitutes may be unavailable
  4937.        "random1"
  4938. +                (random-text)))
  4939. +          (t2 (add-text-to-store
  4940. +                %store
  4941. +                "random2"
  4942. +                (random-text)
  4943. +                (list t1))))
  4944. +     (and (equal? (list t1) (references %store t2))
  4945. +          (equal? (list t2) (referrers %store t1))
  4946. +          (null? (references %store t1))
  4947. +          (null? (referrers %store t2)))))
  4948. actual-value: #t
  4949. result: PASS
  4950.  
  4951. test-name: references/substitutes missing reference info
  4952. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:221
  4953. source:
  4954. + (test-assert
  4955. +   "references/substitutes missing reference info"
  4956. +   (with-store
  4957. +     s
  4958. +     (set-build-options s #:use-substitutes? #f)
  4959. +     (guard (c ((nix-protocol-error? c) #t))
  4960. +            (let* ((b (add-to-store
  4961. +                        s
  4962. +                        "bash"
  4963. +                        #t
  4964. +                        "sha256"
  4965. +                        (search-bootstrap-binary
  4966. +                          "bash"
  4967. +                          (%current-system))))
  4968. +                   (d (derivation
  4969. +                        s
  4970. +                        "the-thing"
  4971. +                        b
  4972. +                        '("--help")
  4973. +                        #:inputs
  4974. +                        `((,b)))))
  4975. +              (references/substitutes
  4976. +                s
  4977. +                (list (derivation->output-path d) b))
  4978. +              #f))))
  4979. actual-value: #t
  4980. result: PASS
  4981.  
  4982. test-name: references/substitutes with substitute info
  4983. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:233
  4984. source:
  4985. + (test-assert
  4986. +   "references/substitutes with substitute info"
  4987. +   (with-store
  4988. +     s
  4989. +     (set-build-options s #:use-substitutes? #t)
  4990. +     (let* ((t1 (add-text-to-store s "random1" (random-text)))
  4991. +            (t2 (add-text-to-store
  4992. +                  s
  4993. +                  "random2"
  4994. +                  (random-text)
  4995. +                  (list t1)))
  4996. +            (t3 (add-text-to-store
  4997. +                  s
  4998. +                  "build"
  4999. +                  "echo -n $t2 > $out"))
  5000. +            (b (add-to-store
  5001. +                 s
  5002. +                 "bash"
  5003. +                 #t
  5004. +                 "sha256"
  5005. +                 (search-bootstrap-binary
  5006. +                   "bash"
  5007. +                   (%current-system))))
  5008. +            (d (derivation
  5009. +                 s
  5010. +                 "the-thing"
  5011. +                 b
  5012. +                 `("-e" ,t3)
  5013. +                 #:inputs
  5014. +                 `((,b) (,t3) (,t2))
  5015. +                 #:env-vars
  5016. +                 `(("t2" unquote t2))))
  5017. +            (o (derivation->output-path d)))
  5018. +       (with-derivation-narinfo
  5019. +         d
  5020. +         (sha256 => (sha256 (string->utf8 t2)))
  5021. +         (references => (list t2))
  5022. +         (equal?
  5023. +           (references/substitutes s (list o t3 t2 t1))
  5024. +           `((,t2) () (,t1) ()))))))
  5025. actual-value: #t
  5026. result: PASS
  5027.  
  5028. test-name: substitutable-path-info when substitutes are turned off
  5029. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:257
  5030. source:
  5031. + (test-equal
  5032. +   "substitutable-path-info when substitutes are turned off"
  5033. +   '()
  5034. +   (with-store
  5035. +     s
  5036. +     (set-build-options s #:use-substitutes? #f)
  5037. +     (let* ((b (add-to-store
  5038. +                 s
  5039. +                 "bash"
  5040. +                 #t
  5041. +                 "sha256"
  5042. +                 (search-bootstrap-binary
  5043. +                   "bash"
  5044. +                   (%current-system))))
  5045. +            (d (derivation
  5046. +                 s
  5047. +                 "the-thing"
  5048. +                 b
  5049. +                 '("--version")
  5050. +                 #:inputs
  5051. +                 `((,b))))
  5052. +            (o (derivation->output-path d)))
  5053. +       (with-derivation-narinfo
  5054. +         d
  5055. +         (substitutable-path-info s (list o))))))
  5056. expected-value: ()
  5057. actual-value: ()
  5058. result: PASS
  5059.  
  5060. test-name: substitutable-paths when substitutes are turned off
  5061. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:270
  5062. source:
  5063. + (test-equal
  5064. +   "substitutable-paths when substitutes are turned off"
  5065. +   '()
  5066. +   (with-store
  5067. +     s
  5068. +     (set-build-options s #:use-substitutes? #f)
  5069. +     (let* ((b (@ build-started /tmp/guix-tests/store/s25yp6rixfdjv9z2zpb1wg405qy3yif1-the-thing.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/s2//5yp6rixfdjv9z2zpb1wg405qy3yif1-the-thing.drv.bz2
  5070. @ build-succeeded /tmp/guix-tests/store/s25yp6rixfdjv9z2zpb1wg405qy3yif1-the-thing.drv -
  5071. add-to-store
  5072. +                 s
  5073. +                 "bash"
  5074. +                 #t
  5075. +                 "sha256"
  5076. +                 (search-bootstrap-binary
  5077. +                   "bash"
  5078. +                   (%current-system))))
  5079. +            (d (derivation
  5080. +                 s
  5081. +                 "the-thing"
  5082. +                 b
  5083. +                 '("--version")
  5084. +                 #:inputs
  5085. +                 `((,b))))
  5086. +            (o (derivation->output-path d)))
  5087. +       (with-derivation-narinfo
  5088. +         d
  5089. +         (substitutable-paths s (list o))))))
  5090. expected-value: ()
  5091. actual-value: ()
  5092. result: PASS
  5093.  
  5094. test-name: requisites
  5095. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:283
  5096. source:
  5097. + (test-assert
  5098. +   "requisites"
  5099. +   (let* ((t1 (add-text-to-store
  5100. +                %store
  5101. +                "random1"
  5102. +                (random-text)
  5103. +                '()))
  5104. +          (t2 (add-text-to-store
  5105. +                %store
  5106. +                "random2"
  5107. +                (random-text)
  5108. +                (list t1)))
  5109. +          (t3 (add-text-to-store
  5110. +                %store
  5111. +                "random3"
  5112. +                (random-text)
  5113. +                (list t2)))
  5114. +          (t4 (add-text-to-store
  5115. +                %store
  5116. +                "random4"
  5117. +                (random-text)
  5118. +                (list t1 t3))))
  5119. +     (define (same? x y)
  5120. +       (and (= (length x) (length y))
  5121. +            (lset= equal? x y)))
  5122. +     (and (same? (requisites %store (list t1)) (list t1))
  5123. +          (same? (requisites %store (list t2))
  5124. +                 (list t1 t2))
  5125. +          (same? (requisites %store (list t3))
  5126. +                 (list t1 t2 t3))
  5127. +          (same? (requisites %store (list t4))
  5128. +                 (list t1 t2 t3 t4))
  5129. +          (same? (requisites %store (list t1 t2 t3 t4))
  5130. +                 (list t1 t2 t3 t4)))))
  5131. actual-value: #t
  5132. result: PASS
  5133.  
  5134. test-name: derivers
  5135. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:303
  5136. source:
  5137. + (test-assert
  5138. +   "derivers"
  5139. +   (let* ((b (add-text-to-store
  5140. +               %store
  5141. +               "build"
  5142. +               "echo $foo > $out"
  5143. +               '()))
  5144. +          (s (add-to-store
  5145. +               %store
  5146. +               "bash"
  5147. +               #t
  5148. +               "sha256"
  5149. +               (search-bootstrap-binary
  5150. +                 "bash"
  5151. +                 (%current-system))))
  5152. +          (d (derivation
  5153. +               %store
  5154. +               "the-thing"
  5155. +               s
  5156. +               `("-e" ,b)
  5157. +               #:env-vars
  5158. +               `(("foo" unquote (random-text)))
  5159. +               #:inputs
  5160. +               `((,b) (,s))))
  5161. +          (o (derivation->output-path d)))
  5162. +     (and (build-derivations %store (list d))
  5163. +          (equal?
  5164. +            (query-derivation-outputs
  5165. +              %store
  5166. +              (derivation-file-name d))
  5167. +            (list o))
  5168. +          (equal?
  5169. +            (valid-derivers %store o)
  5170. +            (list (derivation-file-name d))))))
  5171. actual-value: #t
  5172. result: PASS
  5173.  
  5174. test-name: topologically-sorted, one item
  5175. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:319
  5176. source:
  5177. + (test-assert
  5178. +   "topologically-sorted, one item"
  5179. +   (let* ((a (add-text-to-store %store "a" "a"))
  5180. +          (b (add-text-to-store %store "b" "b" (list a)))
  5181. +          (c (add-text-to-store %store "c" "c" (list b)))
  5182. +          (d (add-text-to-store %store "d" "d" (list c)))
  5183. +          (s (topologically-sorted %store (list d))))
  5184. +     (equal? s (list a b c d))))
  5185. actual-value: #t
  5186. result: PASS
  5187.  
  5188. test-name: topologically-sorted, several items
  5189. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:327
  5190. source:
  5191. + (test-assert
  5192. +   "topologically-sorted, several items"
  5193. +   (let* ((a (add-text-to-store %store "a" "a"))
  5194. +          (b (add-text-to-store %store "b" "b" (list a)))
  5195. +          (c (add-text-to-store %store "c" "c" (list b)))
  5196. +          (d (add-text-to-store %store "d" "d" (list c)))
  5197. +          (s1 (topologically-sorted %store (list d a c b)))
  5198. +          (s2 (topologically-sorted %store (list b d c a b d))))
  5199. +     (equal? s1 s2 (list a b c d))))
  5200. actual-value: #t
  5201. result: PASS
  5202.  
  5203. test-name: topologically-sorted, more difficult
  5204. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:336
  5205. source:
  5206. + (test-assert
  5207. +   "topologically-sorted, more difficult"
  5208. +   (let* ((a (add-text-to-store %store "a" "a"))
  5209. +          (b (add-text-to-store %store "b" "b" (list a)))
  5210. +          (c (add-text-to-store %store "c" "c" (list b)))
  5211. +          (d (add-text-to-store %store "d" "d" (list c)))
  5212. +          (w (add-text-to-store %store "w" "w"))
  5213. +          (x (add-text-to-store %store "x" "x" (list w)))
  5214. +          (y (add-text-to-store %store "y" "y" (list x d)))
  5215. +          (s1 (topologically-sorted %store (list y)))
  5216. +          (s2 (topologically-sorted %store (list c y)))
  5217. +          (s3 (topologically-sorted
  5218. +                %store
  5219. +                (cons y (references %store y)))))
  5220. +     (let* ((x-then-d?
  5221. +              (equal? (references %store y) (list x d))))
  5222. +       (and (equal?
  5223. +              s1
  5224. +              (if x-then-d?
  5225. +                (list w x a b c d y)
  5226. +                (list a b c d w x y)))
  5227. +            (equal?
  5228. +              s2
  5229. +              (if x-then-d?
  5230. +                (list a b c w x d y)
  5231. +                (list a b c d w x y)))
  5232. +            (lset= string=? s1 s3)))))
  5233. actual-value: #t
  5234. result: PASS
  5235.  
  5236. test-name: current-build-output-port, UTF-8
  5237. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:360
  5238. source:
  5239. + (test-assert
  5240. +   "current-build-output-port, UTF-8"
  5241. +   (string-contains
  5242. +     (with-fluids
  5243. +       ((%default-port-encoding "UTF-8"))
  5244. +       (call-with-output-string
  5245. +         (lambda (port)
  5246. +           (parameterize
  5247. +             ((current-build-output-port port))
  5248. +             (let* ((s "Here’s a Greek letter: λ.")
  5249. +                    (d (build-expression->derivation
  5250. +                         %store
  5251. +                         "foo"
  5252. +                         `(display ,s)
  5253. +                         #:guile-for-build
  5254. +                         (package-derivation
  5255. +                           s
  5256. +                           %bootstrap-guile
  5257. +                           (%current-system)))))
  5258. +               (guard (c ((nix-protocol-error? c) #t))
  5259. +                      (build-derivations %store (list d))))))))
  5260. +     "Here’s a Greek letter: λ."))
  5261. actual-value: 175
  5262. result: PASS
  5263.  
  5264. test-name: current-build-output-port, UTF-8 + garbage
  5265. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:376
  5266. source:
  5267. + (test-assert
  5268. +   "current-build-output-port, UTF-8 + garbage"
  5269. +   (string-contains
  5270. +     (with-fluids
  5271. +       ((%default-port-encoding "UTF-8"))
  5272. +       (call-with-output-string
  5273. +         (lambda (port)
  5274. +           (parameterize
  5275. +             ((current-build-output-port port))
  5276. +             (let ((d (build-expression->derivation
  5277. +                        %store
  5278. +                        "foo"
  5279. +                        `(begin
  5280. +                           (use-modules (rnrs io ports))
  5281. +                           (display "garbage: ")
  5282. +                           (put-bytevector (current-output-port) #vu8(128))
  5283. +                           (display "lambda: λ\n"))
  5284. +                        #:guile-for-build
  5285. +                        (package-derivation %store %bootstrap-guile))))
  5286. +               (guard (c ((nix-protocol-error? c) #t))
  5287. +                      (build-derivations %store (list d))))))))
  5288. +     (cond-expand
  5289. +       (guile-2.2 "garbage: �lambda: λ")
  5290. +       (else "garbage: ?lambda: λ"))))
  5291. actual-value: 175
  5292. result: PASS
  5293.  
  5294. test-name: log-file, derivation
  5295. location: /tmp/guix-build-guix-0.13.0.drv-0/source/tests/store.scm:398
  5296. source:
  5297. + (test-assert
  5298. +   "log-file, derivation"
  5299. +   (let* ((b (add-text-to-store
  5300. +               %store
  5301. +               "build"
  5302. +               "echo $foo > $out"
  5303. +               '()))
  5304. +          (s (add-to-store
  5305. +               %store
  5306. +               "bash"
  5307. +               #t
  5308. +               "sha256"
  5309. +               (search-bootstrap-binary
  5310. +                 "bash"
  5311. +                 (%current-system))))
  5312. +          (d (derivation
  5313. +               %store
  5314. +               "the-thing"
  5315. +               s
  5316. +               `("-e" ,b)
  5317. +               #:env-vars
  5318. + @ build-started /tmp/guix-tests/store/w1yzgwcpadkcrm6k9drqvnzzrpcnzk68-the-thing.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/w1//yzgwcpadkcrm6k9drqvnzzrpcnzk68-the-thing.drv.bz2
  5319. @ build-succeeded /tmp/guix-tests/store/w1yzgwcpadkcrm6k9drqvnzzrpcnzk68-the-thing.drv -
  5320. @ build-started /tmp/guix-tests/store/qnbzlzx0fqiy6cz1si00k6cwl98sy024-the-thing.drv - x86_64-linux /tmp/guix-tests/var/log/guix/drvs/qn//bzlzx0fqiy6cz1si00k6cwl98sy024-the-thing.drv.bz2
  5321. @ build-succeeded /tmp/guix-tests/store/qnbzlzx0fqiy6cz1si00k6cwl98sy024-the-thing.drv -
  5322.               `(("foo" unquote (random-text)))
  5323. +               #:inputs
  5324. +               `((,b) (,s)))))
  5325. +     (and (build-derivations %store (list d))
  5326. +          (file-exists?
  5327. <