mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-11 09:25:20 +00:00
![YAMAMOTO Takashi](/assets/img/avatar_default.png)
This improves test consistency between typical local environments and
github runners.
This is necessary for some of latest wasi-threads tests.
cf. 570e670631
20 lines
448 B
Python
20 lines
448 B
Python
#! /usr/bin/env python3
|
|
|
|
# Copyright (C) 2023 YAMAMOTO Takashi
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
# This is a copy of https://github.com/yamt/toywasm/blob/master/test/pipe.py
|
|
|
|
# keep stdout open until the peer closes it
|
|
|
|
import sys
|
|
import select
|
|
|
|
p = select.poll()
|
|
p.register(sys.stdout, select.POLLHUP)
|
|
# http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57369
|
|
while True:
|
|
l = p.poll(1)
|
|
if l:
|
|
break
|