File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,11 @@ jobs:
54
54
# build distro):
55
55
- image : debian:bullseye
56
56
- image : arm64v8/debian:bullseye
57
- # And for Alpine we mostly measure compatibility in musl minor versions, and
58
- # the oldest supported Alpine as of this writing (3.16) has the same minor
59
- # version as 3.19, so use 3.19. (This helps bring a newer system clang, which
60
- # works better with the V8 build.)
57
+ # Alpine 3.19 includes a clang new enough for V8 to build (with only minor
58
+ # patches!). Builds on 3.19 seem incompatible with <= 3.18 due to libstdc++
59
+ # symbols. (And we can't just run on an old Alpine and update clang from the
60
+ # llvm site, because unlike Debian, the llvm project doesn't maintain
61
+ # updated packages for old Alpine distros.)
61
62
- image : alpine:3.19
62
63
- image : arm64v8/alpine:3.19
63
64
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ PyMiniRacer is distributed using [wheels](https://pythonwheels.com/) on
114
114
| Debian ≥ 11 | ✓ | ✓ |
115
115
| RHEL ≥ 8 | ✓ | ✓ |
116
116
| other Linuxes with glibc ≥ 2.31 | ✓ | ✓ |
117
- | Alpine ≥ 3.16 | ✓ | ✓ |
117
+ | Alpine ≥ 3.19 | ✓ | ✓ |
118
118
| other Linux with musl ≥ 1.2 | ✓ | ✓ |
119
119
120
120
If you have a up-to-date pip and it doesn't use a wheel, you might have an environment
Original file line number Diff line number Diff line change @@ -82,15 +82,17 @@ def test_null_byte():
82
82
83
83
84
84
def test_timeout ():
85
- timeout_ms = 100
85
+ timeout = 0.1
86
86
start_time = time ()
87
87
88
88
mr = MiniRacer ()
89
89
with pytest .raises (JSTimeoutException ):
90
- mr .eval ("while(1) { }" , timeout = timeout_ms )
90
+ mr .eval ("while(1) { }" , timeout = int ( timeout * 1000 ) )
91
91
92
92
duration = time () - start_time
93
- assert timeout_ms <= duration * 1000 <= timeout_ms + 200
93
+ # Make sure it timed out on time, and allow a giant leeway (because aarch64
94
+ # emulation tests are surprisingly slow!)
95
+ assert timeout <= duration <= timeout + 5
94
96
95
97
96
98
def test_max_memory_soft ():
@@ -144,13 +146,17 @@ def test_async():
144
146
const shared = new SharedArrayBuffer(8);
145
147
const view = new Int32Array(shared);
146
148
147
- const p = Atomics.waitAsync(view, 0, 0, 1 ); // 1 ms timeout
149
+ const p = Atomics.waitAsync(view, 0, 0, 1000 ); // 1 s timeout
148
150
p.value.then(() => { done = true; });
149
151
done
150
152
"""
151
153
)
152
- sleep (0.1 )
153
154
assert not mr .eval ("done" )
155
+ start = time ()
156
+ # Give the 1-second wait 10 seconds to finish. (Emulated aarch64 tests are
157
+ # surprisingly slow!)
158
+ while time () - start < 10 and not mr .eval ("done" ):
159
+ sleep (0.1 )
154
160
assert mr .eval ("done" )
155
161
156
162
You can’t perform that action at this time.
0 commit comments