[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 1874bb929b47280859d731940651414a60b7f90f

Roland Mas lolando at fusionforge.org
Mon Nov 17 14:00:10 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  1874bb929b47280859d731940651414a60b7f90f (commit)
      from  6dcd388213dd7624818084699fedba4d19f55366 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1874bb929b47280859d731940651414a60b7f90f
Author: Roland Mas <lolando at debian.org>
Date:   Mon Nov 17 13:59:58 2014 +0100

    Backport from master : use new local LXC wrapper to start/stop LXC VMs

diff --git a/tests/scripts/destroy_vm b/tests/scripts/destroy_vm
index 8fd32b6..b1330d3 100755
--- a/tests/scripts/destroy_vm
+++ b/tests/scripts/destroy_vm
@@ -1,19 +1,5 @@
-#! /bin/sh 
+#! /bin/sh
 
-scriptdirname=`dirname $0`
-scriptdirparent=`cd $scriptdirname/..;pwd`
-scriptdir=$scriptdirparent/scripts
-configdir=$scriptdirparent/config
-. $scriptdirparent/scripts/common-vm
+HOST=$1
 
-read_param_vm "$@"
-
-# Start script for this engine must exist
-if [ ! -x $scriptdirparent/${VMENGINE}/destroy ]
-then 
-	echo "Don't know how to destroy ${VMENGINE} engine"
-	echo "$scriptdirparent/${VMENGINE}/destroy not found"
-	exit 4
-else
-	$scriptdirparent/${VMENGINE}/destroy
-fi
+sudo /usr/local/sbin/lxc-wrapper destroy $(basename $HOST .local)
diff --git a/tests/scripts/fusionforge-build-and-test-deb.sh b/tests/scripts/fusionforge-build-and-test-deb.sh
index 2e6ea2a..bb35709 100755
--- a/tests/scripts/fusionforge-build-and-test-deb.sh
+++ b/tests/scripts/fusionforge-build-and-test-deb.sh
@@ -90,8 +90,9 @@ rm $CHANGEFILE
 
 cd $CHECKOUTPATH
 
-destroy_vm -t $VM $HOST
-start_vm_if_not_keeped -t $VM $HOST
+$(dirname $0)/destroy_vm $HOST
+$(dirname $0)/start_vm $HOST
+
 setup_debian_3rdparty_repo
 
 # Transfer preseeding
diff --git a/tests/scripts/fusionforge-build-and-test-rpm.sh b/tests/scripts/fusionforge-build-and-test-rpm.sh
index 7fdc1b9..16e98fb 100755
--- a/tests/scripts/fusionforge-build-and-test-rpm.sh
+++ b/tests/scripts/fusionforge-build-and-test-rpm.sh
@@ -21,8 +21,9 @@ case $HOST in
 esac	
 
 prepare_workspace
-destroy_vm -t $VM $HOST
-start_vm_if_not_keeped -t $VM $HOST
+
+$(dirname $0)/destroy_vm $HOST
+$(dirname $0)/start_vm $HOST
 
 setup_redhat_3rdparty_repo
 
diff --git a/tests/scripts/fusionforge-build-and-test-src-cos.sh b/tests/scripts/fusionforge-build-and-test-src-cos.sh
index 01e242c..71d23d6 100755
--- a/tests/scripts/fusionforge-build-and-test-src-cos.sh
+++ b/tests/scripts/fusionforge-build-and-test-src-cos.sh
@@ -21,8 +21,9 @@ case $HOST in
 esac	
 
 prepare_workspace
-destroy_vm -t $VM $HOST
-start_vm_if_not_keeped -t $VM $HOST
+
+$(dirname $0)/destroy_vm $HOST
+$(dirname $0)/start_vm $HOST
 
 setup_redhat_3rdparty_repo
 
diff --git a/tests/scripts/fusionforge-build-and-test-src-deb.sh b/tests/scripts/fusionforge-build-and-test-src-deb.sh
index 1e8cee8..be912f7 100755
--- a/tests/scripts/fusionforge-build-and-test-src-deb.sh
+++ b/tests/scripts/fusionforge-build-and-test-src-deb.sh
@@ -23,8 +23,9 @@ export FILTER="DEBDebian70TestsSRC.php"
 
 get_config $@
 prepare_workspace
-destroy_vm -t $VM $@
-start_vm_if_not_keeped -t $VM $@
+
+$(dirname $0)/destroy_vm $HOST
+$(dirname $0)/start_vm $HOST
 
 setup_debian_3rdparty_repo
 
diff --git a/tests/scripts/start_vm b/tests/scripts/start_vm
index d4810e7..495bab3 100755
--- a/tests/scripts/start_vm
+++ b/tests/scripts/start_vm
@@ -1,22 +1,8 @@
-#! /bin/sh 
+#! /bin/sh
 
-scriptdirname=`dirname $0`
-scriptdirparent=`cd $scriptdirname/..;pwd`
-scriptdir=$scriptdirparent/scripts
-configdir=$scriptdirparent/config
-. $scriptdirparent/scripts/common-vm
+HOST=$1
 
-read_param_vm $@
-
-# Start script for this engine must exist
-if [ ! -x $scriptdirparent/${VMENGINE}/start ]
-then 
-	echo "Don't know how to run ${VMENGINE} engine"
-	echo "$scriptdirparent/${VMENGINE}/start not found"
-	exit 4
-else
-	$scriptdirparent/${VMENGINE}/start
-fi
+sudo /usr/local/sbin/lxc-wrapper start $(basename $HOST .local)
 
 # Loop until engine is up and ssh is running
 test_host () {
diff --git a/tests/scripts/stop_vm b/tests/scripts/stop_vm
index 8af6f78..a67cb32 100755
--- a/tests/scripts/stop_vm
+++ b/tests/scripts/stop_vm
@@ -1,19 +1,5 @@
-#! /bin/sh -e
+#! /bin/sh
 
-scriptdirname=`dirname $0`
-scriptdirparent=`cd $scriptdirname/..;pwd`
-scriptdir=$scriptdirparent/scripts
-configdir=$scriptdirparent/config
-. $scriptdirparent/scripts/common-vm
+HOST=$1
 
-read_param_vm "$@"
-
-# Start script for this engine must exist
-if [ ! -x $scriptdirparent/${VMENGINE}/stop ]
-then 
-	echo "Don't know how to stop ${VMENGINE} engine"
-	echo "$scriptdirparent/${VMENGINE}/stop not found"
-	exit 4
-else
-	$scriptdirparent/${VMENGINE}/stop
-fi
+sudo /usr/local/sbin/lxc-wrapper stop $(basename $HOST .local)

-----------------------------------------------------------------------

Summary of changes:
 tests/scripts/destroy_vm                           |   20 +++-----------------
 tests/scripts/fusionforge-build-and-test-deb.sh    |    5 +++--
 tests/scripts/fusionforge-build-and-test-rpm.sh    |    5 +++--
 .../scripts/fusionforge-build-and-test-src-cos.sh  |    5 +++--
 .../scripts/fusionforge-build-and-test-src-deb.sh  |    5 +++--
 tests/scripts/start_vm                             |   20 +++-----------------
 tests/scripts/stop_vm                              |   20 +++-----------------
 7 files changed, 21 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list