[Fusionforge-commits] r12195 - in branches/Branch_5_1: . tools tools/VM-scripts

Olivier Berger olberger at libremir.placard.fr.eu.org
Tue Feb 8 16:34:08 CET 2011


Author: olberger
Date: 2011-02-08 16:34:07 +0100 (Tue, 08 Feb 2011)
New Revision: 12195

Added:
   branches/Branch_5_1/tools/VM-scripts/
   branches/Branch_5_1/tools/VM-scripts/README.txt
   branches/Branch_5_1/tools/VM-scripts/build.sh
   branches/Branch_5_1/tools/VM-scripts/install-gui.sh
   branches/Branch_5_1/tools/VM-scripts/install.sh
   branches/Branch_5_1/tools/VM-scripts/run-testsuite.sh
   branches/Branch_5_1/tools/VM-scripts/shrink.sh
   branches/Branch_5_1/tools/VM-scripts/start-selenium.sh
   branches/Branch_5_1/tools/VM-scripts/update.sh
Modified:
   branches/Branch_5_1/
Log:
Adding scripts used inside the VM, initially developped by Roland Mas



Property changes on: branches/Branch_5_1
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:8721-8727
/branches/Branch_5_0:8892,8895,8897-8898,8900,8903-8904,8906-8907,8910,8915,8922,8924,8926,8929,8931-8933,8941,8946,8951,8955,8972-8977,8981,8997,8999,9002,9031-9032,9050,9080-9081,9084-9086,9093-9095,9102-9104,9108,9113-9115,9117-9118,9123,9125,9127-9131,9135-9136,9139,9146,9148-9150,9179-9191,9193-9195,9198,9200,9202,9204,9207,9209,9211,9213,9215,9220-9222,9231,9234-9235,9243,9251,9254,9259,9287,9315,9318,9347-9349,9358,9396,9427,9429,9431-9433,9441-9442,9444-9445,9462,9464,9468,9522-9523,9549,9551-9552,9576-9577,9579,9615,9633-9634,9672-9673,9675-9676,9684,9686-9687,9689,9699,9727,9729,9731,9930-9932,9935,9956,9980,10005-10006,10021,10024,10027,10064,10081-10082,10273,10285,10820-10824,10868,10872,10876-10878,10880,10918,11015,11017,11058-11060,11085-11086,11160-11165,11252-11253,11287,11294,11581,11619-11620,11679,11722-11723,11726-11734,11758,11804,11817,11907,11974
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7478,7480,7485,7490-7492,7505,7540,7556-7560,7568,7570-7571,7573,7576,7580,7609-7611,7613,7615,7618,7621-7622,7625-7627,7639,7658,7661,7663-7664,7666-7667,7673,7675,7678,7680,7685,7688-7689,7693,7700,7706-7708,7713,7725,7728-7742,7760,7763-7764,7767,7769-7770,7773,7776,7784-7785,7791,7797,7799,7802-7808,7810-7811,7816,7818,7825-7828,7839,7846-7847,7850,7894,7902,7920-7922,7927-7928,7932,7936-7937,7939,7942,7944-7945,7947,7951,7956,7958,7960,8064,8079-8080,8108,8113,8119,8121,8127-8128,8145,8197,8201-8202,8216,8224,8226,8228,8247-8250,8252,8271-8272,8310-8311,8328,8337,8339-8357,8361,8371,8373-8375,8378-8379,8383-8396,8415,8427-8431,8438-8441,8449,8452-8453,8458,8461,8477-8478,8480,8482,8492,8514,8530,8604-8605,8608,8637,8662,8674,8751,8754,8756,8760-8761,8812,8850,8945,8995,8998,9004-9006,9124,9137,9141,9317,9443,9469,9670,9701,9726,9934,10013
/branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504,7567,7577,7623-7624,7638,7659-7660,7662,7665,7668,7674,7699,7746-7748,7771,7774,7786,7838

   + /trunk:8721-8727
/branches/Branch_4_7:6879,6881,6884,6897,6899,6902,6904,6906,6909,6911,6922,6932,6936,6939,6942,6944,6946-6948,6954,6956,6959,7000-7001,7012,7111,7130-7131,7133-7134,7138,7140-7142,7147-7148,7159-7160,7163,7168,7177,7179,7203,7205,7207,7210,7212,7251-7253,7255,7284,7287,7291,7293,7295-7296,7300,7355,7365-7366,7375-7376,7378,7395,7423-7426,7435,7458,7504,7567,7577,7623-7624,7638,7659-7660,7662,7665,7668,7674,7699,7746-7748,7771,7774,7786,7838
/branches/Branch_4_8:7334-7335,7344-7345,7382,7387,7389-7390,7396,7398,7401-7402,7428-7429,7437,7440,7443,7449-7455,7459,7462,7466,7469-7470,7476-7478,7480,7485,7490-7492,7505,7540,7556-7560,7568,7570-7571,7573,7576,7580,7609-7611,7613,7615,7618,7621-7622,7625-7627,7639,7658,7661,7663-7664,7666-7667,7673,7675,7678,7680,7685,7688-7689,7693,7700,7706-7708,7713,7725,7728-7742,7760,7763-7764,7767,7769-7770,7773,7776,7784-7785,7791,7797,7799,7802-7808,7810-7811,7816,7818,7825-7828,7839,7846-7847,7850,7894,7902,7920-7922,7927-7928,7932,7936-7937,7939,7942,7944-7945,7947,7951,7956,7958,7960,8064,8079-8080,8108,8113,8119,8121,8127-8128,8145,8197,8201-8202,8216,8224,8226,8228,8247-8250,8252,8271-8272,8310-8311,8328,8337,8339-8357,8361,8371,8373-8375,8378-8379,8383-8396,8415,8427-8431,8438-8441,8449,8452-8453,8458,8461,8477-8478,8480,8482,8492,8514,8530,8604-8605,8608,8637,8662,8674,8751,8754,8756,8760-8761,8812,8850,8945,8995,8998,9004-9006,9124,9137,9141,9317,9443,9469,9670,9701,9726,9934,10013
/branches/Branch_5_0:8892,8895,8897-8898,8900,8903-8904,8906-8907,8910,8915,8922,8924,8926,8929,8931-8933,8941,8946,8951,8955,8972-8977,8981,8997,8999,9002,9031-9032,9050,9080-9081,9084-9086,9093-9095,9102-9104,9108,9113-9115,9117-9118,9123,9125,9127-9131,9135-9136,9139,9146,9148-9150,9179-9191,9193-9195,9198,9200,9202,9204,9207,9209,9211,9213,9215,9220-9222,9231,9234-9235,9243,9251,9254,9259,9287,9315,9318,9347-9349,9358,9396,9427,9429,9431-9433,9441-9442,9444-9445,9462,9464,9468,9522-9523,9549,9551-9552,9576-9577,9579,9615,9633-9634,9672-9673,9675-9676,9684,9686-9687,9689,9699,9727,9729,9731,9930-9932,9935,9956,9980,10005-10006,10021,10024,10027,10064,10081-10082,10273,10285,10820-10824,10868,10872,10876-10878,10880,10918,11015,11017,11058-11060,11085-11086,11160-11165,11252-11253,11287,11294,11581,11619-11620,11679,11722-11723,11726-11734,11758,11804,11817,11907,11974


Added: branches/Branch_5_1/tools/VM-scripts/README.txt
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/README.txt	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/README.txt	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,20 @@
+See ~/Desktop/README.html which contains some docs.
+
+See also :
+https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Virtual_machine_development_environment
+for some more details.
+
+The ~/fusionforge "directory" should hold the to-be-tested tested
+contents of the repository.
+
+It may conveniently be a soft link pointing to a trunk checkout or a
+branch checkout if you intend to have several branches under test in
+the same VM.
+
+For instance, one may :
+
+# cd ~
+# bzr checkout svn://scm.fusionforge.org/svnroot/fusionforge/trunk fusionforge-trunk
+# ln -s fusionforge-trunk fusionforge
+
+-- Olivier Berger

Added: branches/Branch_5_1/tools/VM-scripts/build.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/build.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/build.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,32 @@
+#! /bin/sh
+
+# removed as the grep test below would break otherwise
+#set -e
+
+#set -x
+
+# Pupulate the repo
+rm -rf /root/debian-repository
+mkdir -p /root/debian-repository
+mini-dinstall -b
+
+cd /root/fusionforge/src
+f=$(mktemp)
+cp debian/changelog $f
+
+# The build is likely to fail if /tmp is too short.
+# When filesystem is too much full, the boot scripts mount a tmpfs /tmp that is far too small to allow builds,
+# but still gets unnoticed.
+# We assume here that you didn't change the VM partitions layout and that /tmp is not a mounted partition.
+mount | grep /tmp
+if [ $? -eq 0 ]; then
+    echo "WARNING: It is likely that the mounted /tmp could be too short. If you experience a build error bellow, Try make some room on the FS and reboot, first."
+fi
+
+dch --newversion 999+$(date +%Y%m%d%H%M%S)-1 --distribution local --force-distribution "Autobuilt."
+debuild --no-lintian --no-tgz-check -us -uc -tc
+
+debrelease -f local
+mv $f debian/changelog
+
+cd


Property changes on: branches/Branch_5_1/tools/VM-scripts/build.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/install-gui.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/install-gui.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/install-gui.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+apt-get install -y nodm xfce4
+sed -i -e 's/^NODM_ENABLED=.*/NODM_ENABLED=true/' -e 's/^NODM_USER=.*/NODM_USER=root/' /etc/default/nodm
+/etc/init.d/nodm restart


Property changes on: branches/Branch_5_1/tools/VM-scripts/install-gui.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/install.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/install.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/install.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+set -e
+set -x
+
+aptitude update
+if dpkg -l fusionforge-full | grep -q ^ii ; then
+    # Already installed, upgrading
+    /root/scripts/reload-db.sh
+    UCF_FORCE_CONFFNEW=yes LANG=C DEBIAN_FRONTEND=noninteractive aptitude -y dist-upgrade
+else
+    # Initial installation
+    UCF_FORCE_CONFFNEW=yes LANG=C DEBIAN_FRONTEND=noninteractive aptitude -y install postgresql-8.4
+    UCF_FORCE_CONFFNEW=yes LANG=C DEBIAN_FRONTEND=noninteractive aptitude -y install gforge-db-postgresql
+    UCF_FORCE_CONFFNEW=yes LANG=C DEBIAN_FRONTEND=noninteractive aptitude -y install fusionforge-full
+    /usr/share/gforge/bin/forge_set_password admin myadmin
+    a2dissite default
+    invoke-rc.d apache2 restart
+    su - postgres -c "pg_dump -Fc gforge" > /root/dump
+fi


Property changes on: branches/Branch_5_1/tools/VM-scripts/install.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/run-testsuite.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/run-testsuite.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/run-testsuite.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+export CONFIG_PHP=/root/fusionforge/tests/func/config.php.ffsandbox
+
+# Run the phpunit + Selenium functional tests
+cd /root/fusionforge/tests
+if [ "$*" = "" ] ; then
+    phpunit --verbose SeleniumTests.php
+else
+    for i in $* ; do
+	phpunit --verbose $i
+    done
+fi
+
+# If available, run the JUnit OSLC provider test suite
+if [ -d /root/fusionforge/src/plugins/oslc/tests ]; then
+    cd /root/fusionforge/src/plugins/oslc/tests
+    ./setup-provider-test.sh
+    ./run-provider-tests.sh
+fi


Property changes on: branches/Branch_5_1/tools/VM-scripts/run-testsuite.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/shrink.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/shrink.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/shrink.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+apt-get clean
+aptitude clean
+find /var/cache -type f | xargs rm
+rm -rf /tmp/*
+rm -rf /root/debian-repository
+# Maven2 stuff
+rm -rf /root/.m2/
+rm -f /root/.bzr/repository/obsolete_packs/*
+rm -f /root/fusionforge-trunk/*999*
+rm -f /var/log/*.gz
+rm -f /var/lib/aptitude/pkgstates.old
+
+df -h /
+
+mount -oremount,ro /
+fsck -fpC /dev/sda1
+zerofree -v /dev/sda1
+mount -oremount,rw /
+swapoff -a
+dd if=/dev/zero of=/dev/sda5
+mkswap /dev/sda5


Property changes on: branches/Branch_5_1/tools/VM-scripts/shrink.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/start-selenium.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/start-selenium.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/start-selenium.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+cd /root/fusionforge/3rd-party/selenium
+make


Property changes on: branches/Branch_5_1/tools/VM-scripts/start-selenium.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Branch_5_1/tools/VM-scripts/update.sh
===================================================================
--- branches/Branch_5_1/tools/VM-scripts/update.sh	                        (rev 0)
+++ branches/Branch_5_1/tools/VM-scripts/update.sh	2011-02-08 15:34:07 UTC (rev 12195)
@@ -0,0 +1,19 @@
+#! /bin/sh
+
+aptitude update
+aptitude dist-upgrade
+
+# Make sure to add tools needed for build.sh
+aptitude bzr install mini-dinstall devscripts dpatch sharutils docbook-to-man
+
+set -e
+
+cd /root/fusionforge
+
+if [ -d .bzr/ ] ; then
+    bzr update
+else
+    git pull
+fi
+
+


Property changes on: branches/Branch_5_1/tools/VM-scripts/update.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the Fusionforge-commits mailing list