tests/unit/utils/HtmlPurifierTest.php -text
tests/unit/utils/TextSanitizerTest.php -text
tests/unit/utils/UtilsTest.php -text
+tools/VM-scripts/README.txt -text
+tools/VM-scripts/build.sh -text
+tools/VM-scripts/configure-scripts.sh -text
+tools/VM-scripts/install-gui.sh -text
+tools/VM-scripts/install.sh -text
+tools/VM-scripts/run-testsuite.sh -text
+tools/VM-scripts/shrink.sh -text
+tools/VM-scripts/start-selenium.sh -text
+tools/VM-scripts/update.sh -text
tools/bugzilla2GForge.pl svneol=native#text/x-perl
tools/check_and_update_forum_role_settings.php -text
tools/cmp-schemas.pl svneol=native#text/x-perl
$status=0;
}
- //foundry stuff - remove this news from the foundry so it has to be re-approved by the admin
- db_query_params ('DELETE FROM foundry_news WHERE news_id=$1',
- array($id));
-
if (!$summary) {
$summary='(none)';
}
--- /dev/null
+The initial setup a user should do is :
+
+ # cd /root
+ # sh .../scripts/configure-scripts.sh BRANCH
+where BRANCH is either 'Branch_5_1' or 'trunk' (without quotes)
+
+This will setup the ~/fusionforge "directory" (actually a link to the
+wanted branch's checked-out copy), that should hold the to-be-tested
+tested contents of the repository.
+
+The 'fusionforge' symlink can be changed to point to another branch
+checkout if you intend to have several branches under test in the same
+VM.
+
+The 'scripts' "directory" is also a symlink to the tools/VM-scripts/
+dir inside the corresponding checked-out branch.
+
+
+For using the other scripts 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.
+
+-- Olivier Berger
--- /dev/null
+#! /bin/sh
+
+# Authors :
+# Roland Mas
+# Olivier BERGER <olivier.berger@it-sudparis.eu>
+
+# This script will build the Debian packages to be tested
+
+# Prerequisite : running 'update.sh' and its prerequisites
+
+
+# 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
--- /dev/null
+#! /bin/sh
+
+# Author : Olivier BERGER <olivier.berger@it-sudparis.eu>
+
+# This script will checkout the needed branch and will setup the
+# scripts symlink to give the correct up-to-date scripts versions to
+# the user
+
+if [ $# -ne 1 ]; then
+ echo "Please provide branch name to work on (Branch_5_1|trunk)"
+ exit 1
+fi
+
+cd $HOME
+
+if [ -f ./fusionforge ]; then
+ if [ ! -L ./fusionforge ]; then
+ echo "You have an existing ./fusionforge file or directory. Stopping."
+ exit 1
+ fi
+fi
+
+BRANCH="$1"
+
+if [ "$BRANCH" = "trunk" -o "$BRANCH" = "Branch_5_1" ]; then
+ if [ -d "./fusionforge-$BRANCH" ]; then
+ echo "Assuming './fusionforge-$BRANCH/' already contains a bzr checkout of the $BRANCH. Please check following output of 'bzr info' :"
+ (cd "./fusionforge-$BRANCH/" && bzr info)
+ else
+ if [ "$BRANCH" = "trunk" ]; then
+ echo "no 'fusionforge-trunk/' dir found : checking out from SVN's trunk with 'bzr checkout svn://scm.fusionforge.org/svnroot/fusionforge/trunk' :"
+ bzr checkout svn://scm.fusionforge.org/svnroot/fusionforge/trunk fusionforge-trunk
+ else
+ echo "no 'fusionforge-$BRANCH/' dir found : checking out from SVN's $BRANCH with 'bzr checkout svn://scm.fusionforge.org/svnroot/fusionforge/branches/$BRANCH' :"
+ bzr checkout "svn://scm.fusionforge.org/svnroot/fusionforge/branches/$BRANCH" "fusionforge-$BRANCH"
+ fi
+ fi
+else
+ echo "The supplied branch : $BRANCH wasn't recognized. Maybe the script is now outdated"
+ exit 1
+fi
+
+if [ -L ./fusionforge ]; then
+ oldlink=$(ls -ld ./fusionforge)
+ echo "Removing old ./fusionforge link ($oldlink)"
+ rm ./fusionforge
+fi
+
+echo "Creating a link from './fusionforge' to 'fusionforge-$BRANCH'"
+ln -s "fusionforge-$BRANCH" fusionforge
+
+if [ -d scripts ]; then
+ echo "Saving old 'scripts/' dir in 'scripts.old/'."
+ mv scripts scripts.old
+fi
+
+if [ -L ./scripts ]; then
+ oldlink=$(ls -ld ./scripts)
+ echo "Removing old ./scripts link ($oldlink)"
+ rm ./scripts
+fi
+
+echo "Creating a link from 'fusionforge-$BRANCH/tools/VM-scripts/' to './scripts'."
+ln -s "fusionforge-$BRANCH/tools/VM-scripts/" scripts
+
+if [ -L scripts/reload-db.sh ]; then
+ oldlink=$(ls -ld scripts/reload-db.sh)
+ echo "Removing old scripts/reload-db.sh link ($oldlink)"
+ rm scripts/reload-db.sh
+fi
+
+echo "Creating a link from 'fusionforge-$BRANCH/tests/func/db_reload.sh' to 'scripts/reload-db.sh'."
+ln -s "../../tests/func/db_reload.sh" scripts/reload-db.sh
+
--- /dev/null
+#! /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
--- /dev/null
+#! /bin/sh
+
+
+# Authors :
+# Roland Mas
+# Olivier BERGER <olivier.berger@it-sudparis.eu>
+
+# This script will install the Debian packages to be tested which have been build inside the VM
+
+# Prerequisite : running 'build.sh' and its prerequisites
+
+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
--- /dev/null
+#! /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
--- /dev/null
+#! /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
--- /dev/null
+#! /bin/sh
+
+# Authors :
+# Roland Mas
+# Olivier BERGER <olivier.berger@it-sudparis.eu>
+
+# This script will start the Selenium server which will execute the tests on the installed forge
+
+# Prerequisite : having run 'install.sh' and its prerequisites
+
+# Note that there may be problems with the firefox profile and SSL
+# certificate. Refer to
+# https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Virtual_machine_development_environment
+# to find instructions to workaround these.
+
+echo
+echo "You may wish to install a graphical environment (gnome, kde, lxde, ...) to run the selenium server inside the VM's display."
+echo
+
+cd /root/fusionforge/3rd-party/selenium
+make
--- /dev/null
+#! /bin/sh
+
+# Authors :
+# Roland Mas
+# Olivier BERGER <olivier.berger@it-sudparis.eu>
+
+# This script will update the system and the checked-out branch to the
+# latest state to be tested.
+
+# Prerequisite : running 'sh scripts/configure-scripts.sh' once
+
+# First, make sure the Debian distro is up-to-date
+aptitude update
+aptitude dist-upgrade
+
+# Make sure to add tools needed for build.sh
+aptitude install bzr mini-dinstall devscripts dpatch sharutils docbook-to-man
+
+set -e
+
+cd /root/fusionforge
+
+# If using bzr, or git, update accordingly
+if [ -d .bzr/ ] ; then
+ bzr update
+else
+ git pull
+fi
+
+