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