summaryrefslogtreecommitdiff
path: root/openembedded/robotframework-test.yaml
blob: 4d46e53708bc5932c79574a94772c9279e11634e (plain)
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
metadata:
    format: Lava-Test Test Definition 1.0 
    name: robotframework-lxc 
    description: "Used for running Robotframework tests"
    maintainer:
        - arthur.she@linaro.org
    os: 
        - openembedded
        - ubuntu
        - debian
    scope:
        - functional
    devices:
        - lxc

params:
    RF_TEST_CASES_REPO: "https://github.com/linaro-home/lhg-robotframework-test.git"
    RF_TEST_CASE: "x-test/xtest-regression.robot"

run:
    steps:
        # Install Robot framework
        - lava-test-case install-robotframework --shell pip install robotframework==3.0.2
        - lava-test-case install-robotframework-seleniumlibrary --shell pip install robotframework-seleniumlibrary==3.0.1
        - lava-test-case install-robotframework-angularjs --shell pip install robotframework-angularjs==0.0.6
        - lava-test-case install-robotframework-sshlibrary --shell pip install robotframework-sshlibrary==2.1.2
        - lava-test-case install-robotframework-appiumlib --shell pip install robotframework-appiumlibrary
        - lava-test-case install-python-pillow --shell pip install pillow
        # Checkout Robot framework test cases
        - lava-test-case checkout-robotfrmework-test-cases --shell git clone $RF_TEST_CASES_REPO
        - ls
        - if [ -n "$http_proxy" ]; then unset http_proxy; fi
        - env
        # Wait client IP address
        - ifconfig -a
        - TARGET_IP=$(lava-target-ip)
        - lava-test-case lxc-ping-target --shell ping -c4 $TARGET_IP
        # Run Robot framework test case
        - IFS=','
        - for t in $RF_TEST_CASE
        - do
        - TEST_DIR=$(dirname lhg-robotframework-test/$t); pushd $TEST_DIR
        - TEST_CASE=$(basename $t)
        - lava-test-case robotframework-test --shell robot -v TARGET:$TARGET_IP $TEST_CASE
        - popd
        - done 

parse:
    pattern: "^(?P<test_case_id>\\w[\\w\\s-]+\\w+)\\s{2,}\\|\\s(?P<result>(FAIL|PASS))"
    fixupdict:
        FAIL: fail
        PASS: pass