build-sys: Add toplevel workspace Cargo.toml
authorColin Walters <walters@verbum.org>
Thu, 15 Apr 2021 15:13:31 +0000 (11:13 -0400)
committerColin Walters <walters@verbum.org>
Thu, 15 Apr 2021 16:33:34 +0000 (12:33 -0400)
rust-analyzer is happier with this because it understands
the project structure out of the box.

We aren't actually again adding a dependency on Rust/cargo in the core,
this is only used to make `cargo build` work out of the box to build
the Rust test code.

Cargo.toml [new file with mode: 0644]
Makefile.am
tests/inst/.gitignore [deleted file]
tests/kolainst/Makefile

diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644 (file)
index 0000000..b2aa3f4
--- /dev/null
@@ -0,0 +1,6 @@
+# Today, this repository only uses Rust for tests.  This
+# toplevel Cargo.toml helps tools like rust-analyzer understand
+# that this project contains Rust code.  We don't otherwise currently
+# use `cargo` for any part of the core build.
+[workspace]
+members = ["tests/inst"]
index b2588ad723cf3dd4fa048bb41d366a865a0f2698..2f3cb53f3339d42c66d81650ba2f931aacb0f559 100644 (file)
@@ -46,6 +46,9 @@ GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in gtk-doc.make
 # Generated by coreos-assembler build-fast and kola
 GITIGNOREFILES += fastbuild-*.qcow2 _kola_temp/
 
+# Rust stuff
+GITIGNOREFILES += target/ Cargo.lock
+
 SUBDIRS += .
 
 if ENABLE_GTK_DOC
diff --git a/tests/inst/.gitignore b/tests/inst/.gitignore
deleted file mode 100644 (file)
index 2c96eb1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-target/
-Cargo.lock
index acfdc3b71f25cd52a5e6db7cac70cd179c2f95a4..5dc18281a5eb9df6679c26ee2dc19cf39ab4379b 100644 (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