From ff68931a511fd1cd07ac1dcecbf8535738fea004 Mon Sep 17 00:00:00 2001 From: Matthew Arbesfeld Date: Wed, 2 Jul 2014 11:08:15 -0700 Subject: [PATCH] Add BrowserStackLocal binary to dev_bundle We added the new binaries to the s3 bucket, and then GET them from the generate_dev_bundle shell script. --- meteor | 2 +- scripts/generate-dev-bundle.sh | 17 +++++++++++++---- tools/selftest.js | 13 +++---------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/meteor b/meteor index 83f0f9ccf2..4e935fa544 100755 --- a/meteor +++ b/meteor @@ -1,6 +1,6 @@ #!/bin/bash -BUNDLE_VERSION=0.3.43 +BUNDLE_VERSION=0.3.44 # OS Check. Put here because here is where we download the precompiled # bundles that are arch specific. diff --git a/scripts/generate-dev-bundle.sh b/scripts/generate-dev-bundle.sh index 0639f68e47..1f2ec3e89c 100755 --- a/scripts/generate-dev-bundle.sh +++ b/scripts/generate-dev-bundle.sh @@ -13,7 +13,7 @@ if [ "$UNAME" == "Linux" ] ; then exit 1 fi - MONGO_OS="linux" + OS="linux" stripBinary() { strip --remove-section=.comment --remove-section=.note $1 @@ -33,7 +33,7 @@ elif [ "$UNAME" == "Darwin" ] ; then exit 1 fi - MONGO_OS="osx" + OS="osx" # We don't strip on Mac because we don't know a safe command. (Can't strip # too much because we do need node to be able to load objects like @@ -185,11 +185,11 @@ git checkout ssl-r$MONGO_VERSION MONGO_FLAGS="--ssl --release -j4 " MONGO_FLAGS+="--cpppath=$DIR/build/openssl-out/include --libpath=$DIR/build/openssl-out/lib " -if [ "$MONGO_OS" == "osx" ]; then +if [ "$OS" == "osx" ]; then # NOTE: '--64' option breaks the compilation, even it is on by default on x64 mac: https://jira.mongodb.org/browse/SERVER-5575 MONGO_FLAGS+="--openssl=$DIR/build/openssl-out/lib " /usr/local/bin/scons $MONGO_FLAGS mongo mongod -elif [ "$MONGO_OS" == "linux" ]; then +elif [ "$OS" == "linux" ]; then MONGO_FLAGS+="--no-glibc-check --prefix=./ " if [ "$ARCH" == "x86_64" ]; then MONGO_FLAGS+="--64" @@ -213,6 +213,15 @@ stripBinary bin/node stripBinary mongodb/bin/mongo stripBinary mongodb/bin/mongod +# Download BrowserStackLocal binary. +BROWSER_STACK_LOCAL_URL="http://browserstack-binaries.s3.amazonaws.com/BrowserStackLocal-07-03-14-$OS-$ARCH.gz" + +cd "$DIR/build" +curl -O $BROWSER_STACK_LOCAL_URL +gunzip BrowserStackLocal* +mv BrowserStackLocal* BrowserStackLocal +mv BrowserStackLocal "$DIR/bin/" + echo BUNDLING cd "$DIR" diff --git a/tools/selftest.js b/tools/selftest.js index f27a8ad0a1..0771363ab3 100644 --- a/tools/selftest.js +++ b/tools/selftest.js @@ -744,7 +744,7 @@ _.extend(BrowserStackClient.prototype, { _launchBrowserStackTunnel: function (callback) { var self = this; var args = [ - 'BrowserStackLocal', + path.join(files.getDevBundle(), 'bin', 'BrowserStackLocal'), browserStackKey, [self.host, self.port, 0].join(','), // Disable Live Testing and Screenshots, just test with Automate. @@ -754,15 +754,8 @@ _.extend(BrowserStackClient.prototype, { ]; self.tunnelProcess = child_process.execFile( '/bin/bash', - ['-c', args.join(' ')], - function (err, stdout, stderr) { - if (stderr.match(/not found/)) { - console.log("ERROR: BrowserStackLocal binary not installed. " + - "Instructions for installing the binary can be found " + - "at http://www.browserstack.com/local-testing " + - "XXX add to dev_bundle."); - } - }); + ['-c', args.join(' ')] + ); // Called when the SSH tunnel is established. self.tunnelProcess.stdout.on('data', function(data) {