Merge pull request #3409 from DimitrisJim/check_wasi

Add wasi check to ci.
This commit is contained in:
Jeong YunWon
2021-11-04 16:01:16 +09:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -105,6 +105,16 @@ jobs:
command: check
args: --target aarch64-linux-android
- uses: actions-rs/toolchain@v1
with:
target: wasm32-wasi
- name: Check compilation for wasi
uses: actions-rs/cargo@v1
with:
command: check
args: --target wasm32-wasi --features freeze-stdlib
- name: Prepare repository for redox compilation
run: bash scripts/redox/uncomment-cargo.sh
- name: Check compilation for Redox

View File

@@ -989,7 +989,7 @@ impl<C: widestring::UChar> IntoPyException for widestring::NulError<C> {
}
}
#[cfg(not(target_arch = "wasm32"))]
#[cfg(any(unix, windows, target_os = "wasi"))]
pub(crate) fn raw_os_error_to_exc_type(errno: i32, vm: &VirtualMachine) -> Option<PyTypeRef> {
use crate::stdlib::errno::errors;
let excs = &vm.ctx.exceptions;
@@ -998,6 +998,7 @@ pub(crate) fn raw_os_error_to_exc_type(errno: i32, vm: &VirtualMachine) -> Optio
errors::EALREADY => Some(excs.blocking_io_error.clone()),
errors::EINPROGRESS => Some(excs.blocking_io_error.clone()),
errors::EPIPE => Some(excs.broken_pipe_error.clone()),
#[cfg(not(target_os = "wasi"))]
errors::ESHUTDOWN => Some(excs.broken_pipe_error.clone()),
errors::ECHILD => Some(excs.child_process_error.clone()),
errors::ECONNABORTED => Some(excs.connection_aborted_error.clone()),