Chase Qi | 09edc7f | 2016-08-18 13:18:50 +0800 | [diff] [blame] | 1 | Getting started |
| 2 | =============== |
| 3 | git clone https://git.linaro.org/qa/test-definitions.git |
| 4 | cd ./test-definitions |
| 5 | . ./automated/bin/setenv.sh |
| 6 | test-runner -h |
| 7 | |
| 8 | Running test |
| 9 | ============ |
| 10 | Both test script and corresponding test definition files provided in the same |
| 11 | folder that named with the test case name. |
| 12 | |
| 13 | Test script can be run independently, you may need to specify parameters |
| 14 | manually as needed. |
| 15 | |
| 16 | Test definition file in YAML format created for each test to |
| 17 | - Define default test parameters |
| 18 | - Run test with local test-runner, which supports to run a set of tests |
| 19 | defined in agenda file, customized parameters are supported as well. |
| 20 | - Run test in LAVA(Linaro Automation and Validation Architecture) |
| 21 | |
| 22 | Running test script |
| 23 | ------------------ |
| 24 | linux: |
| 25 | cd ./automated/linux/smoke/ |
| 26 | ./smoke.sh |
| 27 | # skip package installation. |
| 28 | ./smoke.sh -s true |
| 29 | |
| 30 | android: |
| 31 | cd ./automated/android/dd-wr-speed/ |
| 32 | ./dd-wr-speed.sh |
| 33 | # Specify SN when more than one device connected. |
| 34 | ./dd-wr-speed.sh -s "serial_no" |
| 35 | # Specify other params. |
| 36 | ./dd-wr-speed.sh -i "10" -p "/dev/block/mmcblk1p1" |
| 37 | |
| 38 | Using test-runner |
| 39 | ---------------- |
| 40 | single test run: |
| 41 | test-runner -d ./automated/linux/smoke/smoke.yaml |
| 42 | # skip package install |
| 43 | test-runner -d ./automated/linux/smoke/smoke.yaml -s |
| 44 | |
| 45 | running test plan: |
| 46 | # Run a set of tests defined in agenda file. |
Chase Qi | 9752efa | 2017-07-21 16:02:58 +0800 | [diff] [blame] | 47 | test-runner -p ./plans/linux-example.yaml |
Chase Qi | a158efe | 2017-11-17 12:35:11 +0800 | [diff] [blame] | 48 | # Apply test plan overlay to skip, amend or add tests. |
| 49 | test-runner -p ./plans/linux-example.yaml -O test-plan-overlay-example.yaml |
Chase Qi | 09edc7f | 2016-08-18 13:18:50 +0800 | [diff] [blame] | 50 | |
| 51 | Collecting result |
| 52 | ================= |
| 53 | Please find test results in the following locations. |
| 54 | - ${OUTPUT} and ${RESULT_FILE} for each test are defined in the test case. |
| 55 | - test-runner parse stdout.log and save result to ${test_path} |
| 56 | - test-runner combines results of executed tests and save them in |
| 57 | ${OUTPUT}/results.csv, |
| 58 | - ${OUTPUT} path of test-runner can be modified with '-o' |
Dan Rue | f51ede7 | 2017-06-07 16:50:33 -0500 | [diff] [blame] | 59 | |
| 60 | Contributing |
| 61 | ============ |
| 62 | |
| 63 | Changes need to be able to pass the following check, which will check files in |
| 64 | the most recent commit: |
| 65 | |
| 66 | python3 validate.py -g -s SC1091 |
| 67 | |
| 68 | To develop locally, there are Dockerfiles in test/ that can be used to simulate |
| 69 | target environments. The easiest way to use is to run `test.sh |
| 70 | [debian|centos]`. test.sh will run validate.py, and then build the Docker |
| 71 | environment specified, run plans/linux-example.yaml, and then drop into a bash |
| 72 | shell inside the container so that things like /root/output can be inspected. |
| 73 | It is not (yet) a pass/fail test; merely a development helper and validation |
| 74 | environment. |