Merge pull request #4353 from ManaSugi/runk/enable-agent-unit-tests

agent, runk: Enable test for the agent built with standard-oci-runtime feature
This commit is contained in:
Bin Liu
2022-06-01 07:39:01 +08:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -58,10 +58,7 @@ pub fn setup_master_console(socket_fd: RawFd) -> Result<()> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::skip_if_not_root;
use std::fs::File;
use std::os::unix::net::UnixListener; use std::os::unix::net::UnixListener;
use std::path::PathBuf;
use tempfile::{self, tempdir}; use tempfile::{self, tempdir};
const CONSOLE_SOCKET: &str = "console-socket"; const CONSOLE_SOCKET: &str = "console-socket";

View File

@@ -7,6 +7,7 @@ include ../../../utils.mk
TARGET = runk TARGET = runk
TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET) TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET)
AGENT_SOURCE_PATH = ../../agent
# BINDIR is a directory for installing executable programs # BINDIR is a directory for installing executable programs
BINDIR := /usr/local/bin BINDIR := /usr/local/bin
@@ -26,9 +27,14 @@ clean:
vendor: vendor:
cargo vendor cargo vendor
test: test: test-runk test-agent
test-runk:
cargo test --all --target $(TRIPLE) -- --nocapture cargo test --all --target $(TRIPLE) -- --nocapture
test-agent:
make test -C $(AGENT_SOURCE_PATH) STANDARD_OCI_RUNTIME=yes
check: standard_rust_check check: standard_rust_check
.PHONY: \ .PHONY: \