Commit Graph

7 Commits

Author SHA1 Message Date
Ludovic Courtès 7c697ad7f1
utils: ‘with-resource-from-pool’ does not suspend from exception handler.
Fixes <https://issues.guix.gnu.org/67041>.

* src/cuirass/utils.scm (call-with-resource-from-pool): Rewrite to avoid
calling ‘put-message’ from the exception handler.
* tests/utils.scm ("resource pool, exception thrown"): New test.
2023-11-16 23:20:00 +01:00
Ludovic Courtès bdcbf01fa5
utils: Add tests for the resource pool.
* tests/utils.scm: New file.
* Makefile.am (TESTS): Add it.
2023-11-16 22:16:27 +01:00
Ludovic Courtès 931597826a
utils: Remove now useless 'object->json-string' & co.
* src/cuirass/utils.scm (alist?, object->json-scm)
(object->json-string): Remove.
* tests/utils.scm: Remove.
* Makefile.am (TESTS): Remove it.
* tests/http.scm ("object->json-string"): Remove.
2023-08-23 21:50:24 +02:00
Mathieu Othacehe f301378d94
utils: Remove useless procedures.
* src/cuirass/utils.scm (mkdir-p, make-user-module,
  call-with-temporary-directory, with-directory-excursion): Remove because
  already defined in guix.
* tests/utils (with-directory-excursion): Remove associated test.
* src/cuirass/base.scm: Use (guix build utils) to provide procedure removed
  from (cuirass utils).
* bin/evaluate.in: Ditto.
* bin/cuirass.in: Use "make-user-module" provided by (guix ui).
2017-07-01 18:47:18 +02:00
Mathieu Lirzin e58911de37
utils: Add 'alist?' procedure.
* src/cuirass/utils.scm (alist?): New procedure.
* tests/utils.scm ("alist?"): New test.
2016-07-30 23:08:39 +02:00
Mathieu Lirzin ad267dc86a
tests: Add missing test group statements.
* tests/base.scm: Add missing 'test-begin' and 'test-end'.
* tests/database.scm: Likewise.
* tests/ui.scm: Likewise.
* tests/utils.scm: Likewise.
2016-07-27 14:17:10 +02:00
Mathieu Lirzin 88e72887a0 Add test for 'with-directory-excursion'. 2016-07-02 03:35:19 +02:00