aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/node_cli.c
AgeCommit message (Expand)AuthorFilesLines
2018-10-01thread: Add show threads apiMohsin Kazmi1-2/+2
2018-09-24Trivial: Clean up some typos.Paul Vinciguerra1-4/+4
2018-08-28vlib: add 'show node' and 'set node function' CLIDamjan Marion1-35/+248
2017-10-04[aarch64] Fixes CLI crashes on dpaa2 platform.Christophe Fontaine1-1/+1
2017-03-09vlib_mains == 0 special cases be goneDave Barach1-19/+9
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+466
color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* 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 */
#!/usr/bin/env bash

source vars

args=
single_test=0
persist_set=0
unconfigure_set=0
debug_set=0

for i in "$@"
do
case "${i}" in
    --persist=*)
        persist="${i#*=}"
        if [ $persist = "true" ]; then
            args="$args -persist"
            persist_set=1
        fi
        ;;
    --debug=*)
        debug="${i#*=}"
        if [ $debug = "true" ]; then
            args="$args -debug"
            debug_set=1
        fi
        ;;
    --verbose=*)
        verbose="${i#*=}"
        if [ $verbose = "true" ]; then
            args="$args -verbose"
        fi
        ;;
    --unconfigure=*)
        unconfigure="${i#*=}"
        if [ $unconfigure = "true" ]; then
            args="$args -unconfigure"
            unconfigure_set=1
        fi
        ;;
    --cpus=*)
        args="$args -cpus ${i#*=}"
        ;;
    --test=*)
        tc_name="${i#*=}"
        if [ $tc_name != "all" ]; then
            single_test=1
            args="$args -run $tc_name"
        fi
esac
done

if [ $single_test -eq 0 ] && [ $persist_set -eq 1 ]; then
    echo "persist flag is not supported while running all tests!"
    exit 1
fi

if [ $unconfigure_set -eq 1 ] && [ $single_test -eq 0 ]; then
    echo "a single test has to be specified when unconfigure is set"
    exit 1
fi

if [ $persist_set -eq 1 ] && [ $unconfigure_set -eq 1 ]; then
    echo "setting persist flag and unconfigure flag is not allowed"
    exit 1
fi

if [ $single_test -eq 0 ] && [ $debug_set -eq 1 ]; then
    echo "VPP debug flag is not supperted while running all tests!"
    exit 1
fi

sudo -E go test -buildvcs=false -v $args