summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/backendTests.sh1
-rwxr-xr-xbin/installDeps.sh2
-rwxr-xr-xbin/jshint.sh9
-rw-r--r--bin/loadTesting/README79
-rwxr-xr-xbin/loadTesting/launcher.sh16
-rw-r--r--bin/loadTesting/loader.js20
-rwxr-xr-xbin/run.sh2
-rwxr-xr-xbin/updatePlugins.sh12
8 files changed, 15 insertions, 126 deletions
diff --git a/bin/backendTests.sh b/bin/backendTests.sh
new file mode 100755
index 00000000..ec12775b
--- /dev/null
+++ b/bin/backendTests.sh
@@ -0,0 +1 @@
+src/node_modules/mocha/bin/mocha --timeout 5000 --reporter nyan tests/backend/specs/api
diff --git a/bin/installDeps.sh b/bin/installDeps.sh
index a8bc88a8..58eb32f2 100755
--- a/bin/installDeps.sh
+++ b/bin/installDeps.sh
@@ -99,7 +99,7 @@ fi
echo "Clear minfified cache..."
rm -f var/minified*
-echo "ensure custom css/js files are created..."
+echo "Ensure custom css/js files are created..."
for f in "index" "pad" "timeslider"
do
diff --git a/bin/jshint.sh b/bin/jshint.sh
deleted file mode 100755
index 4dea7396..00000000
--- a/bin/jshint.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ -d "../bin" ]; then
- cd "../"
-fi
-
-JSHINT=./node_modules/jshint/bin/hint
-
-$JSHINT ./node/
diff --git a/bin/loadTesting/README b/bin/loadTesting/README
deleted file mode 100644
index c8ecd71e..00000000
--- a/bin/loadTesting/README
+++ /dev/null
@@ -1,79 +0,0 @@
-This is the new load testing file: https://bitbucket.org/rbraakman/etherpad-stresstest
-
-BELOW is the original load testing file.
-
-This load tester is extremely useful for testing how many dormant clients can connect to etherpad.
-
-TODO:
-Emulate characters being typed into a pad
-
-HOW TO USE (from @mjd75) proper formatting at: https://github.com/ether/etherpad-lite/issues/360
-
-Server 1:
-Installed Node.js (etc), EtherPad and MySQL
-
-Server 2:
-Installed Xvfb and PhantomJS
-
-I installed Xvfb following (roughly) this guide: http://blog.martin-lyness.com/archives/installing-xvfb-on-ubuntu-9-10-karmic-koala
-
- #sudo apt-get install xvfb
- #sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
-
-Launched two instances of Xvfb directly from the terminal:
-
- #Xvfb :0 -ac
- #Xvfb :1 -ac
-
-I installed PhantomJS following this guide: http://code.google.com/p/phantomjs/wiki/Installation
-
- #sudo add-apt-repository ppa:jerome-etienne/neoip
- #sudo apt-get update
- #sudo apt-get install phantomjs
-
-I created a small JavaScript file for PhatomJS to use to control the browser instances:
-
-### BEGIN JAVASCRIPT ###
-
-var page = new WebPage(),
- t, address;
-
-if (phantom.args.length === 0) {
- console.log('Usage: loader.js <some URL>');
- phantom.exit();
-} else {
- t = Date.now();
- address = phantom.args[0];
-
- var page = new WebPage();
- page.onResourceRequested = function (request) {
- console.log('Request ' + JSON.stringify(request, undefined, 4));
- };
- page.onResourceReceived = function (response) {
- console.log('Receive ' + JSON.stringify(response, undefined, 4));
- };
- page.open(address);
-
-}
-
-### END JAVASCRIPT ###
-
-And finally a launcher script that uses screen to run 400 instances of PhantomJS with the above script:
-
-### BEGIN SHELL SCRIPT ###
-
-#!/bin/bash
-
-# connect 200 instances to display :0
-for i in {1..200}
-do
- DISPLAY=:0 screen -d -m phantomjs loader.js http://ec2-50-17-168-xx.compute-1.amazonaws.com:9001/p/pad2 && sleep 2
-done
-
-# connect 200 instances to display :1
-for i in {1..200}
-do
- DISPLAY=:1 screen -d -m phantomjs loader.js http://ec2-50-17-168-xx.compute-1.amazonaws.com:9001/p/pad2 && sleep 2
-done
-
-### END SHELL SCRIPT ###
diff --git a/bin/loadTesting/launcher.sh b/bin/loadTesting/launcher.sh
deleted file mode 100755
index e940f8e0..00000000
--- a/bin/loadTesting/launcher.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# connect 500 instances to display :0
-for i in {1..500}
-do
- echo $i
- echo "Displaying Some shit"
- DISPLAY=:0 screen -d -m /home/phantomjs/bin/phantomjs loader.js http://10.0.0.55:9001/p/pad2 && sleep 2
-done
-
-# connect 500 instances to display :1
-for i in {1..500}
-do
- echo $i
- DISPLAY=:1 screen -d -m /home/phantomjs/bin/phantomjs loader.js http://10.0.0.55:9001/p/pad2 && sleep 2
-done
diff --git a/bin/loadTesting/loader.js b/bin/loadTesting/loader.js
deleted file mode 100644
index ddcd0572..00000000
--- a/bin/loadTesting/loader.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var page = new WebPage(),
- t, address;
-
-if (phantom.args.length === 0) {
- console.log('Usage: loader.js <some URL>');
- phantom.exit();
-} else {
- t = Date.now();
- address = phantom.args[0];
-
- var page = new WebPage();
- page.onResourceRequested = function (request) {
- console.log('Request ' + JSON.stringify(request, undefined, 4));
- };
- page.onResourceReceived = function (response) {
- console.log('Receive ' + JSON.stringify(response, undefined, 4));
- };
- page.open(address);
-
-}
diff --git a/bin/run.sh b/bin/run.sh
index 92ae8d48..f2162310 100755
--- a/bin/run.sh
+++ b/bin/run.sh
@@ -32,7 +32,7 @@ fi
bin/installDeps.sh $* || exit 1
#Move to the node folder and start
-echo "start..."
+echo "Started Etherpad..."
SCRIPTPATH=`pwd -P`
node $SCRIPTPATH/node_modules/ep_etherpad-lite/node/server.js $*
diff --git a/bin/updatePlugins.sh b/bin/updatePlugins.sh
new file mode 100755
index 00000000..d696eca7
--- /dev/null
+++ b/bin/updatePlugins.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+#Move to the folder where ep-lite is installed
+cd `dirname $0`
+
+#Was this script started in the bin folder? if yes move out
+if [ -d "../bin" ]; then
+ cd "../"
+fi
+
+npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}' | xargs npm install $1 --save-dev
+