You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First you need to build the images for running tests on, see [`BUILD_OS_IMAGE.md`](./docs/BUILD_OS_IMAGE.md). The `test-manager` then needs to be configured to use the image.
67
+
68
+
Here is an example of how to create a new OS configuration for Linux and macOS:
69
+
70
+
### Linux
71
+
72
+
```bash
73
+
# Create or edit configuration
74
+
# The image is assumed to contain a test runner service set up as described in ./docs/BUILD_OS_IMAGE.md
75
+
cargo run --bin test-manager set debian11 qemu ./os-images/debian11.qcow2 linux \
76
+
--package-type deb --architecture x64 \
77
+
--provisioner ssh --ssh-user test --ssh-password test
78
+
79
+
# Try it out to see if it works - you should reach the VM's graphical desktop environment
80
+
cargo run --bin test-manager run-vm debian11
81
+
```
82
+
83
+
### macOS
84
+
85
+
86
+
```bash
87
+
# Download some VM image
88
+
tart clone ghcr.io/cirruslabs/macos-ventura-base:latest ventura-base
89
+
90
+
# Create or edit configuration
91
+
# Use SSH to deploy the test runner since the image doesn't contain a runner
92
+
cargo run --bin test-manager set macos-ventura tart ventura-base macos \
To automatically download and test a pre-built version of the app, use the `test-by-version.sh` script, see `test-by-version.sh --help` for instructions.
103
+
104
+
To manually invoke `test-manager`, start by checking out the desired git version of this repo. Next, [build the app](../BuildInstructions.md) for the target platform then build the GUI test binary using `$(cd ../gui && npm run build-test-executable)`. The newly built packages will be located in the `../dist` folder by default.
105
+
106
+
Next: build the `test-runner`
107
+
108
+
### Building the test runner
62
109
63
110
Building the `test-runner` binary is done with the `build-runner.sh` script.
64
111
Currently, only `x86_64` platforms are supported for Windows/Linux and `ARM64` (Apple Silicon) for macOS.
65
112
66
113
For example, building `test-runner` for Windows would look like this:
67
114
68
115
```bash
69
-
./container-run.sh ./build-runner.sh windows
116
+
./scripts/container-run.sh ./scripts/build-runner.sh windows
70
117
```
71
118
72
-
## Linux
73
-
Using `podman` is the recommended way to build the `test-runner`. See the [Linux section under Prerequisities](#Prerequisities) for more details.
119
+
####Linux
120
+
Using `podman` is the recommended way to build the `test-runner`. See the [Linux section under Prerequisities](#prerequisites) for more details.
74
121
75
122
```bash
76
-
./container-run.sh ./build-runner.sh linux
123
+
./scripts/container-run.sh ./scripts/build-runner.sh linux
77
124
```
78
125
79
-
## macOS
126
+
####macOS
80
127
81
128
```bash
82
-
./build-runner.sh macos
129
+
./scripts/build-runner.sh macos
83
130
```
84
131
85
-
## Windows
132
+
####Windows
86
133
The `test-runner` binary for Windows may be cross-compiled from a Linux host.
87
134
88
135
```bash
89
-
./container-run.sh ./build-runner.sh windows
136
+
./scripts/container-run.sh ./scripts/build-runner.sh windows
90
137
```
91
138
92
-
# Building base images
93
-
94
-
See [`BUILD_OS_IMAGE.md`](./docs/BUILD_OS_IMAGE.md) for how to build images for running tests on.
95
-
96
-
# Running tests
139
+
### Running the tests
97
140
98
-
See `cargo run --bin test-manager` for details.
141
+
After configuring the VM image using `test-manager set` and building the required packages (see [previous step](#setting-up-testing-environment)), `test-manager run-tests` is used to launch the tests. See `cargo run --bin test-manager -- run-tests --help` for details.
99
142
100
-
## Linux
143
+
Here is an example of how to run all tests using the Linux/macOS VM we set up earlier:
101
144
102
-
Here is an example of how to create a new OS configuration and then run all tests:
145
+
#### Linux
103
146
104
147
```bash
105
-
# Create or edit configuration
106
-
# The image is assumed to contain a test runner service set up as described in ./docs/BUILD_OS_IMAGE.md
107
-
cargo run --bin test-manager set debian11 qemu ./os-images/debian11.qcow2 linux \
108
-
--package-type deb --architecture x64 \
109
-
--provisioner ssh --ssh-user test --ssh-password test
110
-
111
-
# Try it out to see if it works - you should reach the VM's graphical desktop environment
112
-
cargo run --bin test-manager run-vm debian11
113
-
114
148
# Run all tests
115
-
cargo run --bin test-manager run-tests debian11 \
149
+
cargo run --bin test-manager run-tests --vm debian11 \
116
150
--display \
117
151
--account 0123456789 \
118
152
--app-package <git hash or tag> \
119
153
--app-package-to-upgrade-from 2023.2
120
154
```
121
155
122
-
## macOS
123
-
124
-
Here is an example of how to create a new OS configuration (on Apple Silicon) and then run all
125
-
tests:
156
+
#### macOS
126
157
127
158
```bash
128
-
# Download some VM image
129
-
tart clone ghcr.io/cirruslabs/macos-ventura-base:latest ventura-base
130
-
131
-
# Create or edit configuration
132
-
# Use SSH to deploy the test runner since the image doesn't contain a runner
133
-
cargo run --bin test-manager set macos-ventura tart ventura-base macos \
cargo run --bin test-manager run-tests macos-ventura \
160
+
cargo run --bin test-manager run-tests --vm macos-ventura \
142
161
--display \
143
162
--account 0123456789 \
144
163
--app-package <git hash or tag> \
145
164
--app-package-to-upgrade-from 2023.2
146
165
```
147
166
148
-
## Note on `ci-runtests.sh`
167
+
## Note on `scripts/ci-runtests.sh`
149
168
150
-
Account tokens are read (newline-delimited) from the path specified by the environment variable
151
-
`ACCOUNT_TOKENS`. Round robin is used to select an account for each VM.
169
+
`scripts/ci-runtests.sh` is the script that GitHub actions uses to invokes the `test-manager`, with similar functionality as `test-by-version.sh`. Note that account tokens are read (newline-delimited) from the path specified by the environment variable `ACCOUNT_TOKENS`. Round robin is used to select an account for each VM.
0 commit comments