-
Notifications
You must be signed in to change notification settings - Fork 9
/
cargo-maelstrom.toml
92 lines (81 loc) · 3.27 KB
/
cargo-maelstrom.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Because it has no `filter` field, this directive applies to all tests.
[[directives]]
# Don't bother enabling the network. We can set to "loopback" to run on the
# cluster using only the loopback network, or to "local" to only run on the
# local machine but with full network access.
#
# This is the default value:
network = "loopback"
# Don't bother creating a writable container for our test. It can still write to /tmp .
#
# This is the default value:
enable_writable_file_system = false
# Have our tests run with root as a working directory.
#
# This is the default value:
# working_directory = "/"
# Run our test as root.
#
# These are the default values:
# user = 0
# group = 0
# This layer just includes files and directories for mounting the following
# file-systems and devices.
layers = [
{ stubs = [ "/{proc,sys,tmp,etc}/", "/dev/{full,null,random,urandom,zero}" ] },
{ paths = ["/etc/resolv.conf"], follow_symlinks = true },
]
# Provide /tmp, /proc, /sys, and some devices in /dev/. These are used pretty
# commonly by tests.
mounts = [
{ type = "tmp", mount_point = "/tmp" },
{ type = "proc", mount_point = "/proc" },
{ type = "sys", mount_point = "/sys" },
{ type = "devices", devices = ["full", "null", "random", "urandom", "zero"] },
]
# Forward the RUST_BACKTRACE and RUST_LIB_BACKTRACE environment variables.
# Later directives can override the `environment` key, but the `added_environment` key is only
# additive. By using it here we ensure it applies to all tests regardless of other directives.
[directives.added_environment]
RUST_BACKTRACE = "$env{RUST_BACKTRACE:-0}"
RUST_LIB_BACKTRACE = "$env{RUST_LIB_BACKTRACE:-0}"
# This directive shows how to use a container image from hub.docker.com.
# This directive will override some things from the other one we defined above, but it will inherit
# mounts and devices from that directive.
#
# [[directives]]
# # Only apply to tests in the "require_full_os" package.
# filter = "package.equals(requires_full_os)"
#
# # This refers to a hub.docker.com image.
# image.name = "docker://alpline:latest"
#
# # What do we wish to actually utilize from the image?
# # Here we pick environment variables and file-system.
# image.use = [ "environment", "layers" ]
#
# # Add our own layers on top of the image ones to ensure we have a place to mount out special
# # file-systems and devices
# added_layers = [
# { stubs = [ "/{proc,sys,tmp}/", "/dev/{full,null,random,urandom,zero}" ] },
# ]
# This directive illustrates how to apply a change to one specific test "tests::my_special_test" in
# package "package_a". Here we change the user and group to be used for this test to 1000.
# Everything else we inherit from the first directive in this file.
#
# [[directives]]
# filter = "package.equals(package_a) && name.equals(tests::my_special_test)"
# user = 1000
# group = 1000
# Some useful filters to use in directives.
#
# # Select all tests from "package_a".
# filter = "package.equals(package_a)"
#
# # Select an integration test called "my_integration_test" from package "package_a".
# filter = "package.equals(package_a) && test.equals(my_integration_test)"
#
# # Select a test named "my_test" from any package.
# filter = "name.equals(my_test)"
# # Select tests from any package starting with "foo_".
# filter = "package.starts_with(foo_)"