From 028e182ba9e6e05ee8132d97ca16449aa9cb6aec Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Fri, 30 May 2014 23:22:14 +0200 Subject: [PATCH 1/6] Set a hostname even if the environment variable is not set --- vagrantSandbox/Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 65c0eecb6..09476c10b 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure("2") do |config| config.vm.synced_folder "..", "/FOAM-sources" - config.vm.hostname="vagrant."+ENV["HOSTNAME"] + config.vm.hostname="vagrant."+ (ENV["HOSTNAME"] || `hostname`) nrCPU=1 if ENV["WM_VAGRANT_CPUS"] From a88f338560af8a2840cb9b8908d50ad394bb886e Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Fri, 30 May 2014 23:24:50 +0200 Subject: [PATCH 2/6] Make sure that the machine has at least the 1.5 Gig memory which are needed to run the whole test-Harness --HG-- extra : amend_source : 406d5899c72b9601d1912491771a82498b3d6304 --- vagrantSandbox/Vagrantfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 09476c10b..88f96db09 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -25,8 +25,9 @@ Vagrant.configure("2") do |config| # # Use VBoxManage to customize the VM. For example to change memory: # vb.customize ["modifyvm", :id, "--memory", "1024"] vb.cpus=nrCPU - # make sure each CPU has enough memory - vb.memory=512*(1+nrCPU) + # make sure each CPU has enough memory (at least 1.5 Gig) + vb.memory=512*[(1+nrCPU),3].max + end end # default From 47e66aa64601e1b31419ddef1abd122dcbe1f379 Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Fri, 30 May 2014 23:39:46 +0200 Subject: [PATCH 3/6] Added vagrant machine trusty with Ubuntu 14.04 LTS --- vagrantSandbox/Vagrantfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 88f96db09..5e7ee31ce 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -28,6 +28,14 @@ Vagrant.configure("2") do |config| # make sure each CPU has enough memory (at least 1.5 Gig) vb.memory=512*[(1+nrCPU),3].max end + + config.vm.define :trusty do |trusty| + trusty.vm.box = "ubuntu/trusty64" + trusty.vm.box_check_update = true + trusty.vm.provision :shell do |s| + s.args = "trusty" + s.path = "initUbunutuScript.sh" + end end # default From 7e7434bd090f4232fd754df93f193aae42670e84 Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Sat, 31 May 2014 15:47:23 +0200 Subject: [PATCH 4/6] Additional packages needed vor Ubuntu 14.04 Trusty --- vagrantSandbox/initUbunutuScript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vagrantSandbox/initUbunutuScript.sh b/vagrantSandbox/initUbunutuScript.sh index d883e1df5..ba77ea8ae 100755 --- a/vagrantSandbox/initUbunutuScript.sh +++ b/vagrantSandbox/initUbunutuScript.sh @@ -24,7 +24,7 @@ echo echo "Installing additional packages" echo -neededPackages=(g++ bison flex mercurial git make ccache cmake rpm) +neededPackages=(g++ bison flex mercurial git make ccache cmake rpm zlib1g-dev libiberty-dev) bonusPackages=(emacs csh tcsh zsh) for p in ${neededPackages[@]}; do From 01d9812483f15864d7dba91af3225ccc7668452a Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Sat, 31 May 2014 23:19:50 +0200 Subject: [PATCH 5/6] Adapt script: more memory required for test-suite --- vagrantSandbox/Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 5e7ee31ce..9880aeb95 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure("2") do |config| config.vm.synced_folder "..", "/FOAM-sources" - config.vm.hostname="vagrant."+ (ENV["HOSTNAME"] || `hostname`) + config.vm.hostname="vagrant."+ (ENV["HOSTNAME"] || `hostname`.strip) nrCPU=1 if ENV["WM_VAGRANT_CPUS"] @@ -26,7 +26,7 @@ Vagrant.configure("2") do |config| # vb.customize ["modifyvm", :id, "--memory", "1024"] vb.cpus=nrCPU # make sure each CPU has enough memory (at least 1.5 Gig) - vb.memory=512*[(1+nrCPU),3].max + vb.memory=512*[(1+nrCPU),4].max end config.vm.define :trusty do |trusty| From aaaea3559d21e0fe2369596de5fa2e45d3b15b61 Mon Sep 17 00:00:00 2001 From: "Bernhard F.W. Gschaider" Date: Sat, 31 May 2014 23:36:53 +0200 Subject: [PATCH 6/6] Add description of new vagrant-box to README. Additional script to automatically run tests after building --- vagrantSandbox/README | 7 +++++-- vagrantSandbox/Vagrantfile | 2 +- vagrantSandbox/skel/bootstrapAndTest.sh | 12 ++++++++++++ vagrantSandbox/skel/bootstrapFoam.sh | 3 +++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100755 vagrantSandbox/skel/bootstrapAndTest.sh diff --git a/vagrantSandbox/README b/vagrantSandbox/README index f512f46d2..9acf60067 100644 --- a/vagrantSandbox/README +++ b/vagrantSandbox/README @@ -48,8 +48,9 @@ machine prepended with =vagrant.= * Virtual machines Currently existing virtual machines are - - precise :: Latest LTS Ubuntu. Currently the default machine to use - - lucid :: Previous LTS Ubuntu. Currently problems + - trusty :: Latest LTS 14.04 Ubuntu. Currently the default machine to use + - prescise :: Previous LTS Ubuntu. + - lucid :: Old LTS Ubuntu. Currently problems with automatic setting up (something with the =postfix=-package) - maverick :: Tries to fix the problems with the @@ -75,6 +76,8 @@ the ThirdParty-packages in one go (no paraview and QT). If this works the box is considered operational. The script leaves a log file =bootstrapFoam-log= in the home directory + - bootstrapAndTest.sh :: Calls =bootstrapFoam.sh= and then runs the + =testHarness= in the =foam=-installation * Provisioning scripts Every "family" of machines has a specific script that makes sure that the software packages necessary to compile =Foam= are installed diff --git a/vagrantSandbox/Vagrantfile b/vagrantSandbox/Vagrantfile index 9880aeb95..43827dc9d 100644 --- a/vagrantSandbox/Vagrantfile +++ b/vagrantSandbox/Vagrantfile @@ -4,7 +4,7 @@ Vagrant.configure("2") do |config| config.vm.synced_folder "..", "/FOAM-sources" - config.vm.hostname="vagrant."+ (ENV["HOSTNAME"] || `hostname`.strip) + config.vm.hostname="vagrant_"+ (ENV["HOSTNAME"] || `hostname`.strip) nrCPU=1 if ENV["WM_VAGRANT_CPUS"] diff --git a/vagrantSandbox/skel/bootstrapAndTest.sh b/vagrantSandbox/skel/bootstrapAndTest.sh new file mode 100755 index 000000000..1dcb9fd42 --- /dev/null +++ b/vagrantSandbox/skel/bootstrapAndTest.sh @@ -0,0 +1,12 @@ +#! /usr/bin/env bash + +/home/vagrant/bootstrapFoam.sh + +cd foam/foam-extend-3.0 +source etc/bashrc + +cd testHarness/foam-extend/3.0/runDir + +./Allclean + +./Allrun_Experimental diff --git a/vagrantSandbox/skel/bootstrapFoam.sh b/vagrantSandbox/skel/bootstrapFoam.sh index 8bb0e26c0..b22c5c467 100755 --- a/vagrantSandbox/skel/bootstrapFoam.sh +++ b/vagrantSandbox/skel/bootstrapFoam.sh @@ -23,3 +23,6 @@ source etc/bashrc ./Allwmake 2>&1 | tee --append $BOOTSTRAPLOG +# compile swak4Foam +cd $WM_THIRD_PARTY_DIR +./AllMake.stage5 2>&1 | tee --append $BOOTSTRAPLOG