[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/racket-mode 32dbda45c2: Skip some tests on CI and increase
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/racket-mode 32dbda45c2: Skip some tests on CI and increase the test timeout there; closes #664 |
Date: |
Wed, 28 Jun 2023 19:02:32 -0400 (EDT) |
branch: elpa/racket-mode
commit 32dbda45c27f51026d71f398a5872443a94bed77
Author: Greg Hendershott <git@greghendershott.com>
Commit: Greg Hendershott <git@greghendershott.com>
Skip some tests on CI and increase the test timeout there; closes #664
Specifically skip timing tests on CI. Although I would love to run
them there, too, generally we can't know hardware or multi-tasking
loads.
When we do run timing tests, use CPU not real time, via
get-internal-run-time. Although this is unlikely to make much
difference, in principle it's the better number to use.
(Also skip the racket-profile test, which has never been reliable on
CI for reasons I've never been able to understand.)
---
test/racket-tests.el | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/test/racket-tests.el b/test/racket-tests.el
index 7664fe5f4e..d80e1d13b1 100644
--- a/test/racket-tests.el
+++ b/test/racket-tests.el
@@ -39,7 +39,7 @@
(defconst ci-p (getenv "CI")
"Is there an environment variable saying we're running on CI?")
-(defconst racket-tests/timeout (if ci-p 30 10))
+(defconst racket-tests/timeout (if ci-p 60 10))
(defun racket-tests/type (typing)
(let ((blink-matching-paren nil)) ;suppress "Matches " messages
@@ -246,15 +246,9 @@ c.rkt. Visit each file, racket-run, and check as expected."
;;; Profile
-(defun racket-tests/expected-result-for-profile-p (result)
- "Allow the test to pass or fail on CI."
- (if ci-p
- t
- (ert-test-passed-p result)))
-
(ert-deftest racket-tests/profile ()
"Exercise `racket-profile'."
- :expected-result `(satisfies racket-tests/expected-result-for-profile-p)
+ (skip-unless (not ci-p))
(message "racket-tests/profile")
(racket-tests/with-back-end-settings
(let* ((path (make-temp-file "test" nil ".rkt"))
@@ -681,21 +675,22 @@ want to use the value of `racket-program' at run time."
(defun racket-tests/indent-time (file)
(with-current-buffer (find-file (expand-file-name file
racket-tests/here-dir))
(racket-mode)
- (let* ((start (float-time))
+ (let* ((start (float-time (get-internal-run-time)))
(_ (racket-tests/indent-region))
- (finish (float-time))
+ (finish (float-time (get-internal-run-time)))
(dur (- finish start)))
- (message "indent %s took %s seconds" file dur)
+ (message "indent %s %f seconds cpu"
+ file dur)
(revert-buffer t t t)
dur)))
(ert-deftest racket-tests/indent-speed-1 ()
- (should (or (< (racket-tests/indent-time "example/class-internal.rkt") 10)
- ci-p)))
+ (skip-unless (not ci-p))
+ (should (< (racket-tests/indent-time "example/class-internal.rkt") 10)))
(ert-deftest racket-tests/indent-speed-2 ()
- (should (or (< (racket-tests/indent-time "example/core.scm") 10)
- ci-p)))
+ (skip-unless (not ci-p))
+ (should (< (racket-tests/indent-time "example/core.scm") 10)))
;;; Font-lock
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/racket-mode 32dbda45c2: Skip some tests on CI and increase the test timeout there; closes #664,
ELPA Syncer <=