aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libyang/libyang/run-ptest
blob: 9682540e26bd33ac08b9fb10efa3f18534a3db85 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
# Valid tests to run
tests="utest_binary \
       utest_bits \
       utest_boolean \
       utest_common \
       utest_decimal64 \
       utest_diff \
       utest_empty \
       utest_enumeration \
       utest_hash_table \
       utest_identityref \
       utest_inet_types \
       utest_inout \
       utest_instanceid \
       utest_instanceid_keys \
       utest_int16 \
       utest_int32 \
       utest_int64 \
       utest_int8 \
       utest_json \
       utest_leafref \
       utest_list \
       utest_lyb \
       utest_merge \
       utest_metadata \
       utest_nacm \
       utest_new \
       utest_parser_json \
       utest_parser_xml \
       utest_pattern \
       utest_printer_tree \
       utest_printer_xml \
       utest_plugins \
       utest_range \
       utest_schema \
       utest_schema_mount \
       utest_set \
       utest_string \
       utest_structure \
       utest_tree_data \
       utest_tree_schema_compile \
       utest_uint16 \
       utest_uint32 \
       utest_uint64 \
       utest_uint8 \
       utest_union \
       utest_validation \
       utest_xml \
       utest_xpath \
       utest_yang \
       utest_yangdata \
       utest_yang_types \
       utest_yanglib \
       utest_yin"

# cd into right directory
ptestdir=$(dirname "$(readlink -f "$0")")
cd "$ptestdir"/tests || exit

# Run specified tests
for f in $tests
do
    if test -e ./"$f"; then
        if ./"$f" > ./"$f".out 2> ./"$f".err; then
            echo "PASS: $f"
        else
            echo "FAIL: $f"
        fi
    else
        echo "SKIP: $f"
    fi
done