Commit fe95793
authored
Fix test runner warning caused by previous commit, and rename calculateDuration() to calculateElapsed() to avoid confusing/overloading similar terms. (#24402)
I removed the odd stub `addDuration()` function in the previous PR:
https://github.com/emscripten-core/emscripten/pull/24396/files#diff-fd5a5983b044aa841287bf197f2b5e46781162bf0e6a0ca8d1ccaddf1cc1c969L110-L111
turns out that Python unit test runner starts to warn if this function
is not present.
```
test_sse4 (test_core.strict_js.test_sse4) ... ok (1.14s)
C:\python\Lib\unittest\case.py:580: RuntimeWarning: TestResult has no addDuration method
warnings.warn("TestResult has no addDuration method",
test_sse4 (test_core.bigint.test_sse4) ... ok (1.10s)
C:\python\Lib\unittest\case.py:580: RuntimeWarning: TestResult has no addDuration method
warnings.warn("TestResult has no addDuration method",
test_sse4 (test_core.instance.test_sse4) ... ok (1.13s)
C:\python\Lib\unittest\case.py:580: RuntimeWarning: TestResult has no addDuration method
warnings.warn("TestResult has no addDuration method",
test_sse4 (test_core.core_2gb.test_sse4) ... ok (1.25s)
```
Add it back in, and use it to register the elapsed time in the test
(looks like Python internally tracks it).
Rename the `calculateDuration()` function to a `calculateElapsed()`
method so it doesn't look too similar to the `addDuration()` one.1 parent bf3c986 commit fe95793
1 file changed
+8
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | | - | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
143 | | - | |
| 145 | + | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
| |||
0 commit comments