From b30e50942b77a6bebdf8a74bd118cd2f06744abd Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Thu, 26 Sep 2013 16:16:58 +0100 Subject: Morph now executes extensions in the repository containing the morphologies --- morphlib/plugins/deploy_plugin.py | 2 +- tests.deploy/deploy-cluster.script | 12 ++++++------ tests.deploy/deploy-rawdisk.script | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index dc9f5158..35bb2b6e 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -461,7 +461,7 @@ class DeployPlugin(cliapp.Plugin): self.app.runcmd( [ext_filename] + args, ['sh', '-c', 'while read l; do echo `date "+%F %T"` $l; done'], - env=env, stdout=None, stderr=None) + cwd=repo_dir, env=env, stdout=None, stderr=None) if delete_ext: os.remove(ext_filename) diff --git a/tests.deploy/deploy-cluster.script b/tests.deploy/deploy-cluster.script index 917ac717..0efc8d3c 100755 --- a/tests.deploy/deploy-cluster.script +++ b/tests.deploy/deploy-cluster.script @@ -18,7 +18,6 @@ # Test "morph deploy" by deploying the systems in cluster morphology. - set -eu @@ -35,12 +34,13 @@ cd "$DATADIR/workspace/branch1" linux-system-2.HOSTNAME="baserock-rocks-even-more" \ > /dev/null -test -e hello-system.img -test -e linux-system-1.tar -test -e linux-system-2.tar +outputdir=test:morphs +test -e $outputdir/hello-system.img +test -e $outputdir/linux-system-1.tar +test -e $outputdir/linux-system-2.tar -hostname1=$(tar -xf linux-system-1.tar ./etc/hostname -O) -hostname2=$(tar -xf linux-system-2.tar ./etc/hostname -O) +hostname1=$(tar -xf $outputdir/linux-system-1.tar ./etc/hostname -O) +hostname2=$(tar -xf $outputdir/linux-system-2.tar ./etc/hostname -O) [ "$hostname1" = baserock-rocks ] [ "$hostname2" = baserock-rocks-even-more ] diff --git a/tests.deploy/deploy-rawdisk.script b/tests.deploy/deploy-rawdisk.script index ebda50c7..257ef0dd 100755 --- a/tests.deploy/deploy-rawdisk.script +++ b/tests.deploy/deploy-rawdisk.script @@ -27,5 +27,7 @@ cd "$DATADIR/workspace/branch1" "$SRCDIR/scripts/test-morph" build linux-system "$SRCDIR/scripts/test-morph" --log "$DATADIR/deploy.log" \ deploy rawdisk_test_cluster > /dev/null -test -e disk.img + +outputdir="test:morphs" +test -e $outputdir/disk.img -- cgit v1.2.1