dev/chroot-test fixups
authorPaul Crowley <paul@lshift.net>
Fri, 17 Dec 2010 18:54:38 +0000
changeset 274 ec60311ce2a6
parent 273 7bae88583a53
child 275 2e781d52f76e
dev/chroot-test fixups
NEWS
dev/chroot-test/create-source-image
dev/chroot-test/run-test
--- a/NEWS	Fri Dec 17 18:19:31 2010 +0000
+++ b/NEWS	Fri Dec 17 18:54:38 2010 +0000
@@ -7,6 +7,7 @@
 * Add the source IP address and other info in the SSH_CONNECTION environment variable
 * Lock log file
 * Make sure authorized_keys file is mode 600
+* Add dev/chroot-test testing code
 
 Upgrading: note the changes to the log file format listed above.
 
--- a/dev/chroot-test/create-source-image	Fri Dec 17 18:19:31 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-set -e
-
-mkdir -p /var/local/cache/pristine
-debootstrap --arch i386 sid /var/local/cache/pristine/sid http://ftp.uk.debian.org/debian/
-
--- a/dev/chroot-test/run-test	Fri Dec 17 18:19:31 2010 +0000
+++ b/dev/chroot-test/run-test	Fri Dec 17 18:54:38 2010 +0000
@@ -9,8 +9,10 @@
 PRISTINE=/var/local/cache/pristine/$DEBVERSION
 
 if [ ! -e $PRISTINE ] ; then
-    echo "Debian pristine image not found, try running create-source-image"
-    echo $PRISTINE
+    echo "Missing:" $PRISTINE
+    echo "Debian pristine image not found, try running these commands as root:"
+    echo mkdir -p /var/local/cache/pristine
+    echo debootstrap $DEBVERSION $PRISTINE http://ftp.uk.debian.org/debian/
     exit -1
 fi
 
@@ -45,7 +47,7 @@
 
 cp -av action $BACKING
 #hg -R ../mercurial-server archive -r default $BACKING/action/mercurial-server
-( cd ../mercurial-server && \
+( cd $(hg root) && \
     hg st -mac0n | cpio -p -0 -d $BACKING/action/mercurial-server )
 
 #cp ../mercurial-server/build/debian/mercurial-server_1.0-1_all.deb $BACKING/action