Skip to content

Commit a853f7c

Browse files
Add tests
1 parent 1e34036 commit a853f7c

5 files changed

Lines changed: 80 additions & 0 deletions

File tree

sbuild/tests/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
results.txt
2+
callgraphs
3+
*.out
4+
*.report

sbuild/tests/results/anna

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tool: cscout
2+
build: success
3+
detect_binaries: success
4+
#binaries: 2
5+
#detect_packages_number: 1
6+
detect_packages: anna
7+
analysis: anna.cs: success
8+
produce_callgraph: anna: success

sbuild/tests/results/cdebconf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
tool: cscout
2+
build: success
3+
detect_binaries: success
4+
#binaries: 156
5+
#detect_packages_number: 10
6+
detect_packages: cdebconf cdebconf-gtk libdebconfclient0 libdebconfclient0-dev cdebconf-udeb cdebconf-priority libdebconfclient0-udeb cdebconf-text-udeb cdebconf-newt-udeb cdebconf-gtk-udeb
7+
#analysis: debconf-communicate.cs: not in USED_BINARIES
8+
analysis: debconf-copydb.cs: success
9+
analysis: debconf-dumpdb.cs: success
10+
#analysis: debconf-escape.cs: not in USED_BINARIES
11+
#analysis: debconf-get-selections.cs: not in USED_BINARIES
12+
analysis: debconf-loadtemplate.cs: success
13+
#analysis: debconf-set-selections.cs: not in USED_BINARIES
14+
#analysis: debconf-show.cs: not in USED_BINARIES
15+
analysis: debconf.cs: success
16+
#analysis: dpkg-preconfigure.cs: not in USED_BINARIES
17+
#analysis: dpkg-reconfigure.cs: not in USED_BINARIES
18+
analysis: gtk.so.cs: success
19+
analysis: libdebconf.so.cs: success
20+
#analysis: libdebconfclient.a.cs: not in USED_BINARIES
21+
analysis: libdebconfclient.so.0.0.0.cs: success
22+
analysis: newt.so.cs: success
23+
#analysis: passthrough.so.cs: not in USED_BINARIES
24+
analysis: rfc822db.so.cs: success
25+
analysis: stack.so.cs: success
26+
analysis: text.so.cs: success
27+
#analysis: textdb.so.cs: not in USED_BINARIES
28+
produce_callgraph: cdebconf: success
29+
produce_callgraph: cdebconf-gtk: success
30+
produce_callgraph: cdebconf-gtk-udeb: failed: fcan
31+
produce_callgraph: cdebconf-newt-udeb: failed: fcan
32+
produce_callgraph: cdebconf-priority: failed: fcan
33+
produce_callgraph: cdebconf-text-udeb: failed: fcan
34+
produce_callgraph: cdebconf-udeb: failed: fcan
35+
produce_callgraph: libdebconfclient0: success
36+
produce_callgraph: libdebconfclient0-dev: success
37+
produce_callgraph: libdebconfclient0-udeb: failed: fcan

sbuild/tests/results/librsync

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
tool: cscout
2+
build: success
3+
detect_binaries: success
4+
#binaries: 15
5+
#detect_packages_number: 4
6+
detect_packages: librsync1 librsync-dev librsync-dbg rdiff
7+
#analysis: isprefix.driver.cs: not in USED_BINARIES
8+
analysis: librsync.so.1.0.2.cs: success
9+
analysis: rdiff.cs: success
10+
produce_callgraph: librsync-dbg: failed: fcan
11+
produce_callgraph: librsync-dev: success
12+
produce_callgraph: librsync1: success
13+
produce_callgraph: rdiff: success

sbuild/tests/test.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /bin/bash
2+
3+
PROJECTS="anna cdebconf librsync"
4+
5+
sudo rm -rf results.txt callgraphs *.out *.report temp
6+
for p in $PROJECTS; do
7+
echo "Testing project: $p"
8+
sudo docker run -it --rm --privileged -v $(pwd)/callgraphs:/callgraphs \
9+
sbuild-cscout sbuild --apt-update --no-apt-upgrade --no-apt-distupgrade \
10+
--batch --stats-dir=/var/log/sbuild/stats --dist=buster --arch=amd64 \
11+
$p 2>&1 | tee $p.out
12+
sed '/^time_elapsed/d' ./callgraphs/$p/*/*/*/report > $p.report
13+
if diff "$p.report" "results/$p"; then
14+
echo "Success: $p" | tee -a results.txt
15+
else
16+
echo "#############FAILED: $p#############" | tee -a results.txt
17+
fi
18+
done

0 commit comments

Comments
 (0)