File: 900_test_pbuilder.sh

package info (click to toggle)
cowdancer 0.47
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 696 kB
  • ctags: 179
  • sloc: ansic: 2,634; sh: 407; makefile: 116; cpp: 6; python: 4
file content (31 lines) | stat: -rw-r--r-- 918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# system test:
# test pbuilder work.
# assume /var/cache/pbuilder/base.tgz exists
# /var/cache/pbuilder/build/cow/{orig,work$$}/xxxx 

# this test requires root privs for pbuilder.

if [[ $(uname -mn ) != "dancer64 x86_64" ]]; then
    echo 'skip this test'
    exit 0;
fi

if [[ "$PBCURRENTCOMMANDLINEOPERATION" = build ]]; then
    echo 'skip this test'
    exit 0;
fi

set -ex

if [ ! -x /usr/sbin/pbuilder ]; then
    echo Skipping pbuilder test.
    exit 0;
fi

sudo rm -rf /var/cache/pbuilder/base-test.cow
sudo cowbuilder --create --hookdir /usr/share/doc/pbuilder/examples/workaround/ --debootstrap debootstrap --debootstrapopts --verbose --basepath /var/cache/pbuilder/base-test.cow
sudo cowbuilder --update --hookdir /usr/share/doc/pbuilder/examples/workaround/ --basepath /var/cache/pbuilder/base-test.cow
pdebuild --pbuilder cowbuilder -- --basepath /var/cache/pbuilder/base-test.cow

echo end