diff options
| author | Eli Zaretskii | 2021-12-30 16:44:13 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-12-30 16:44:13 +0200 |
| commit | 6738c1cc8cb720087c2c3fffcc98a410063cb381 (patch) | |
| tree | f449e114c69315a67ecccb370f7cea33e6261c97 | |
| parent | a67b1f1944262f41e58c87f09d28858725aa5ca9 (diff) | |
| download | emacs-6738c1cc8cb720087c2c3fffcc98a410063cb381.tar.gz emacs-6738c1cc8cb720087c2c3fffcc98a410063cb381.zip | |
Fix multisession-tests on MS-Windows
* test/lisp/emacs-lisp/multisession-tests.el
(multi-test-files-simple): On MS-Windows and Haiku, wait before
invoking the Emacs sub-process, not after, to ensure the later
update is detected with 1-sec file time resolution.
| -rw-r--r-- | test/lisp/emacs-lisp/multisession-tests.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/lisp/emacs-lisp/multisession-tests.el b/test/lisp/emacs-lisp/multisession-tests.el index 57ca420488e..17457d9be2f 100644 --- a/test/lisp/emacs-lisp/multisession-tests.el +++ b/test/lisp/emacs-lisp/multisession-tests.el | |||
| @@ -116,6 +116,10 @@ | |||
| 116 | (should (= (multisession-value multisession--sfoo) 0)) | 116 | (should (= (multisession-value multisession--sfoo) 0)) |
| 117 | (cl-incf (multisession-value multisession--sfoo)) | 117 | (cl-incf (multisession-value multisession--sfoo)) |
| 118 | (should (= (multisession-value multisession--sfoo) 1)) | 118 | (should (= (multisession-value multisession--sfoo) 1)) |
| 119 | ;; On Windows and Haiku, we don't have sub-second resolution, so | ||
| 120 | ;; let some time pass to make the "later" logic work. | ||
| 121 | (when (memq system-type '(windows-nt haiku)) | ||
| 122 | (sleep-for 0.6)) | ||
| 119 | (call-process | 123 | (call-process |
| 120 | (concat invocation-directory invocation-name) | 124 | (concat invocation-directory invocation-name) |
| 121 | nil t nil | 125 | nil t nil |
| @@ -130,9 +134,6 @@ | |||
| 130 | "" | 134 | "" |
| 131 | :synchronized t) | 135 | :synchronized t) |
| 132 | (cl-incf (multisession-value multisession--sfoo)))))) | 136 | (cl-incf (multisession-value multisession--sfoo)))))) |
| 133 | ;; On Windows, we don't have sub-second resolution. | ||
| 134 | (when (memq system-type '(windows-nt haiku)) | ||
| 135 | (sleep-for 2)) | ||
| 136 | (should (= (multisession-value multisession--sfoo) 2))))) | 137 | (should (= (multisession-value multisession--sfoo) 2))))) |
| 137 | 138 | ||
| 138 | (ert-deftest multi-test-files-busy () | 139 | (ert-deftest multi-test-files-busy () |