%%%% Starting test store Group begin: store Test begin: test-name: "store-path-hash-part" source-file: "tests/store.scm" source-line: 58 source-form: (test-equal "store-path-hash-part" "283gqy39v3g9dxjy26rynl0zls82fmcg" (store-path-hash-part (string-append (%store-prefix) "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))) Test end: result-kind: pass actual-value: "283gqy39v3g9dxjy26rynl0zls82fmcg" expected-value: "283gqy39v3g9dxjy26rynl0zls82fmcg" Test begin: test-name: "store-path-hash-part #f" source-file: "tests/store.scm" source-line: 64 source-form: (test-equal "store-path-hash-part #f" #f (store-path-hash-part (string-append (%store-prefix) "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))) Test end: result-kind: pass actual-value: #f expected-value: #f Test begin: test-name: "store-path-package-name" source-file: "tests/store.scm" source-line: 70 source-form: (test-equal "store-path-package-name" "guile-2.0.7" (store-path-package-name (string-append (%store-prefix) "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7"))) Test end: result-kind: pass actual-value: "guile-2.0.7" expected-value: "guile-2.0.7" Test begin: test-name: "store-path-package-name #f" source-file: "tests/store.scm" source-line: 76 source-form: (test-equal "store-path-package-name #f" #f (store-path-package-name "/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")) Test end: result-kind: pass actual-value: #f expected-value: #f Test begin: test-name: "direct-store-path?" source-file: "tests/store.scm" source-line: 81 source-form: (test-assert "direct-store-path?" (and (direct-store-path? (string-append (%store-prefix) "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")) (not (direct-store-path? (string-append (%store-prefix) "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile"))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "dead-paths" source-file: "tests/store.scm" source-line: 92 source-form: (test-assert "dead-paths" (let ((p (add-text-to-store %store "random-text" (random-text)))) (member p (dead-paths %store)))) Test end: result-kind: pass actual-value: ("/home/tester/guix-MASTER/test-tmp/store/w3lm187yqxlsjimi64f34bb4lnv0vp2v-random-text" "/home/tester/guix-MASTER/test-tmp/store/w3sfzi4jvfq2lyfvprda6m54cpd3qqiq-glib-2.39.1.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/w4q41l59sinsm7hp5jb7w0sdz4djnidh-lcms2-2.4.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/w6l6kp8lpyz7s1a1ca77avhv6za4jvn2-the-thing" "/home/tester/guix-MASTER/test-tmp/store/w7af7wy7r70f62jlk4ljig1k83rd65y3-the-thing" "/home/tester/guix-MASTER/test-tmp/store/w82zswk2gvp62lp1n82x6yq38fmrllqa-inputproto-2.2.tar.bz2.drv" "/home/tester/guix-MASTER/test-tmp/store/w93x6517qz0qg62wynqchcs0m2kayfmc-gperf-3.0.4-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/w981gb7gl68ggzsg1ak7siagka59jbha-libgc-7.2d-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/w9zpdm5w451bq1lma2ljr1blbp4cgbq1-hello-2.8.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wan1rdhflnm91mh9l75yp82k1nx743np-flex-2.5.37-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wapz07y3wwrsnp4qgviy0zzqr282zqfj-guile-2.0.9-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wb8c5l4pymkqa46zckwx135y11h9hqyg-bison-3.0.2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wd224g01b90isrzksrlahy75b57xn4wy-dbus-1.6.4-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wf2zag5z0ghqa93ah52zikmnvyq9d9az-openssl-1.0.1f.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/wg5l6igq2ww5g28pascbqx9afky7wc7d-Python-3.3.3.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wgv3cnplzhy4fbi30gmmwz6ibkj402m5-tzdata2013d.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/whck7fbhihcmcm3gz3k01i5n9mmjg3n9-patchelf-0.6.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/why15737ri2w4klg52wp904c8mvsw136-libxt-1.1.3.drv" "/home/tester/guix-MASTER/test-tmp/store/wiiwscvwscm7bqvf46r6cjzckmniy3fl-ld-wrapper-0.drv" "/home/tester/guix-MASTER/test-tmp/store/wizjkr6qhz0d0z0d0ix4rkpzpbi7jv61-gperf-3.0.4.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/wjihrhav5yjm6gjdx9z9nycy5l1x61sn-acl-2.2.51-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wk5qy48xrnhpnkafv4n34d9vlq0hvmsx-gc-7.2d.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/wlc6qa7s72lzgrjjdw392a7n18s2ds6d-gcc-cross-boot0-wrapped-4.8.2.drv" "/home/tester/guix-MASTER/test-tmp/store/wlx9ni74h2x6s1jlly4bql53xp8aiicr-xz-5.0.4.drv" "/home/tester/guix-MASTER/test-tmp/store/wmp6cx95l11bzph2f77pha9byv2plwza-gzip-1.6.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/wph9j7dlqsd029ay6l5qmm8207wcgjf0-xextproto-7.2.1.tar.bz2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wpqih1qvjvnqlnd8ryiyr4gd3bmlgj6p-profile-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wr6d9xy3qw7c4f038qrjhs9qpd92macf-module-import" "/home/tester/guix-MASTER/test-tmp/store/ws6yzff1j34935g1gf3p14scmrl68603-substitute-me.drv" "/home/tester/guix-MASTER/test-tmp/store/wsghmd2m51y09v5w27smbcpv5pkkay96-binutils-2.23.2.tar.xz" "/home/tester/guix-MASTER/test-tmp/store/wsl94gr2asy1vg8243z58xfr9sdv651k-text" "/home/tester/guix-MASTER/test-tmp/store/wvkxi0y08jyv1hb2pm8i0v15n206ngqy-module-import-compiled" "/home/tester/guix-MASTER/test-tmp/store/wvmwgk9c85g6frn0pca0js1icvvrik5a-xextproto-7.2.1.drv" "/home/tester/guix-MASTER/test-tmp/store/wx6qzbx2q8z8niky9gp2qmfmprs2fq3j-indent-2.2.10-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/wxsh4w4fwdq7y0xwnyrvl6va5pj6vxrr-gobject-introspection-1.38.0.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/wxss2scyx73my7a7vi9llxx2zhxxznng-guile-1.8.8.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/x12nkcfq47q0iymqqq6zxknh5idfc0bc-bzip2-1.0.6.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/x18zfircyk28nkiahl35h9fcinppwvym-dbus-1.6.4.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/x2ayzz9bb9jb7j33agnypck266h7nxph-static-binaries.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/x3h0ff6d6wx1885gx01lsknhn622wv57-libxml2-2.9.0.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/x4ncqffgnzj6hwmz3y4wdf0d40bpg98b-idutils-4.6.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/x4npiwdzzik5b9srnf44z4vpah0c42bz-trivial-with-input-file-0" "/home/tester/guix-MASTER/test-tmp/store/x52dspsy7pmmaij37qr6xpbsr9agi11h-original-drv1.drv" "/home/tester/guix-MASTER/test-tmp/store/x5b210hnldf8vhpvlq5bzn7z00ylviyd-gobject-introspection-1.38.0.drv" "/home/tester/guix-MASTER/test-tmp/store/x5nalpw4j9qqgya6kxm06kv0kid4nj01-pango-1.34.1.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/x99arf2xzvdry51iaf98pgkkpflj516q-poppler-0.22.0.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/x9f2sdf9wl98j0r198ka67a5ad2f0y9s-libjpeg-9-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xbki2rnrd46gmgc0mg7hcy65ahpb2s7k-readline-6.2.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/xbmzp5bp9h8a6f6b7b51sr14flwywglq-m4-1.4.17.tar.bz2.drv" "/home/tester/guix-MASTER/test-tmp/store/xbwzsjd0a81yhvj9nlq02pc98xrba2bn-goo" "/home/tester/guix-MASTER/test-tmp/store/xf8i3mgn8xr9xg49vl12p8hv3h46sig4-trivial-0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xfzf9g9fnb83rkhyzwgwd8b400614w25-readline-6.2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xg395qflf00nrj4n40gln4w1ynaq4jrd-random1" "/home/tester/guix-MASTER/test-tmp/store/xg56s2hq0338lfbsjvbzkfhqglwn430k-patch-2.7.1.drv" "/home/tester/guix-MASTER/test-tmp/store/xjhnqi41v0000lpv39hgvrwbybm1j0a6-hello-2.8-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xk0k1j97wwvfi72cgrgmk71ap40nwv9i-make-boot0-4.0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xkk7v1ivhs1p1rcysb59cl71ch2xj8qi-libtasn1-3.4.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xksa0rmrim2khh8h0hn6l63ag6sna4d0-libICE-1.0.8.tar.bz2.drv" "/home/tester/guix-MASTER/test-tmp/store/xky6gmpb5r4yfxjr4r3nzv4zisj7avym-libelf-0.8.13.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xm4ykksr9bc0666ri6ljlxyqql3lflsf-foo" "/home/tester/guix-MASTER/test-tmp/store/xnlwcpzjdlmg8kk06r1j6w1mrd8c5sqx-glib-tests-newnet.patch" "/home/tester/guix-MASTER/test-tmp/store/xp95gwc3rswi9ckzyfilh44lc2v15azx-mpfr-3.1.2.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xq0076cqy3zb87v8mld581ydd2qs7k1n-glibc-intermediate-2.18-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xqh1wgxj2q3a8k4m5487zidblm38fn0m-gnutls-3.2.12.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/xqwamrw7jnqwcd787g3gfsd03hq73x3p-guile-2.0.9.tar.xz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/xria0skb2msh63qiz78di7zc1nwidxfk-guile-2.0.9.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/xrkv9bh7y3plchbq6am73x3qn2yk086k-utils.scm" "/home/tester/guix-MASTER/test-tmp/store/xs31h95kq9ca4mp90xfjaa8mh5nwhcqr-trivial-with-source-0" "/home/tester/guix-MASTER/test-tmp/store/xs7prz59ln7rp0cvxk8arw3j4g0xb8gh-libffi-3.0.13.drv" "/home/tester/guix-MASTER/test-tmp/store/xv05gdxibm40dis0nxp514cn2w648yxa-c" "/home/tester/guix-MASTER/test-tmp/store/xyri4741rd81p3yv9xg23xqciwsjpcvf-profile-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/y20ih9b2hqymzw019cchhja72sr7cdy1-p-0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/y62mhspgv0r8hnpz1bjlksiqqzcbqcv0-file-5.16-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/y79pb01m4xnrbjzrfirhk6p7930g08sr-p-0.drv" "/home/tester/guix-MASTER/test-tmp/store/y7jq6mjzx3k82n6s166wmkgvyylhx01a-gmp-5.1.3-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/y8ha6kyrik8nh1lsdrsxlz5kr8gj48gm-readline-6.2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/y8smapn8j4ax0dqvccgv62znbgyg1ynx-glibc-2.18.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/yb8nndfhsy4vabg8b94s9mf6xhj0b6hi-libxml2-2.9.0.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/ybrr0yyv2y3chilk45z6vnsfl86fk6gj-tcl-8.6.0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/ycrr63b1m06knb21ys79d2brh2p3z8xy-gmp-5.1.3.drv" "/home/tester/guix-MASTER/test-tmp/store/ycy4yb81zcq62s727a4iah0m5yjnzmib-substitute-me-not.drv" "/home/tester/guix-MASTER/test-tmp/store/ydc9s1an6xmsp3mnr5cjmxzaa0l2p5z4-libpthread-stubs-0.3.tar.bz2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/ydi5fj421knxgp98zmcy2y2mhslk2c00-binutils-2.23.2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/ydxr03wxl1k3a86w2j07zwdvjjjh5m0n-binutils-2.23.2.drv" "/home/tester/guix-MASTER/test-tmp/store/yg6ylx0wqsbflpcp79ckadwbxzjkys9a-bash-4.2.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/yix8qdc9hrkq6hik25pn2kqzvk5kb16m-harfbuzz-0.9.22.drv" "/home/tester/guix-MASTER/test-tmp/store/yjm79i7n6q8z721z2jd034sk8dh6jg5l-make-boot0-4.0" "/home/tester/guix-MASTER/test-tmp/store/yl2rlcxgyiivrdbyif3r59awq0kr7zx7-util-macros-1.17.drv" "/home/tester/guix-MASTER/test-tmp/store/ylj40r89y4vb84dnh6s5flgmbmbis3v7-libtiff-4.0.3.drv" "/home/tester/guix-MASTER/test-tmp/store/ypbf1sy5mcask82685f9p57k1dj7icfg-libspectre-0.2.7-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/yqqf1g3vw76ih9g5dv0fiqp5islwd83l-poppler-0.22.0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/yrp48mrn8h8rg1sj77ri1bz7gwhfqlsi-libxdmcp-1.1.1.drv" "/home/tester/guix-MASTER/test-tmp/store/ysld9s7arpcxgz05p42m7adr74qar6a4-linux-libre-3.3.8-gnu.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/yvaz3cysmh4v5rszvq8l26qx0y6h3h0g-tar-1.27.1-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/yvw3087vcmaaf0vxh07ps03g976mm3pr-final.drv" "/home/tester/guix-MASTER/test-tmp/store/z07jy9162gcdbnbccx8gyp51x7jygmw9-y" "/home/tester/guix-MASTER/test-tmp/store/z19bldli3vyjxzsz05s2lb5a01z8k7cr-make-4.0.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/z1l9g7v57mka8vjq755rll8lr014yldn-my-fixed-builder.sh" "/home/tester/guix-MASTER/test-tmp/store/z2s8amqv68kwsw39ywwkg76x0im5vpyi-findutils-4.4.2.drv" "/home/tester/guix-MASTER/test-tmp/store/z4jwikaiq7ns0g7za9svcnwwqwml2zik-libgpg-error-1.12.tar.bz2.drv" "/home/tester/guix-MASTER/test-tmp/store/z74kvz7rl22jpp4dm9vhxkr7ai16jzbx-original-drv2.drv" "/home/tester/guix-MASTER/test-tmp/store/z8hs3ff4wazhfgmn363w032kpgj8qbjv-bash-4.2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/z9rvnngwisl1fpk72j06wy6ybjnckcx8-emacs-24.3.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/za0ridn6jikss55gxsfl2hqi3vhhfibw-libgc-7.4.0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/zadi4r037r0v1vv0gv1pjl9ikmn96413-patchelf-0.6.tar.xz.drv" "/home/tester/guix-MASTER/test-tmp/store/zbj9xhgd6rvd55m3pvrn16g2vbn0nb1a-random-text" "/home/tester/guix-MASTER/test-tmp/store/zf0yl8jyk1xh7cdk5kqi5j07gabb2zsc-findutils-4.4.2.tar.gz-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/zg14cg8ivydza8y4ji01gq066k0qxbp2-readline-6.2.drv" "/home/tester/guix-MASTER/test-tmp/store/zgc7y423n8153jla6d1hf463wxn3mxzy-libtasn1-3.4.tar.gz.drv" "/home/tester/guix-MASTER/test-tmp/store/zha7bf28lq1ssmm9gvfy0m4xjapirhm2-fontconfig-2.10.93.tar.bz2-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/zicj840n0x80h6dmyd8nph49ybzw2p7b-psmisc-22.20-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/ziksw462h5nz060ga90xcx7ixsa87vxz-libxext-1.3.1-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/zlk0pf3nwz1kikbajfby6y5jkivjz3hm-random2" "/home/tester/guix-MASTER/test-tmp/store/zlk1s0s3lwj0mkmys22q4z2mwkrn5q54-profile" "/home/tester/guix-MASTER/test-tmp/store/zlz3l4sfh0d55hi78w8r2jlysqvijmnd-builder.sh" "/home/tester/guix-MASTER/test-tmp/store/zpi7rb6b5kvy2jm5n3kg8by3zpib4w0l-flat-test" "/home/tester/guix-MASTER/test-tmp/store/zpslvmjwrvbv96wbs89y2qgc8zj2c0qg-double-second" "/home/tester/guix-MASTER/test-tmp/store/zqnsjcxf62zygz0dg9sz3x5gyihqdsyy-multiple-output-two" "/home/tester/guix-MASTER/test-tmp/store/zsbz5g28w4w61hghhlyby7pczakqz19a-perl-5.16.1.drv" "/home/tester/guix-MASTER/test-tmp/store/zw28xanvdywfkmsjh8bhmijaf2ldagrc-multiple-output-user" "/home/tester/guix-MASTER/test-tmp/store/zwx1xmr939yyc7cfhdrlknk908dlndwf-gawk-4.1.0-guile-builder" "/home/tester/guix-MASTER/test-tmp/store/zxihb79cdqpwzkgkg46r6jrnlk40zncx-gettext-0.18.3.1.drv" "/home/tester/guix-MASTER/test-tmp/store/zxmxvvm7y46hsfyg6pq490r1pj8iqbgb-baz" "/home/tester/guix-MASTER/test-tmp/store/zy3hijgz5cfzs8lacs0i5jwhdvhvhc0a-python-2.7.6.drv") Test begin: test-name: "dead path can be explicitly collected" source-file: "tests/store.scm" source-line: 113 source-form: (test-assert "dead path can be explicitly collected" (let ((p (add-text-to-store %store "random-text" (random-text) (quote ())))) (let-values (((paths freed) (delete-paths %store (list p)))) (and (equal? paths (list p)) (> freed 0) (not (file-exists? p)))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "references" source-file: "tests/store.scm" source-line: 121 source-form: (test-assert "references" (let* ((t1 (add-text-to-store %store "random1" (random-text))) (t2 (add-text-to-store %store "random2" (random-text) (list t1)))) (and (equal? (list t1) (references %store t2)) (equal? (list t2) (referrers %store t1)) (null? (references %store t1)) (null? (referrers %store t2))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "requisites" source-file: "tests/store.scm" source-line: 131 source-form: (test-assert "requisites" (let* ((t1 (add-text-to-store %store "random1" (random-text) (quote ()))) (t2 (add-text-to-store %store "random2" (random-text) (list t1))) (t3 (add-text-to-store %store "random3" (random-text) (list t2))) (t4 (add-text-to-store %store "random4" (random-text) (list t1 t3)))) (define (same? x y) (and (= (length x) (length y)) (lset= equal? x y))) (and (same? (requisites %store t1) (list t1)) (same? (requisites %store t2) (list t1 t2)) (same? (requisites %store t3) (list t1 t2 t3)) (same? (requisites %store t4) (list t1 t2 t3 t4))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "derivers" source-file: "tests/store.scm" source-line: 149 source-form: (test-assert "derivers" (let* ((b (add-text-to-store %store "build" "echo $foo > $out" (quote ()))) (s (add-to-store %store "bash" #t "sha256" (search-bootstrap-binary "bash" (%current-system)))) (d (derivation %store "the-thing" s (quasiquote ("-e" (unquote b))) #:env-vars (quasiquote (("foo" unquote (random-text)))) #:inputs (quasiquote (((unquote b)) ((unquote s)))))) (o (derivation->output-path d))) (and (build-derivations %store (list d)) (equal? (query-derivation-outputs %store (derivation-file-name d)) (list o)) (equal? (valid-derivers %store o) (list (derivation-file-name d)))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "topologically-sorted, one item" source-file: "tests/store.scm" source-line: 165 source-form: (test-assert "topologically-sorted, one item" (let* ((a (add-text-to-store %store "a" "a")) (b (add-text-to-store %store "b" "b" (list a))) (c (add-text-to-store %store "c" "c" (list b))) (d (add-text-to-store %store "d" "d" (list c))) (s (topologically-sorted %store (list d)))) (equal? s (list a b c d)))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "topologically-sorted, several items" source-file: "tests/store.scm" source-line: 173 source-form: (test-assert "topologically-sorted, several items" (let* ((a (add-text-to-store %store "a" "a")) (b (add-text-to-store %store "b" "b" (list a))) (c (add-text-to-store %store "c" "c" (list b))) (d (add-text-to-store %store "d" "d" (list c))) (s1 (topologically-sorted %store (list d a c b))) (s2 (topologically-sorted %store (list b d c a b d)))) (equal? s1 s2 (list a b c d)))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "topologically-sorted, more difficult" source-file: "tests/store.scm" source-line: 182 source-form: (test-assert "topologically-sorted, more difficult" (let* ((a (add-text-to-store %store "a" "a")) (b (add-text-to-store %store "b" "b" (list a))) (c (add-text-to-store %store "c" "c" (list b))) (d (add-text-to-store %store "d" "d" (list c))) (w (add-text-to-store %store "w" "w")) (x (add-text-to-store %store "x" "x" (list w))) (y (add-text-to-store %store "y" "y" (list x d))) (s1 (topologically-sorted %store (list y))) (s2 (topologically-sorted %store (list c y))) (s3 (topologically-sorted %store (cons y (references %store y))))) (let* ((x-then-d? (equal? (references %store y) (list x d)))) (and (equal? s1 (if x-then-d? (list w x a b c d y) (list a b c d w x y))) (equal? s2 (if x-then-d? (list a b c w x d y) (list a b c d w x y))) (lset= string=? s1 s3))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "log-file, derivation" source-file: "tests/store.scm" source-line: 206 source-form: (test-assert "log-file, derivation" (let* ((b (add-text-to-store %store "build" "echo $foo > $out" (quote ()))) (s (add-to-store %store "bash" #t "sha256" (search-bootstrap-binary "bash" (%current-system)))) (d (derivation %store "the-thing" s (quasiquote ("-e" (unquote b))) #:env-vars (quasiquote (("foo" unquote (random-text)))) #:inputs (quasiquote (((unquote b)) ((unquote s))))))) (and (build-derivations %store (list d)) (file-exists? (pk (log-file %store (derivation-file-name d))))))) Test end: result-kind: fail actual-value: #f actual-error: (wrong-type-arg "stat" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "open file port" #f) (#f)) Test begin: test-name: "log-file, output file name" source-file: "tests/store.scm" source-line: 218 source-form: (test-assert "log-file, output file name" (let* ((b (add-text-to-store %store "build" "echo $foo > $out" (quote ()))) (s (add-to-store %store "bash" #t "sha256" (search-bootstrap-binary "bash" (%current-system)))) (d (derivation %store "the-thing" s (quasiquote ("-e" (unquote b))) #:env-vars (quasiquote (("foo" unquote (random-text)))) #:inputs (quasiquote (((unquote b)) ((unquote s)))))) (o (derivation->output-path d))) (and (build-derivations %store (list d)) (file-exists? (pk (log-file %store o))) (string=? (log-file %store (derivation-file-name d)) (log-file %store o))))) Test end: result-kind: fail actual-value: #f actual-error: (wrong-type-arg "stat" "Wrong type argument in position ~A (expecting ~A): ~S" (1 "open file port" #f) (#f)) Test begin: test-name: "no substitutes" source-file: "tests/store.scm" source-line: 233 source-form: (test-assert "no substitutes" (let* ((s (open-connection)) (d1 (package-derivation s %bootstrap-guile (%current-system))) (d2 (package-derivation s %bootstrap-glibc (%current-system))) (o (map derivation->output-path (list d1 d2)))) (set-build-options s #:use-substitutes? #f) (and (not (has-substitutes? s (derivation-file-name d1))) (not (has-substitutes? s (derivation-file-name d2))) (null? (substitutable-paths s o)) (null? (substitutable-path-info s o))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "substitute query" source-file: "tests/store.scm" source-line: 246 source-form: (test-assert "substitute query" (let* ((s (open-connection)) (d (package-derivation s %bootstrap-guile (%current-system))) (o (derivation->output-path d)) (dir (and=> (getenv "GUIX_BINARY_SUBSTITUTE_URL") (compose uri-path string->uri)))) (call-with-output-file (string-append dir "/nix-cache-info") (lambda (p) (format p "StoreDir: ~a\nWantMassQuery: 0\n" (%store-prefix)))) (call-with-output-file (string-append dir "/" (store-path-hash-part o) ".narinfo") (lambda (p) (format p "StorePath: ~a\nURL: ~a\nCompression: none\nNarSize: 1234\nReferences: \nSystem: ~a\nDeriver: ~a~%" o (string-append dir "/example.nar") (%current-system) (basename (derivation-file-name d))))) (false-if-exception (delete-file (string-append (getenv "XDG_CACHE_HOME") "/guix/substitute-binary/" (store-path-hash-part o)))) (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) (equal? (list o) (substitutable-paths s (list o))) (match (pk (quote spi) (substitutable-path-info s (list o))) (((? substitutable? s)) (and (string=? (substitutable-deriver s) (derivation-file-name d)) (null? (substitutable-references s)) (equal? (substitutable-nar-size s) 1234))))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "substitute" source-file: "tests/store.scm" source-line: 289 source-form: (test-assert "substitute" (let* ((s (open-connection)) (c (random-text)) (d (build-expression->derivation s "substitute-me" (quasiquote (call-with-output-file %output (lambda (p) (exit 1) (display (unquote c) p)))) #:guile-for-build (package-derivation s %bootstrap-guile (%current-system)))) (o (derivation->output-path d)) (dir (and=> (getenv "GUIX_BINARY_SUBSTITUTE_URL") (compose uri-path string->uri)))) (call-with-output-file (string-append dir "/nix-cache-info") (lambda (p) (format p "StoreDir: ~a\nWantMassQuery: 0\n" (%store-prefix)))) (call-with-output-file (string-append dir "/example.out") (lambda (p) (display c p))) (call-with-output-file (string-append dir "/example.nar") (lambda (p) (write-file (string-append dir "/example.out") p))) (call-with-output-file (string-append dir "/" (store-path-hash-part o) ".narinfo") (lambda (p) (format p "StorePath: ~a\nURL: ~a\nCompression: none\nNarSize: 1234\nNarHash: sha256:~a\nReferences: \nSystem: ~a\nDeriver: ~a~%" o "example.nar" (call-with-input-file (string-append dir "/example.nar") (compose bytevector->nix-base32-string sha256 get-bytevector-all)) (%current-system) (basename (derivation-file-name d))))) (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) (build-derivations s (list d)) (equal? c (call-with-input-file o get-string-all))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "substitute --fallback" source-file: "tests/store.scm" source-line: 340 source-form: (test-assert "substitute --fallback" (let* ((s (open-connection)) (t (random-text)) (d (build-expression->derivation s "substitute-me-not" (quasiquote (call-with-output-file %output (lambda (p) (display (unquote t) p)))) #:guile-for-build (package-derivation s %bootstrap-guile (%current-system)))) (o (derivation->output-path d)) (dir (and=> (getenv "GUIX_BINARY_SUBSTITUTE_URL") (compose uri-path string->uri)))) (call-with-output-file (string-append dir "/nix-cache-info") (lambda (p) (format p "StoreDir: ~a\nWantMassQuery: 0\n" (%store-prefix)))) (call-with-output-file (string-append dir "/" (store-path-hash-part o) ".narinfo") (lambda (p) (format p "StorePath: ~a\nURL: ~a\nCompression: none\nNarSize: 1234\nNarHash: sha256:0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73\nReferences: \nSystem: ~a\nDeriver: ~a~%" o "does-not-exist.nar" (%current-system) (basename (derivation-file-name d))))) (set-build-options s #:use-substitutes? #t) (and (has-substitutes? s o) (guard (c ((nix-protocol-error? c) (set-build-options s #:use-substitutes? #t #:fallback? #t) (and (build-derivations s (list d)) (equal? t (call-with-input-file o get-string-all))))) (build-derivations s (list d)) #f)))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "export/import several paths" source-file: "tests/store.scm" source-line: 390 source-form: (test-assert "export/import several paths" (let* ((texts (unfold (cut >= <> 10) (lambda _ (random-text)) #{1+}# 0)) (files (map (cut add-text-to-store %store "text" <>) texts)) (dump (call-with-bytevector-output-port (cut export-paths %store files <>)))) (delete-paths %store files) (and (every (negate file-exists?) files) (let* ((source (open-bytevector-input-port dump)) (imported (import-paths %store source))) (and (equal? imported files) (every file-exists? files) (equal? texts (map (lambda (file) (call-with-input-file file get-string-all)) files))))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "export/import paths, ensure topological order" source-file: "tests/store.scm" source-line: 410 source-form: (test-assert "export/import paths, ensure topological order" (let* ((file0 (add-text-to-store %store "baz" (random-text))) (file1 (add-text-to-store %store "foo" (random-text) (list file0))) (file2 (add-text-to-store %store "bar" (random-text) (list file1))) (files (list file1 file2)) (dump1 (call-with-bytevector-output-port (cute export-paths %store (list file1 file2) <>))) (dump2 (call-with-bytevector-output-port (cute export-paths %store (list file2 file1) <>)))) (delete-paths %store files) (and (every (negate file-exists?) files) (bytevector=? dump1 dump2) (let* ((source (open-bytevector-input-port dump1)) (imported (import-paths %store source))) (and (equal? imported (list file1 file2)) (every file-exists? files) (equal? (list file0) (references %store file1)) (equal? (list file1) (references %store file2))))))) Test end: result-kind: pass actual-value: #t Test begin: test-name: "import corrupt path" source-file: "tests/store.scm" source-line: 432 source-form: (test-assert "import corrupt path" (let* ((text (random-text)) (file (add-text-to-store %store "text" text)) (dump (call-with-bytevector-output-port (cut export-paths %store (list file) <>)))) (delete-paths %store (list file)) (let* ((index (quotient (bytevector-length dump) 4)) (byte (bytevector-u8-ref dump index))) (bytevector-u8-set! dump index (logxor 255 byte))) (and (not (file-exists? file)) (guard (c ((nix-protocol-error? c) (pk (quote c) c) (and (not (zero? (nix-protocol-error-status c))) (string-contains (nix-protocol-error-message c) "corrupt")))) (let* ((source (open-bytevector-input-port dump)) (imported (import-paths %store source))) (pk (quote corrupt-imported) imported) #f))))) Test end: result-kind: pass actual-value: 80 Test begin: test-name: "register-path" source-file: "tests/store.scm" source-line: 455 source-form: (test-assert "register-path" (let ((file (string-append (%store-prefix) "/" (make-string 32 #\f) "-fake"))) (when (valid-path? %store file) (delete-paths %store (list file))) (false-if-exception (delete-file file)) (let ((ref (add-text-to-store %store "ref-of-fake" (random-text))) (drv (string-append file ".drv"))) (call-with-output-file file (cut display "This is a fake store item.\n" <>)) (register-path file #:references (list ref) #:deriver drv) (and (valid-path? %store file) (equal? (references %store file) (list ref)) (null? (valid-derivers %store file)) (null? (referrers %store file)))))) Test end: result-kind: pass actual-value: #t Group end: store # of expected passes 21 # of unexpected failures 2