diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e2fd8dd3..3d22d2d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Exposed the vertical option for slider controls ([view](https://github.com/videojs/video.js/pull/1303)) * Fixed an error when disposing a tech using manual timeupdates ([view](https://github.com/videojs/video.js/pull/1312)) * Exported missing Player API methods (remainingTime, supportsFullScreen, enterFullWindow, exitFullWindow, preload) ([view](https://github.com/videojs/video.js/pull/1328)) +* Added a base for running saucelabs tests from grunt ([view](https://github.com/videojs/video.js/pull/1215)) -------------------- diff --git a/Gruntfile.js b/Gruntfile.js index be6a573ae..b841a6e02 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,9 +1,10 @@ module.exports = function(grunt) { - var pkg, s3, semver, version, verParts, uglify; + var pkg, s3, semver, version, verParts, uglify, exec; semver = require('semver'); pkg = grunt.file.readJSON('package.json'); uglify = require('uglify-js'); + exec = require('child_process').exec; try { s3 = grunt.file.readJSON('.s3config.json'); @@ -373,6 +374,28 @@ module.exports = function(grunt) { } }); + grunt.registerTask('saucelabs', function() { + var done = this.async(); + + if (this.args[0] == 'connect') { + exec('curl https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash', + function(error, stdout, stderr) { + if (error) { + grunt.log.error(error); + return done(); + } + + grunt.verbose.error(stderr.toString()); + grunt.verbose.writeln(stdout.toString()); + grunt.task.run(['karma:saucelabs']); + done(); + }); + } else { + grunt.task.run(['karma:saucelabs']); + done(); + } + }); + var fs = require('fs'), gzip = require('zlib').gzip;