[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] 143/324: tests: Extract conservative-gc? in a library.
From: |
gnunet |
Subject: |
[gnunet-scheme] 143/324: tests: Extract conservative-gc? in a library. |
Date: |
Tue, 21 Sep 2021 13:23:03 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a commit to branch master
in repository gnunet-scheme.
commit 4d53689bb6661162d4d6ab0cc44fdc7c400fd53c
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Thu Jun 17 22:25:40 2021 +0200
tests: Extract conservative-gc? in a library.
It will be used for testing the message queue code.
* tests/envelope.scm (conservative-gc?): Move variable to ...
* tests/utils.scm (conservative-gc?): ... here, and thunk it.
---
tests/envelope.scm | 13 ++-----------
tests/utils.scm | 29 +++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 11 deletions(-)
diff --git a/tests/envelope.scm b/tests/envelope.scm
index 3444df0..c49c691 100644
--- a/tests/envelope.scm
+++ b/tests/envelope.scm
@@ -20,6 +20,7 @@
(srfi srfi-26)
((rnrs base) #:select (assert))
((rnrs conditions) #:select (&assertion))
+ (tests utils) ; for conservative-gc?
(gnu gnunet mq envelope)
(gnu gnunet mq prio-prefs)
(gnu gnunet mq prio-prefs2))
@@ -247,16 +248,6 @@
;; to the notify-sent, cancel and message are dropped
;; when the message is marked as sent.
-;; Current versions of guile (at least 3.0.5) use a conservative
-;; garbage collector, so these tests might sometimes fail without
-;; indicating a bug. For reprodicible builds, allow skipping these
-;; tests.
-
-(define conservative-gc?
- (if (equal? "yes" (getenv "TOLERATE_CONSERVATIVE_COLLECTORS"))
- #t
- #f))
-
(test-begin "gc")
;; Compilation of the source code of this test file
@@ -267,7 +258,7 @@
(define (do-nothing) 'nothing)
-(test-skip (if conservative-gc? 4 0))
+(test-skip (if (conservative-gc?) 4 0))
(test-equal "references dropped after cancel"
'(#t #t #t)
diff --git a/tests/utils.scm b/tests/utils.scm
new file mode 100644
index 0000000..e6ba993
--- /dev/null
+++ b/tests/utils.scm
@@ -0,0 +1,29 @@
+;; This file is part of scheme-GNUnet.
+;; Copyright (C) 2021 Maxime Devos
+;;
+;; scheme-GNUnet is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU Affero General Public License as published
+;; by the Free Software Foundation, either version 3 of the License,
+;; or (at your option) any later version.
+;;
+;; scheme-GNUnet is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Affero General Public License for more details.
+;;
+;; You should have received a copy of the GNU Affero General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+;; SPDX-License-Identifier: AGPL3.0-or-later
+(define-module (tests utils)
+ #:export (conservative-gc?))
+
+;; Current versions of guile (at least 3.0.5) use a conservative
+;; garbage collector, so some tests concerning garbage collection
+;; might sometimes fail without indicating a bug. For reprodicible
+;; builds, allow skipping these tests.
+
+(define (conservative-gc?)
+ (if (equal? "yes" (getenv "TOLERATE_CONSERVATIVE_COLLECTORS"))
+ #t
+ #f))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] 144/324: mq: Test message cancellation., (continued)
- [gnunet-scheme] 144/324: mq: Test message cancellation., gnunet, 2021/09/21
- [gnunet-scheme] 145/324: mq: envelope: Correct spelling in comments and docstrings., gnunet, 2021/09/21
- [gnunet-scheme] 87/324: mq: define message queue module, gnunet, 2021/09/21
- [gnunet-scheme] 96/324: doc: Fix typo in README.org., gnunet, 2021/09/21
- [gnunet-scheme] 102/324: tests: config-parser: Don't generate inexact numbers., gnunet, 2021/09/21
- [gnunet-scheme] 116/324: utils: hat-let: Fix inline procedure definitions., gnunet, 2021/09/21
- [gnunet-scheme] 117/324: mq: Define envelope data type, again., gnunet, 2021/09/21
- [gnunet-scheme] 126/324: netstruct: Verify there is a setter (not a reader) in set%!., gnunet, 2021/09/21
- [gnunet-scheme] 128/324: netstruct: Raise &unwritable, not an &unreadable, in set%!., gnunet, 2021/09/21
- [gnunet-scheme] 131/324: tests: mq: Work-around guile-fibers bug., gnunet, 2021/09/21
- [gnunet-scheme] 143/324: tests: Extract conservative-gc? in a library.,
gnunet <=
- [gnunet-scheme] 150/324: Merge branch 'master' into proper-mq, gnunet, 2021/09/21
- [gnunet-scheme] 148/324: utils: tokeniser: Split message streams into individual messages., gnunet, 2021/09/21
- [gnunet-scheme] 149/324: mq: Delete unused and obsolete message-io module., gnunet, 2021/09/21
- [gnunet-scheme] 155/324: enum: Fix compilation error on Guile 3.0.7., gnunet, 2021/09/21
- [gnunet-scheme] 160/324: enum: symbol->value: Return #f if the symbol doesn't exist., gnunet, 2021/09/21
- [gnunet-scheme] 159/324: Makefile.am: Correct file name of test., gnunet, 2021/09/21
- [gnunet-scheme] 154/324: mq: Implement 'inject-error!'., gnunet, 2021/09/21
- [gnunet-scheme] 156/324: mq-impl/stream: Implement on top of ports., gnunet, 2021/09/21
- [gnunet-scheme] 162/324: Merge branch 'proper-mq', gnunet, 2021/09/21
- [gnunet-scheme] 161/324: guix: Patch 'guile' to fix some bugs., gnunet, 2021/09/21