Debian Codegraph @

tests/qmlapicheck.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 #
3 # Copyright 2013 Canonical Ltd.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; version 3.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 ################################################################################
18
19 source `dirnamescip-shell system . . dirname. $0`/../export_qml_dir.sh || exit 1
20
21 if [scip-shell system . . `[`. ! -e $BUILD_DIR/qml/Lomiri/Layouts/libLomiriLayouts.so ]; then
22 echoscip-shell system . . echo. You need to build UITK before you can dump QML API!
23 exit 1
24 fi
25
26 CPP="Lomiri.Components Lomiri.Components.ListItems Lomiri.Components.Popups Lomiri.Components.Pickers Lomiri.Components.Styles Lomiri.Components.Themes Lomiri.Layouts Lomiri.PerformanceMetrics Lomiri.Metrics Lomiri.Test"
27 echoscip-shell system . . echo. Dumping QML API of C++ components
28 testscip-shell system . . test. -s $BUILD_DIR/components.api.new && rmscip-shell system . . rm. $BUILD_DIR/components.api.new
29 envscip-shell system . . env. ALARM_BACKEND=memory \
30 $BUILD_DIR/apicheck/apicheck \
31 --qml $CPP 1>> $BUILD_DIR/components.api.new &&
32 echoscip-shell system . . echo. Verifying the diff between existing and generated API
33 if [scip-shell system . . `[`. $? -gt 0 ]; then
34 echoscip-shell system . . echo. Error: apicheck failed
35 else
36 diffscip-shell system . . diff. -F '[.0-9]' -u $SRC_DIR/components.api $BUILD_DIR/components.api.new && \
37 echo API is all fine. && exit 0
38 echoscip-shell system . . echo. Differences in API. Did you forget to update components.api?
39 exit 1
40 fi