Add debian package to build on jenkins

This commit is contained in:
Johannes 'josch' Schauer 2016-08-16 09:36:10 +02:00
parent a7b02fc427
commit 627c2f6598
3 changed files with 28 additions and 0 deletions

5
debian/changelog vendored Normal file
View file

@ -0,0 +1,5 @@
deb-m-a-dep-check (1) UNRELEASED; urgency=low
* dummy
-- dummy <dummy> Thu, 01 Jan 1970 00:00:00 +0000

6
debian/control vendored Normal file
View file

@ -0,0 +1,6 @@
Source: deb-m-a-dep-check
Maintainer: dummy maintainers
Build-Depends: apt, bash, bc, dose-builddebcheck, dose-extra, dpkg-dev
Package: dummy
Architecture: all

17
debian/rules vendored Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
set -eu
set -o pipefail
[ "$1" = binary ] || exit 0
./generate_testcases.sh | xargs --max-args=8 ./check.sh 2>../buildlog.txt | tee ../results.txt
num_results=$(wc -l < ../results.txt)
echo "Num-Testcases: $num_results"
echo "Perc-All-Agree: $(echo "scale=2;$(grep -E ' 0 0 0$| 1 1 1$' ../results.txt | wc -l)*100/$num_results" | bc) %"
echo "Perc-Dose-Apt-Agree: $(echo "scale=2;$(grep -E ' 0 0 .$| 1 1 .$' ../results.txt | wc -l)*100/$num_results" | bc) %"
echo "Perc-Dose-Dpkg-Agree: $(echo "scale=2;$(grep -E ' 0 . 0$| 1 . 1$' ../results.txt | wc -l)*100/$num_results" | bc) %"
echo "Perc-Apt-Dpkg-Agree: $(echo "scale=2;$(grep -E ' . 0 0$| . 1 1$' ../results.txt | wc -l)*100/$num_results" | bc) %"
echo "buildlog.txt - -\nresults.txt - -" > debian/files