guix.bats 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env -S bats
  2. @test "create cache directory" {
  3. mkdir -p test-tmp
  4. }
  5. @test "dump current guix channels" {
  6. run bash -c "guix describe --format=channels-sans-intro > test-tmp/channels.scm"
  7. [ "$status" -eq 0 ]
  8. }
  9. @test "run guix pull" {
  10. run guix pull \
  11. --verbosity=0 \
  12. --profile=test-tmp/.guix-profile \
  13. --channels=test-tmp/channels.scm
  14. [ "$status" -eq 0 ]
  15. }
  16. @test "build guixsd system" {
  17. run test-tmp/.guix-profile/bin/guix system build \
  18. --load-path=dotfiles/guixsd/modules dotfiles/guixsd/guixsd.scm
  19. [ "$status" -eq 0 ]
  20. }
  21. @test "build ws1.wugi.info system" {
  22. run test-tmp/.guix-profile/bin/guix system build \
  23. --load-path=dotfiles/guixsd/modules dotfiles/guixsd/ws1.wugi.info.scm
  24. [ "$status" -eq 0 ]
  25. }
  26. @test "build guixsd manifest" {
  27. run test-tmp/.guix-profile/bin/guix environment \
  28. --load-path=dotfiles/guixsd/modules \
  29. --manifest=dotfiles/manifests/guixsd.scm -- sh -c exit
  30. [ "$status" -eq 0 ]
  31. }
  32. @test "build ws1.wugi.info manifest" {
  33. run test-tmp/.guix-profile/bin/guix environment \
  34. --load-path=dotfiles/guixsd/modules \
  35. --manifest=dotfiles/manifests/ws1.wugi.info.scm -- sh -c exit
  36. [ "$status" -eq 0 ]
  37. }