summaryrefslogtreecommitdiffstats
path: root/templates/feature/agl-demo
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2021-01-14 17:00:23 -0500
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-01-15 23:25:48 +0000
commit198b0ba38aedddd7a1cca2eaf6dcd40414591076 (patch)
tree1c928362a56e261762b0db881ad76058ed1bace2 /templates/feature/agl-demo
parentee473ff99bb5ffda3cf2758d3bc693541ada47eb (diff)
Update demo app runtime dependencies
Update runtime dependencies in demo app recipes to match current binding requirements. Bug-AGL: SPEC-3748 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ibaab8d0d2b00f764946ed8472e76a504647b697e
Diffstat (limited to 'templates/feature/agl-demo')
0 files changed, 0 insertions, 0 deletions
old } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash

result=unkown
ANIMALS=42
PENGUINS=0

get_result () {
    if [ $? -eq "0" ]; then
        echo "pass"
    else
        echo "fail"
    fi
}

get_animals_count() {
    echo $ANIMALS
}

get_penguins_count() {
    echo $PENGUINS
}

echo "My test skeleton"

set -x

# Reporting commands results as they get executed
lava-test-set start print-to-log
echo "Hello"
result=$(get_result)
lava-test-case echo-hello --result $result
echo "Bye !"
result=$(get_result)
lava-test-case echo-bye --result $result
ls
result=$(get_result)
lava-test-case ls --result $result
lava-test-set stop print-to-log

set +x

# Reporting constant tests
lava-test-set start constant
lava-test-case always-pass --result pass
lava-test-case always-fail --result fail
lava-test-set stop constant

# Animals custom testing
animals_count=$(get_animals_count)
if [ $animals_count -ne 0 ]; then
    result_animals=pass
else
    result_animals=fail
fi
penguins_count=$(get_penguins_count)
if [ $penguins_count -ne 0 ]; then
    result_penguins=pass
else
    result_penguins=fail
fi

# Reporting of animals tests
lava-test-set start animals-measure
lava-test-case any-animals --result $result_animals --measurement $animals_count --units animals
lava-test-case any-penguins --result $result_penguins --measurement $penguins_count --units penguins
lava-test-set stop animals-measure

exit 0