Merge pull request #2343 from cgwalters/cargo-workspace

build-sys: Add toplevel workspace Cargo.toml
This commit is contained in:
Colin Walters authored and GitHub committed 2021-04-15 19:32:11 -04:00
commit e4d42be31f
7 files changed
+27 -4

No files matched your search

-2
View File
@@ -1,2 +0,0 @@
target/
Cargo.lock
+8 -1
View File
@@ -6,10 +6,14 @@ use ostree::prelude::*;
use crate::test::*;
fn skip_non_ostree_host() -> bool {
!std::path::Path::new("/run/ostree-booted").exists()
}
#[itest]
fn test_sysroot_ro() -> Result<()> {
// TODO add a skipped identifier
if !std::path::Path::new("/run/ostree-booted").exists() {
if skip_non_ostree_host() {
return Ok(());
}
let cancellable = Some(gio::Cancellable::new());
@@ -34,6 +38,9 @@ fn test_sysroot_ro() -> Result<()> {
#[itest]
fn test_immutable_bit() -> Result<()> {
if skip_non_ostree_host() {
return Ok(());
}
// https://bugzilla.redhat.com/show_bug.cgi?id=1867601
cmd_has_output(sh_inline::bash_command!("lsattr -d /").unwrap(), "-i-")?;
Ok(())
+1 -1
View File
@@ -12,6 +12,6 @@ all:
install:
install -D -m 0644 -t $(KOLA_TESTDIR) $(LIBSCRIPTS)
for x in $(TESTDIRS); do rsync -rlv ./$${x} $(KOLA_TESTDIR)/; done
install -D -m 0755 -t $(KOLA_TESTDIR)/nondestructive-rs ../inst/target/release/ostree-test
install -D -m 0755 -t $(KOLA_TESTDIR)/nondestructive-rs ../../target/release/ostree-test
install -D -m 0644 destructive-stamp.ign $(KOLA_TESTDIR)/destructive-rs/config.ign
./install-wrappers.sh destructive-list.txt $(KOLA_TESTDIR)/destructive-rs
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
# Run this script after e.g. `sudo make install` in a development container/host
# to run tests which operate on the installed binaries.
set -xeuo pipefail
dn=$(dirname $0)
(cd ${dn}/../tests/inst && cargo run --release)