File tree 2 files changed +11
-8
lines changed
2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ jobs:
384
384
- run-tests :
385
385
# also add a little select testing for wasm2js in -O3
386
386
# also add a little select wasmfs testing
387
- test_targets : " core3 wasm2js3.test_memorygrowth_2 wasmfs.test_hello_world wasmfs.test_hello_world_standalone wasmfs.test_unistd_links*"
387
+ test_targets : " core3 wasm2js3.test_memorygrowth_2 wasmfs.test_hello_world wasmfs.test_hello_world_standalone wasmfs.test_unistd_links* wasmfs.test_atexit_standalone "
388
388
test-wasm2js1 :
389
389
executor : bionic
390
390
steps :
Original file line number Diff line number Diff line change @@ -180,14 +180,17 @@ imported__wasi_fd_write(__wasi_fd_t fd,
180
180
size_t iovs_len ,
181
181
__wasi_size_t * nwritten );
182
182
183
- static void wasi_write (__wasi_fd_t fd , char * buffer ) {
184
- struct __wasi_ciovec_t iov ;
185
- iov .buf = (uint8_t * )buffer ;
186
- iov .buf_len = strlen (buffer ) + 1 ;
183
+ // Write a buffer + a newline.
184
+ static void wasi_writeln (__wasi_fd_t fd , char * buffer ) {
185
+ struct __wasi_ciovec_t iovs [2 ];
186
+ iovs [0 ].buf = (uint8_t * )buffer ;
187
+ iovs [0 ].buf_len = strlen (buffer );
188
+ iovs [1 ].buf = (uint8_t * )"\n" ;
189
+ iovs [1 ].buf_len = 1 ;
187
190
__wasi_size_t nwritten ;
188
- imported__wasi_fd_write (fd , & iov , 1 , & nwritten );
191
+ imported__wasi_fd_write (fd , iovs , 2 , & nwritten );
189
192
}
190
193
191
- void _emscripten_out (char * text ) { wasi_write (1 , text ); }
194
+ void _emscripten_out (char * text ) { wasi_writeln (1 , text ); }
192
195
193
- void _emscripten_err (char * text ) { wasi_write (2 , text ); }
196
+ void _emscripten_err (char * text ) { wasi_writeln (2 , text ); }
You can’t perform that action at this time.
0 commit comments