File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ jobs:
384384 - run-tests :
385385 # also add a little select testing for wasm2js in -O3
386386 # 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 "
388388 test-wasm2js1 :
389389 executor : bionic
390390 steps :
Original file line number Diff line number Diff line change @@ -180,14 +180,17 @@ imported__wasi_fd_write(__wasi_fd_t fd,
180180 size_t iovs_len ,
181181 __wasi_size_t * nwritten );
182182
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 ;
187190 __wasi_size_t nwritten ;
188- imported__wasi_fd_write (fd , & iov , 1 , & nwritten );
191+ imported__wasi_fd_write (fd , iovs , 2 , & nwritten );
189192}
190193
191- void _emscripten_out (char * text ) { wasi_write (1 , text ); }
194+ void _emscripten_out (char * text ) { wasi_writeln (1 , text ); }
192195
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