13 arch=$3 # limit to 1 for now
16 dscfilef=$(readlink -f $dscfile)
17 dscfilef_base=${dscfilef%%.dsc}
21 #? TODO -- should be a parameter as well?
23 testdir=${dscfilef_base}_$arch.testrdepends.$family-$dist
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
37 # All binary packages produced
38 pkgs=$(awk '/^Package:/{print $2;}' Packages)
41 echo "I: Fetching all bdepends for $pkgs in $family $dist under $arch"
42 # need first to provide the necessary scripts out there
43 cp -p $(dirname $0)/nd_fetch_bdepends $bindir
44 $CMD nd_execute $family $dist $arch --bindmounts $testdir $bindir/nd_fetch_bdepends $srcdir $pkgs
46 echo "I: preparing the hook"
47 cat << EOF >| $bindir/D00add_custom_repo
48 echo 'deb file://$debdir ./' >| /etc/apt/sources.list.d/custom.list
51 chmod a+x $bindir/D00add_custom_repo
53 echo "I: Going throught the packages and testing the builds"
55 summary_file=${testdir}.summary
56 echo -e "\nTesting builds against $dscfile" >> $summary_file
58 echo " I: Building $dsc with native versions"
61 nd_build $family $dist $arch $dsc --buildresult=$oldbuildsdir \
62 && old=ok || old=FAILED
63 mv ${dscbase}_$arch.build $oldbuildsdir
64 echo " I: Building $dsc with new versions"
65 nd_build $family $dist $arch $dsc --buildresult=$newbuildsdir \
66 --hookdir=$bindir --bindmount=$testdir \
67 && new=ok || new="FAILED $newbuildsdir/${dscbase}_$arch.build"
68 mv ${dscbase}_$arch.build $newbuildsdir
69 printf '%-40s\t%5s\t%5s\n' $dsc "$old" "$new" >> $summary_file