12 arch=$3 # limit to 1 for now
15 dscfilef=$(readlink -f $dscfile)
16 dscfilebase=${dscfilef%%.dsc}
20 #? TODO -- should be a parameter as well?
22 testdir=$PWD/$pkg-$arch.test-bdepends
26 oldbuildsdir=$srcdir/old
27 newbuildsdir=$srcdir/new
29 echo "I: Building the new package for $pkg"
31 mkdir -p $debdir $srcdir $bindir
32 $CMD nd_build $family $dist $arch $dscfile --buildresult=$debdir
35 dpkg-scanpackages . >| Packages
38 echo "I: Fetching all bdepends for $pkg in $family $dist under $arch"
39 # need first to provide the necessary scripts out there
40 cp -p $(dirname $0)/nd_fetch_bdepends $bindir
41 $CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $pkg $srcdir
43 echo "I: preparing the hook"
44 cat << EOF >| $bindir/D00add_custom_repo
45 echo 'deb file://$debdir ./' >| /etc/apt/sources.list.d/custom.list
48 chmod a+x $bindir/D00add_custom_repo
50 echo "I: Going throught the packages and testing the builds"
52 summary_file=${dscfilebase}_$arch.$family-$dist.test-rdeps
53 echo -e "\nTesting builds against $dscfile" >> $summary_file
54 for dsc in *dipy*.dsc; do
55 echo " I: Building $dsc with native versions"
58 nd_build $family $dist $arch $dsc --buildresult=$oldbuildsdir \
59 && old=ok || old=FAILED
60 mv ${dscbase}_$arch.build $oldbuildsdir
61 echo " I: Building $dsc with new versions"
62 nd_build $family $dist $arch $dsc --buildresult=$newbuildsdir \
63 --hookdir=$bindir --bindmount=$testdir \
64 && new=ok || new="FAILED $newbuildsdir/${dscbase}_$arch.build"
65 mv ${dscbase}_$arch.build $newbuildsdir
66 printf '%-20s\t%5s\t%5s\n' $dsc "$old" "$new" >> $summary_file