diff options
author | ThiƩbaud Weksteen <tweek@google.com> | 2021-04-14 09:47:17 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-14 09:47:17 +0000 |
commit | c888212e2377df29a6fd3d846f066e50e15910b4 (patch) | |
tree | 145cd4e1b3c7e876a65031f30f607360690369ac | |
parent | 2e2f22ad560e7ad58906a1bb9954aa66e3b717ce (diff) | |
parent | d443ec332bd182a9feb2ea21f81ef77db284c236 (diff) | |
download | shared_child-c888212e2377df29a6fd3d846f066e50e15910b4.tar.gz |
Update shared_child to 0.3.5 am: 8fe8d38b50 am: 5487c2f543 am: e668c57367 am: d443ec332b
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/shared_child/+/1674605
Change-Id: I42df26492c67b2bced6c12196b17c806196f8d47
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | TEST_MAPPING | 8 | ||||
-rw-r--r-- | appveyor.yml | 6 | ||||
-rw-r--r-- | src/lib.rs | 17 | ||||
-rw-r--r-- | src/sys/unix.rs | 2 | ||||
-rw-r--r-- | src/sys/windows.rs | 10 | ||||
-rw-r--r-- | src/unix.rs | 7 |
11 files changed, 47 insertions, 27 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index d5c37ad..a082427 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "d23a8b12f0228b9a9ebe7983f44b8fec1d815b9c" + "sha1": "9ff8c8e9d6dc8da25a7f7947f4488ceecdffa553" } } @@ -23,7 +23,7 @@ rust_library { host_supported: true, crate_name: "shared_child", srcs: ["src/lib.rs"], - edition: "2015", + edition: "2018", rustlibs: [ "liblibc", ], @@ -39,7 +39,7 @@ rust_defaults { srcs: ["src/lib.rs"], test_suites: ["general-tests"], auto_gen_config: true, - edition: "2015", + edition: "2018", rustlibs: [ "liblibc", ], @@ -59,4 +59,4 @@ rust_test { } // dependent_library ["feature_list"] -// libc-0.2.92 "default,std" +// libc-0.2.93 "default,std" @@ -11,11 +11,13 @@ # will likely look very different (and much more reasonable) [package] +edition = "2018" name = "shared_child" -version = "0.3.4" +version = "0.3.5" authors = ["jacko"] description = "a library for using child processes from multiple threads" documentation = "https://docs.rs/shared_child" +readme = "README.md" keywords = ["command", "process", "child", "subprocess"] categories = ["os"] license = "MIT" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 0de5303..5c8ea27 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,13 +1,15 @@ [package] name = "shared_child" -version = "0.3.4" +version = "0.3.5" authors = ["jacko"] license = "MIT" repository = "https://github.com/oconnor663/shared_child.rs" documentation = "https://docs.rs/shared_child" +readme = "README.md" description = "a library for using child processes from multiple threads" keywords = ["command", "process", "child", "subprocess"] categories = ["os"] +edition = "2018" [target.'cfg(not(windows))'.dependencies] libc = "0.2.42" @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/shared_child/shared_child-0.3.4.crate" + value: "https://static.crates.io/crates/shared_child/shared_child-0.3.5.crate" } - version: "0.3.4" + version: "0.3.5" license_type: NOTICE last_upgrade_date { year: 2021 - month: 3 - day: 12 + month: 4 + day: 13 } } diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..22f1cfe --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,8 @@ +// Generated by update_crate_tests.py for tests that depend on this crate. +{ + "presubmit": [ + { + "name": "shared_child_device_test_src_lib" + } + ] +} diff --git a/appveyor.yml b/appveyor.yml index 11d0f88..354716e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,11 @@ environment: matrix: - TARGET: x86_64-pc-windows-msvc - VERSION: 1.16.0 + VERSION: 1.31.0 - TARGET: i686-pc-windows-msvc - VERSION: 1.16.0 + VERSION: 1.31.0 - TARGET: i686-pc-windows-gnu - VERSION: 1.16.0 + VERSION: 1.31.0 - TARGET: x86_64-pc-windows-msvc VERSION: beta - TARGET: i686-pc-windows-msvc @@ -222,7 +222,7 @@ enum ChildState { Exited(ExitStatus), } -use ChildState::*; +use crate::ChildState::*; #[cfg(test)] mod tests { @@ -231,12 +231,27 @@ mod tests { use std::process::Command; use std::sync::Arc; + // Python isn't available on some Unix platforms, e.g. Android, so we need this instead. + #[cfg(unix)] + pub fn true_cmd() -> Command { + Command::new("true") + } + + #[cfg(not(unix))] pub fn true_cmd() -> Command { let mut cmd = Command::new("python"); cmd.arg("-c").arg(""); cmd } + #[cfg(unix)] + pub fn sleep_forever_cmd() -> Command { + let mut cmd = Command::new("sleep"); + cmd.arg("1000000"); + cmd + } + + #[cfg(not(unix))] pub fn sleep_forever_cmd() -> Command { let mut cmd = Command::new("python"); cmd.arg("-c").arg("import time; time.sleep(1000000)"); diff --git a/src/sys/unix.rs b/src/sys/unix.rs index 46fe5b2..400f910 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -1,5 +1,3 @@ -extern crate libc; - use std; use std::io; use std::process::Child; diff --git a/src/sys/windows.rs b/src/sys/windows.rs index db927bc..3e8fbc9 100644 --- a/src/sys/windows.rs +++ b/src/sys/windows.rs @@ -1,12 +1,10 @@ -extern crate winapi; - -use self::winapi::shared::winerror::WAIT_TIMEOUT; -use self::winapi::um::synchapi::WaitForSingleObject; -use self::winapi::um::winbase::{WAIT_OBJECT_0, INFINITE}; -use self::winapi::um::winnt::HANDLE; use std::io; use std::os::windows::io::{AsRawHandle, RawHandle}; use std::process::Child; +use winapi::shared::winerror::WAIT_TIMEOUT; +use winapi::um::synchapi::WaitForSingleObject; +use winapi::um::winbase::{INFINITE, WAIT_OBJECT_0}; +use winapi::um::winnt::HANDLE; pub struct Handle(RawHandle); diff --git a/src/unix.rs b/src/unix.rs index f53ddd6..f1e8d2c 100644 --- a/src/unix.rs +++ b/src/unix.rs @@ -1,7 +1,5 @@ //! Unix-only extensions, for sending signals. -extern crate libc; - use std::io; pub trait SharedChildExt { @@ -30,11 +28,10 @@ impl SharedChildExt for super::SharedChild { #[cfg(test)] mod tests { - use super::libc; use super::SharedChildExt; + use crate::tests::*; + use crate::SharedChild; use std::os::unix::process::ExitStatusExt; - use tests::*; - use SharedChild; #[test] fn test_send_signal() { |