-
Notifications
You must be signed in to change notification settings - Fork 11
108 lines (100 loc) · 4.62 KB
/
system_tests.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
name: "System tests"
on:
workflow_call: {}
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-pc-windows-gnu
# By default, setup-rust-toolchain sets "-D warnings". As a side effect, the settings in
# .cargo/config.toml are ignored:
# https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags
# "There are four mutually exclusive sources of extra flags"
rustflags: ""
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r tests/minimal_suite/requirements.txt
- uses: actions/download-artifact@v4
with:
name: rcc
path: C:\
# MSVC uses vctip.exe for telemetry. vctip.exe is started as a child of termination.exe. This
# can cause CI failures, if "vctip.exe" does not terminate before `get_children` is called.
# It is unclear why MSVC is running, despite target=x86_64-pc-windows-gnu. The following
# command is intended turn off telemetry via vctip.exe.
- shell: pwsh
run: Get-ChildItem -Filter vctip.exe -Recurse "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC" | rm
- run: cargo test --target=x86_64-pc-windows-gnu --test test_plan_run --test test_agent_plugin -- --ignored
- run: cargo run --example termination --target=x86_64-pc-windows-gnu
- run: cargo run --example termination --target=x86_64-pc-windows-gnu -- C:\windows64\rcc.exe
- run: mkdir C:\managed_robots
- run: tar --create -z --directory tests\minimal_suite\ --file C:\managed_robots\minimal_suite.tar.gz *
- run: net user "test_user" "uCjV*NRE#XH2a" /add
- run: cargo test --target=x86_64-pc-windows-gnu --test test_scheduler -- --nocapture --ignored
env:
TEST_DIR: C:\test_scheduler
RCC_BINARY_PATH: C:\windows64\rcc.exe
MANAGED_ROBOT_ARCHIVE_PATH: C:\managed_robots\minimal_suite.tar.gz
N_SECONDS_RUN_MAX: 600
TEST_USER: test_user
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: system_test_debug_information_windows
path: C:\test_scheduler
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: x86_64-unknown-linux-gnu
# By default, setup-rust-toolchain sets "-D warnings". As a side effect, the settings in
# .cargo/config.toml are ignored:
# https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags
# "There are four mutually exclusive sources of extra flags"
rustflags: ""
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- run: pip install -r tests/minimal_suite/requirements.txt
- uses: actions/download-artifact@v4
with:
name: rcc
path: /tmp/
# file permissions are not retained during upload:
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
- run: chmod +x /tmp/linux64/rcc
- run: cargo test --target=x86_64-unknown-linux-gnu --test test_plan_run --test test_agent_plugin -- --ignored
- run: cargo run --example termination --target=x86_64-unknown-linux-gnu
- run: cargo run --example termination --target=x86_64-unknown-linux-gnu -- /tmp/linux64/rcc
- run: mkdir /tmp/managed_robots
- run: tar --create --gzip --directory tests/minimal_suite/ --file /tmp/managed_robots/minimal_suite.tar.gz .
- run: cargo test --target=x86_64-unknown-linux-gnu --test test_scheduler -- --nocapture --ignored
env:
TEST_DIR: /tmp/test_scheduler
RCC_BINARY_PATH: /tmp/linux64/rcc
MANAGED_ROBOT_ARCHIVE_PATH: /tmp/managed_robots/minimal_suite.tar.gz
N_SECONDS_RUN_MAX: 300
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: system_test_debug_information_linux
path: /tmp/test_scheduler
- run: cargo test --target=x86_64-unknown-linux-gnu --test test_ht_import_scheduler -- --nocapture --ignored
env:
TEST_DIR: /tmp/test_ht_import_scheduler
RCC_BINARY_PATH: /tmp/linux64/rcc
N_SECONDS_RUN_MAX: 120
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: system_test_debug_information_ht_import
path: /tmp/test_ht_import_scheduler