|
1 |
| -# open-source firmware validation |
| 1 | +# Open Source Firmware Remote Test Environment |
2 | 2 |
|
3 |
| -The following repository contains set of tests and other features to conduct |
4 |
| -Dasharo firmware validation procedures. |
| 3 | +## Warning |
5 | 4 |
|
6 |
| -## Test stands information and architecture |
| 5 | +**!!! WARNING !!!** |
| 6 | +This repository is in the process of migration and multiple major reworks. If |
| 7 | +you do not know what you are doing, consider not using it until at least |
| 8 | +`v0.5.0` is relased. When this is scheduled, link to such a milestone will |
| 9 | +apear here. |
| 10 | +**!!! WARNING !!!** |
7 | 11 |
|
8 |
| -Every validation procedure is carried out on the testing stand, that is |
9 |
| -specially prepared for each platform including: |
| 12 | + |
10 | 13 |
|
11 |
| -* method of connection with the platform, |
12 |
| -* method of controlling platform power supply, |
13 |
| -* method of controlling platform power on, power off and reset, |
14 |
| -* method of flashing the platform. |
| 14 | +The following repository contains set of tests and other features to conduct |
| 15 | +Dasharo firmware validation procedures. |
15 | 16 |
|
16 |
| - |
| 17 | +## Test environment overview |
17 | 18 |
|
18 |
| -## Supported platforms |
| 19 | +In fact, OSFV currently consist of two separated testing environments: |
| 20 | + |
| 21 | +1. Dasharo OSFV (dedicated for all dasharo platforms; consists of modules: |
| 22 | + `dasharo-compatibility`, `dasharo-security`, `dasharo-performance` and |
| 23 | + `dasharo-stability`). |
19 | 24 |
|
20 |
| -| Manufacturer | Platform | Support | $CONFIG | Stand documentation | |
21 |
| -|--------------|-----------------------|---------|--------------------------|------------------------| |
22 |
| -| MSI | PRO Z690-A DDR5 | Limited | `msi-pro-z690-ddr5` | [Documentation][doc_1] | |
23 |
| -| MSI | PRO Z690-A WIFI DDR4 | Limited | `msi-pro-z690-wifi-ddr4` | [Documentation][doc_1] | |
| 25 | +Each of these groups differs in the mechanisms implemented and the extent of |
| 26 | +support for different payloads. |
24 | 27 |
|
25 |
| -[doc_1]: https://docs.dasharo.com/transparent-validation/msi-z690/laboratory-assembly-guide/ |
| 28 | +In addition, keep in mind that due to the approach to generating release files, |
| 29 | +for the `raptor-CS talos2` platform dedicated mechanism for testing environment |
| 30 | +and running tests have been implemented. |
26 | 31 |
|
27 |
| -## Startup and configuration of the environment |
| 32 | +## Supported platforms |
28 | 33 |
|
29 |
| -To set the environment locally, use the following commands: |
| 34 | +| Manufacturer | Platform | Firmware | $CONFIG | |
| 35 | +|--------------|----------------------|--------------------------|----------------------------------------| |
| 36 | +| NovaCustom | NV41MZ | Dasharo | `novacustom-nv41mz` | |
| 37 | +| NovaCustom | NV41MB | Dasharo | `novacustom-nv41mb` | |
| 38 | +| NovaCustom | NS50MU | Dasharo | `novacustom-ns50mu` | |
| 39 | +| NovaCustom | NS70MU | Dasharo | `movacustom-ns70mu` | |
| 40 | +| NovaCustom | NV41PZ | Dasharo | `novacustom-nv41pz` | |
| 41 | +| NovaCustom | NS50PU | Dasharo | `novacustom-ns50pu` | |
| 42 | +| NovaCustom | NS70PU | Dasharo | `novacustom-ns70pu` | |
| 43 | +| MSI | PRO Z690 A WIFI DDR4 | Dasharo | `msi-pro-z690-a-wifi-ddr4` | |
| 44 | +| MSI | PRO Z690 A DDR5 | Dasharo | `msi-pro-z690-a-ddr5` | |
| 45 | +| Protectli | VP2410 | Dasharo | `protectli-vp2410` | |
| 46 | +| Protectli | VP2420 | Dasharo | `protectli-vp2420` | |
| 47 | +| Protectli | VP4630 | Dasharo | `protectli-vp4630` | |
| 48 | +| Protectli | VP4650 | Dasharo | `protectli-vp4650` | |
| 49 | +| Protectli | VP4670 | Dasharo | `protectli-vp4670` | |
| 50 | +| Raptor-CS | TalosII | Dasharo | `raptor-cs_talos2` | |
| 51 | + |
| 52 | +## Getting started |
| 53 | + |
| 54 | +### Initalizing environment |
| 55 | + |
| 56 | +* Clone repository and setup virtualenv: |
30 | 57 |
|
31 | 58 | ```bash
|
| 59 | +git clone https://github.com/Dasharo/open-source-firmware-validation |
| 60 | +cd open-source-firmware-validation |
32 | 61 | git submodule update --init --checkout
|
33 |
| -virtualenv -p $(which python3) robot-venv |
34 |
| -source robot-venv/bin/activate |
35 |
| -pip install -U -r requirements.txt |
| 62 | +python3 -m virtualenv venv |
| 63 | +source venv/bin/activate |
| 64 | +``` |
| 65 | + |
| 66 | +* Install modules (in case of Raptor Talos II platform): |
| 67 | + |
| 68 | +``` |
| 69 | +pip install -U -r requirements-openbmc.txt |
| 70 | +``` |
| 71 | + |
| 72 | +* Install modules (in case of other platforms): |
| 73 | + |
| 74 | +``` |
| 75 | +pip install -r requirements.txt |
36 | 76 | ```
|
37 | 77 |
|
38 |
| -If the environment has been initialized already, use only the following command: |
| 78 | +* If you initialize the environment and try to run the environment again you |
| 79 | + just need to use only this command: |
39 | 80 |
|
40 | 81 | ```bash
|
41 |
| -source robot-venv/bin/activate |
| 82 | +source venv/bin/activate |
42 | 83 | ```
|
43 | 84 |
|
44 |
| -## Runnig test modules, test suites and test cases |
| 85 | +### Running tests |
| 86 | + |
| 87 | +When running tests on Dasharo platforms use the following commands: |
45 | 88 |
|
46 |
| -To run all the test cases dedicated for tested platform, execute the following |
47 |
| -command after initialize the environment: |
| 89 | +* For running single test case: |
48 | 90 |
|
49 | 91 | ```bash
|
50 |
| -./regression.sh |
| 92 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:$CONFIG -v fw_file:$FW_FILE \ |
| 93 | +-t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE |
51 | 94 | ```
|
52 | 95 |
|
53 |
| -To run only one test module, execute the following command after initialize the |
54 |
| -environment: |
| 96 | +* For running single test suite: |
55 | 97 |
|
56 | 98 | ```bash
|
57 |
| -robot -L TRACE -v stand_ip:$STAND_IP -v config:$CONFIG -v fw_file:$FW_FILE ./<module_name> |
| 99 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:$CONFIG -v fw_file:$FW_FILE \ |
| 100 | +$TEST_MODULE/$TEST_SUITE |
58 | 101 | ```
|
59 | 102 |
|
60 |
| -Where: |
| 103 | +* For running single test module: |
| 104 | + |
| 105 | +```bash |
| 106 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:$CONFIG -v fw_file:$FW_FILE \ |
| 107 | +./$TEST_MODULE |
| 108 | +``` |
| 109 | + |
| 110 | +Parameters should be defined as follows: |
| 111 | + |
| 112 | +* $DEVICE_IP - testing manager IP address; for platforms mounted on the stands |
| 113 | + in the lab it will be RTE address; for DUTs, on which we perform tests by |
| 114 | + using SSH connection it will be their own IP address. |
| 115 | +* $FW_FILE - path to and name of the coreboot firmware file, |
| 116 | +* $CONFIG - tested platform config; the value given for this parameter should be |
| 117 | + derived from the configuration name of the corresponding platform (folder |
| 118 | + platform_configs), |
| 119 | +* $TEST_MODULE - name of the test module (i.e. `dasharo-compatibility`), |
| 120 | +* $TEST_SUITE - name of the test suite (i.e. `coreboot-base-port`), |
| 121 | +* $TEST_CASE_ID - ID of the requested to run test case (i.e. `CBP001.001`). |
| 122 | + Note that after test case ID asterisk should be added. This is necessary due |
| 123 | + to the construction of the flag `-t` (or `--test`) |
61 | 124 |
|
62 |
| -* `$STAND_IP` - testing stand IP address. |
63 |
| -* `$CONFIG` - tested platform config. All platform configs are available in |
64 |
| - `platform-configs` folder. |
65 |
| -* `$FW_FILE` - name and path to the firmware file, on which testing should be |
66 |
| - performed. |
| 125 | +When running tests on Talos2 platform use the following commands: |
67 | 126 |
|
68 |
| -To run only one test suite, execute the following command after initialize the |
69 |
| -environment: |
| 127 | +* For running single test case: |
70 | 128 |
|
71 | 129 | ```bash
|
72 |
| -robot -L TRACE -v stand_ip:$STAND_IP -v config:$CONFIG -v fw_file:$FW_FILE ./<module_name>/<suite_name>.robot |
| 130 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ |
| 131 | +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ |
| 132 | +-t $TEST_CASE_ID $TEST_MODULE/$TEST_SUITE |
73 | 133 | ```
|
74 | 134 |
|
75 |
| -* `$STAND_IP` - testing stand IP address. |
76 |
| -* `$CONFIG` - tested platform config. All platform configs are available in |
77 |
| - `platform-configs` folder. |
78 |
| -* `$FW_FILE` - name and path to the firmware file, on which testing should be |
79 |
| - performed. |
| 135 | +* For running single test suite: |
80 | 136 |
|
81 |
| -> Note: If test suite does not contain any test case involving flashing the |
82 |
| -device, `$FW_FILE` parameter might be skipped. |
| 137 | +```bash |
| 138 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ |
| 139 | +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ |
| 140 | +$TEST_MODULE/$TEST_SUITE |
| 141 | +``` |
83 | 142 |
|
84 |
| -To run only one test case, execute the following command after initialize the |
85 |
| -environment: |
| 143 | +* For running single test module: |
86 | 144 |
|
87 | 145 | ```bash
|
88 |
| -robot -L TRACE -t "<case_name>*" -v stand_ip:$STAND_IP -v config:$CONFIG -v fw_file:$FW_FILE ./<module_name>/<suite_name>.robot |
| 146 | +robot -L TRACE -v device_ip:$DEVICE_IP -v config:raptor-cs_talos2 -v fw_file:$FW_FILE \ |
| 147 | +-v bootblock_file:$BOOTBLOCK_FILE -v zImage_file:$ZIMAGE_FILE -v pnor_file:$PNOR_FILE \ |
| 148 | +./$TEST_MODULE |
89 | 149 | ```
|
90 | 150 |
|
91 |
| -* `$STAND_IP` - testing stand IP address. |
92 |
| -* `$CONFIG` - tested platform config. All platform configs are available in |
93 |
| - `platform-configs` folder. |
94 |
| -* `$FW_FILE` - name and path to the firmware file, on which testing should be |
95 |
| - performed. |
| 151 | +Parameters should be defined as follows: |
| 152 | + |
| 153 | +* $DEVICE_IP - OBMC IP address (currently `192.168.20.9`), |
| 154 | +* $FW_FILE - path to and name of the coreboot firmware file, |
| 155 | +* $BOOTBLOCK_FILE - path to and name of the bootblock file, |
| 156 | +* $ZIMAGE_FILE - path to and name of the zImage file, |
| 157 | +* $PNOR_FILE - path to and name of the pnor file, |
| 158 | +* $TEST_MODULE - name of the test module (i.e. `dasharo-compatibility`), |
| 159 | +* $TEST_SUITE - name of the test suite (i.e. `coreboot-base-port`), |
| 160 | +* $TEST_CASE_ID - ID of the requested to run test case (i.e. `CBP001.001`). |
| 161 | + Note that after test case ID asterisk should be added. This is necessary due |
| 162 | + to the construction of the flag `-t` (or `--test`) |
| 163 | + |
| 164 | +## Contributing |
96 | 165 |
|
97 |
| -> Note: If test suite does not contain any test case involving flashing the |
98 |
| -device, `$FW_FILE` parameter might be skipped. |
| 166 | +* Install pre-commit hooks after cloning repository: |
| 167 | + |
| 168 | +```bash |
| 169 | +pre-commit install |
| 170 | +``` |
0 commit comments