diff --git a/library/rust b/library/rust new file mode 100644 index 0000000000000..fec5f2c65ef1f --- /dev/null +++ b/library/rust @@ -0,0 +1,14 @@ +# this file is generated via https://github.com/rust-lang-nursery/docker-rust/blob/28f9bc3266a89d640a23d29a5056cc66fb6e38d3/generate-stackbrew-library.sh + +Maintainers: Steven Fackler (@sfackler) +GitRepo: https://github.com/rust-lang-nursery/docker-rust.git + +Tags: 1.19.0-stretch, 1-stretch, 1.19-stretch, stretch, 1.19.0, 1, 1.19, latest +Architectures: amd64, arm32v7, i386, ppc64le, s390x +GitCommit: 01ce3e6230bc87557058a38b342f9e15aae3856c +Directory: 1.19.0/stretch + +Tags: 1.19.0-jessie, 1-jessie, 1.19-jessie, jessie +Architectures: amd64, arm32v7, i386, ppc64le, s390x +GitCommit: 01ce3e6230bc87557058a38b342f9e15aae3856c +Directory: 1.19.0/jessie diff --git a/test/config.sh b/test/config.sh index 72661a890114c..59fed154d4f63 100644 --- a/test/config.sh +++ b/test/config.sh @@ -190,6 +190,9 @@ imageTests+=( ruby-bundler ruby-nonroot ' + [rust]=' + rust-hello-world + ' [silverpeas]=' silverpeas-basics ' diff --git a/test/tests/run-rust-in-container.sh b/test/tests/run-rust-in-container.sh new file mode 100755 index 0000000000000..9790d135712e0 --- /dev/null +++ b/test/tests/run-rust-in-container.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -e + +testDir="$(readlink -f "$(dirname "$BASH_SOURCE")")" +runDir="$(dirname "$(readlink -f "$BASH_SOURCE")")" + +source "$runDir/run-in-container.sh" "$testDir" "$1" cargo run -q --manifest-path=container/Cargo.toml + diff --git a/test/tests/rust-hello-world/container/Cargo.toml b/test/tests/rust-hello-world/container/Cargo.toml new file mode 100644 index 0000000000000..bccef9c0840a5 --- /dev/null +++ b/test/tests/rust-hello-world/container/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "container" +version = "0.1.0" +authors = ["Steven Fackler "] + +[dependencies] +libc = "0.2" # just make sure we can pull dependencies diff --git a/test/tests/rust-hello-world/container/src/main.rs b/test/tests/rust-hello-world/container/src/main.rs new file mode 100644 index 0000000000000..e7a11a969c037 --- /dev/null +++ b/test/tests/rust-hello-world/container/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/test/tests/rust-hello-world/expected-std-out.txt b/test/tests/rust-hello-world/expected-std-out.txt new file mode 100644 index 0000000000000..af5626b4a114a --- /dev/null +++ b/test/tests/rust-hello-world/expected-std-out.txt @@ -0,0 +1 @@ +Hello, world! diff --git a/test/tests/rust-hello-world/run.sh b/test/tests/rust-hello-world/run.sh new file mode 120000 index 0000000000000..ad54c79eed321 --- /dev/null +++ b/test/tests/rust-hello-world/run.sh @@ -0,0 +1 @@ +../run-rust-in-container.sh \ No newline at end of file