File: test.cmd

package info (click to toggle)
libgnatcoll 1.7gpl2015-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,280 kB
  • ctags: 1,124
  • sloc: ada: 134,072; python: 4,017; cpp: 1,397; ansic: 1,234; makefile: 368; sh: 152; xml: 31; sql: 6
file content (33 lines) | stat: -rwxr-xr-x 962 bytes parent folder | download
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
#!/bin/sh
# cleanup
gprclean -q -Psimulation
rm -f obj/gnatinspect.db

# build and run gnatinspect the first time
gprbuild -f -q -p -Psimulation
gnatinspect --exit -Psimulation

# check whether there are duplicated rows in entity_refs

size=`wc -c obj/gnatinspect.db`

request="select count(*), * from entity_refs group by entity, file, line, kind, caller, from_instantiation having count(*) > 1;"

# Do not run sqlite itself, since some build machines have an old version
# on the command line, which will think the database is corrupted
#echo "$request" | sqlite3 obj/gnatinspect.db

# make sure timestamps get updated
sleep 2

# rebuild and relaunch gnatinspect
gprbuild -f -q -Psimulation
gnatinspect --exit -Psimulation
size2=`wc -c obj/gnatinspect.db`

if [ "$size" != "$size2" ]; then
   echo "Size of database has changed after rebuilding separates"
fi

# at this stage there are duplications in entity_refs
#echo "$request" | sqlite3 obj/gnatinspect.db