mirror of
https://github.com/openai/codex.git
synced 2026-10-22 17:58:46 +00:00
ci: cross-compile Windows Bazel tests
This commit is contained in:
@@ -34,6 +34,7 @@ where
|
||||
mod tests {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
use std::future::pending;
|
||||
use std::time::Duration;
|
||||
use tokio::task;
|
||||
use tokio::time::sleep;
|
||||
@@ -58,12 +59,7 @@ mod tests {
|
||||
token_clone.cancel();
|
||||
});
|
||||
|
||||
let result = async {
|
||||
sleep(Duration::from_millis(100)).await;
|
||||
7
|
||||
}
|
||||
.or_cancel(&token)
|
||||
.await;
|
||||
let result = pending::<i32>().or_cancel(&token).await;
|
||||
|
||||
cancel_handle.await.expect("cancel task panicked");
|
||||
assert_eq!(Err(CancelErr::Cancelled), result);
|
||||
|
||||
@@ -50,6 +50,10 @@ fn pwsh_path() -> Option<PathBuf> {
|
||||
}
|
||||
|
||||
fn sandbox_cwd() -> PathBuf {
|
||||
if let Ok(workspace_root) = std::env::var("INSTA_WORKSPACE_ROOT") {
|
||||
return PathBuf::from(workspace_root);
|
||||
}
|
||||
|
||||
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
|
||||
.parent()
|
||||
.expect("repo root")
|
||||
|
||||
Reference in New Issue
Block a user