blob: db5a473a6542ad4e61d0b9a5ba214bbaff1b707a [file] [log] [blame]
Thomas Vachuska8189a742015-05-29 10:02:52 -07001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Checks whether all and only the ONOS apps configured in ONOS_APPS are active.
4# -----------------------------------------------------------------------------
5
6aux=/tmp/stc-$$.log
7trap "rm -f $aux $aux.1 $aux.2 2>/dev/null" EXIT
8
9onos ${1:-$OCI} "onos:apps -s -a" > $aux
10cat $aux
11
12# Normalize the installed apps
13cut -c7- $aux | cut -d\ -f1 | sort > $aux.1
14
15# Normalize the expected apps
Thomas Vachuskaa48e3d12015-06-02 09:43:29 -070016apps=${2:-$ONOS_APPS}
17apps=${apps:-drivers,openflow}
Thomas Vachuskafdbc4c22015-05-29 15:53:01 -070018(for app in ${apps//,/ }; do echo org.onosproject.$app; done) | sort > $aux.2
Thomas Vachuska8189a742015-05-29 10:02:52 -070019
20# Check for differences
21diff $aux.1 $aux.2