oliverlloyd / jmeter-ec2

Automates running Apache JMeter on Amazon EC2
GNU General Public License v3.0
464 stars 186 forks source link

plugins directory is not getting copied over #22

Closed slash-zero closed 10 years ago

slash-zero commented 10 years ago

Hello,

The plugins directory does not appear to get copied over from the $project_home directory, even though the jmeter-ec2.sh script does appear to have a conditional check for it

            # scp any project specific custom jar files
            if [ -d $project_home/plugins ] && [ -n $(ls $project_home/plugins/) ] ; then # don't try to upload any files if none present
                echo -n "project specific jar file(s)..."
                for host in ${hosts[@]} ; do
                    (scp -q -C -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
                                                  -i "$PEM_PATH/$PEM_FILE" -P $REMOTE_PORT \
                                                  $project_home/plugins/*.jar \
                                                  $USER@$host:$REMOTE_HOME/$JMETER_VERSION/lib/ext/) &
                done
                wait
                echo -n "done...."
            fi

An error is returned

copying test files to 1 server(s)...jmx files..done....data dir..done....jmeter.properties..done....jmeter execution file...done..../home/ubuntu/projects/jmeter-ec2/jmeter-ec2.sh: line 569: [: too many arguments
all files uploaded

Line 569 of jmeter-ec2.sh

if [ -d $project_home/plugins ] && [ -n $(ls $project_home/plugins/) ] ; then # don't try to upload any files if none present

Note: I have about 10 jars I need to get into apache/lib/ext.

slash-zero commented 10 years ago

Quick fix for this issue, if you want it. https://github.com/oliverlloyd/jmeter-ec2/pull/23

slash-zero commented 10 years ago

Thanks for merging this in! :+1: