summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-06-26 09:00:43 +0200
committerGitHub <noreply@github.com>2024-06-26 09:00:43 +0200
commit7dc9a7b9107b2607e9870d7fc92fb2d40505f7ef (patch)
tree3b1bfe9958b324b5bd0768b48bfa76aaaa3eecc7 /test
parentafcdb1184799526f20954e475af990254d772cd4 (diff)
parente65cf1d265210738a9b3c0b811fbfeffa0741c39 (diff)
downloadhello-nix-7dc9a7b9107b2607e9870d7fc92fb2d40505f7ef.tar.gz
Merge pull request #2 from aehlig/import-rules
Import rust rules and add a minimal example
Diffstat (limited to 'test')
-rw-r--r--test/TARGETS1
-rw-r--r--test/rust/TARGETS8
-rw-r--r--test/rust/hello/TARGETS8
-rw-r--r--test/rust/hello/test_hello.sh3
4 files changed, 20 insertions, 0 deletions
diff --git a/test/TARGETS b/test/TARGETS
index 54f7274..3d3eacd 100644
--- a/test/TARGETS
+++ b/test/TARGETS
@@ -4,6 +4,7 @@
, "dirs":
[ [["./", "hello", ""], "hello"]
, [["./", "proto", ""], "proto"]
+ , [["./", "rust", ""], "rust"]
, [["./", "withExtendedPath", ""], "withExtendedPath"]
]
}
diff --git a/test/rust/TARGETS b/test/rust/TARGETS
new file mode 100644
index 0000000..713ff64
--- /dev/null
+++ b/test/rust/TARGETS
@@ -0,0 +1,8 @@
+{ "":
+ { "type": "install"
+ , "tainted": ["test"]
+ , "dirs":
+ [ [["./", "hello", ""], "hello"]
+ ]
+ }
+}
diff --git a/test/rust/hello/TARGETS b/test/rust/hello/TARGETS
new file mode 100644
index 0000000..ab48819
--- /dev/null
+++ b/test/rust/hello/TARGETS
@@ -0,0 +1,8 @@
+{ "": {"type": "install", "tainted": ["test"], "deps": ["hello"]}
+, "hello":
+ { "type": ["@", "rules", "shell/test", "script"]
+ , "name": ["hello"]
+ , "test": ["test_hello.sh"]
+ , "deps": [["@", "src", "rust/hello", ""]]
+ }
+}
diff --git a/test/rust/hello/test_hello.sh b/test/rust/hello/test_hello.sh
new file mode 100644
index 0000000..531f888
--- /dev/null
+++ b/test/rust/hello/test_hello.sh
@@ -0,0 +1,3 @@
+set -e
+
+./hello | grep -i world