From 42092ce41563b1c475d562ee2ab43fef2abd6790 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 3 Apr 2015 09:32:23 +0200 Subject: [PATCH 01/47] Initial .travis.yml configuration --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..e86ff77c1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: objective-c + +install: script/build + +script: ./apm/node_modules/.bin/apm test --path ./atom.sh + +notifications: + email: + on_success: never + on_failure: change + +cache: + directories: + - node_modules From dbd5850c5b6d3ae7ba5c2d8cb94caef6e5fcc151 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 4 Apr 2015 17:50:36 +0200 Subject: [PATCH 02/47] Add AppVeyor configuration --- appveyor.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000..77865dfb7 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +version: "{build}" +os: Windows Server 2012 R2 + +test: off +deploy: off + +build_script: + - cd %APPVEYOR_BUILD_FOLDER% + - script/cibuild From 22d034057ccc2dbb947bfac3eb2cd59521811574 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 4 Apr 2015 17:59:07 +0200 Subject: [PATCH 03/47] Use script/build on AppVeyor :rainbow: --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 77865dfb7..95bf9556a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,4 +6,4 @@ deploy: off build_script: - cd %APPVEYOR_BUILD_FOLDER% - - script/cibuild + - "script/build" From 859a6dcf6867b4b930b7c96215987b1200cc62e8 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 10:48:18 +0200 Subject: [PATCH 04/47] Use script/cibuild --- .travis.yml | 8 +------- build/tasks/spec-task.coffee | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index e86ff77c1..535414f56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,8 @@ language: objective-c -install: script/build - -script: ./apm/node_modules/.bin/apm test --path ./atom.sh +script: script/cibuild notifications: email: on_success: never on_failure: change - -cache: - directories: - - node_modules diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 73bb63f70..49c9f8592 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -4,7 +4,7 @@ path = require 'path' _ = require 'underscore-plus' async = require 'async' -concurrency = 2 +concurrency = 1 module.exports = (grunt) -> {isAtomPackage, spawn} = require('./task-helpers')(grunt) From f3a7cc1b9de9a662696094024d0d1493017b3c47 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 11:24:12 +0200 Subject: [PATCH 05/47] wip: focus on integration specs only --- spec/integration/startup-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index e0df3ad9b..4529e5f0b 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -10,7 +10,7 @@ AtomHome = temp.mkdirSync('atom-home') fs.writeFileSync(path.join(AtomHome, 'config.cson'), fs.readFileSync(path.join(__dirname, 'fixtures', 'atom-home', 'config.cson'))) runAtom = require("./helpers/start-atom") -describe "Starting Atom", -> +fdescribe "Starting Atom", -> [tempDirPath, otherTempDirPath] = [] beforeEach -> From a090a81767229c4c8b9ffd8f6e57f934c890090d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 11:46:42 +0200 Subject: [PATCH 06/47] Bump chromedriver wait timeout --- spec/integration/helpers/start-atom.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 4be2efab8..09ba2296a 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -114,7 +114,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(100) + waits(5000) waitsFor("webdriver to finish", (done) -> finish = once -> @@ -137,4 +137,4 @@ module.exports = (args, env, fn) -> finish() fn(client.init()).then(finish) - , 30000) + , 60000) From 32ae7945ff5a9e579a62d1d10cf05056b17c675c Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 13:48:50 +0200 Subject: [PATCH 07/47] Fine tune waiting time --- spec/integration/helpers/start-atom.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 09ba2296a..c4e4fb28e 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -114,7 +114,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(5000) + waits(1000) waitsFor("webdriver to finish", (done) -> finish = once -> @@ -137,4 +137,4 @@ module.exports = (args, env, fn) -> finish() fn(client.init()).then(finish) - , 60000) + , 30000) From 722705bb4cf5b7ce3194b304a3da636322315c3d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 14:40:36 +0200 Subject: [PATCH 08/47] Reduce chromedriver waiting time to 500ms --- spec/integration/helpers/start-atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index c4e4fb28e..1ac122726 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -114,7 +114,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(1000) + waits(500) waitsFor("webdriver to finish", (done) -> finish = once -> From 127253bea38079294e9940934789eb7cb1beebcc Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 15:01:46 +0200 Subject: [PATCH 09/47] Revert "Reduce chromedriver waiting time to 500ms" This reverts commit 722705bb4cf5b7ce3194b304a3da636322315c3d. --- spec/integration/helpers/start-atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 1ac122726..c4e4fb28e 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -114,7 +114,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(500) + waits(1000) waitsFor("webdriver to finish", (done) -> finish = once -> From efa2a34fd673d161770ca0e64009613858527549 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 15:36:54 +0200 Subject: [PATCH 10/47] Use a large value in `waits` ...to confirm that it is the culprit of Travis build errors. --- spec/integration/helpers/start-atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index c4e4fb28e..1fa3db599 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -114,7 +114,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(1000) + waits(5000) waitsFor("webdriver to finish", (done) -> finish = once -> From 1c7b473243748f6e3be47d2e7843cfd578bdb127 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 17:46:44 +0200 Subject: [PATCH 11/47] Wait for chromedriver to initialize Via a polling mechanism inspired by https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/DriverService.cs#L173-205 --- spec/integration/helpers/start-atom.coffee | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 1fa3db599..8c5e45d15 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -1,4 +1,5 @@ path = require "path" +http = require "http" temp = require("temp").track() remote = require "remote" async = require "async" @@ -11,6 +12,16 @@ AtomLauncherPath = path.join(__dirname, "..", "helpers", "atom-launcher.sh") ChromedriverPath = path.resolve(__dirname, '..', '..', '..', 'atom-shell', 'chromedriver', 'chromedriver') SocketPath = path.join(temp.mkdirSync("socket-dir"), "atom-#{process.env.USER}.sock") ChromedriverPort = 9515 +ChromedriverURLBase = "/wd/hub" +ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status" + +pollChromeDriver = (done) -> + http.get(ChromedriverStatusURL, (response) -> + if response.statusCode is 200 + done() + else + pollChromeDriver(done) + ) buildAtomClient = (args, env) -> client = webdriverio.remote( @@ -101,7 +112,7 @@ module.exports = (args, env, fn) -> chromedriver = spawn(ChromedriverPath, [ "--verbose", "--port=#{ChromedriverPort}", - "--url-base=/wd/hub" + "--url-base=#{ChromedriverURLBase}" ]) chromedriverLogs = [] @@ -114,7 +125,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waits(5000) + waitsFor("webdriver to start", pollChromeDriver, 5000) waitsFor("webdriver to finish", (done) -> finish = once -> From d4949667597d4464bd350e84fe7c74859d220018 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 17:53:05 +0200 Subject: [PATCH 12/47] Relax polling to check only every 100ms --- spec/integration/helpers/start-atom.coffee | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 8c5e45d15..9993181a8 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -16,12 +16,15 @@ ChromedriverURLBase = "/wd/hub" ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBase}/status" pollChromeDriver = (done) -> - http.get(ChromedriverStatusURL, (response) -> - if response.statusCode is 200 - done() - else - pollChromeDriver(done) - ) + checkStatus = -> + http.get(ChromedriverStatusURL, (response) -> + if response.statusCode is 200 + done() + else + pollChromeDriver(done) + ) + + setTimeout(checkStatus, 100) buildAtomClient = (args, env) -> client = webdriverio.remote( From 4c12b6767e6fea52a5898e2dc2061319d6abb5ee Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 17:55:01 +0200 Subject: [PATCH 13/47] Stop focusing on integration specs --- spec/integration/startup-spec.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index 4529e5f0b..e0df3ad9b 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -10,7 +10,7 @@ AtomHome = temp.mkdirSync('atom-home') fs.writeFileSync(path.join(AtomHome, 'config.cson'), fs.readFileSync(path.join(__dirname, 'fixtures', 'atom-home', 'config.cson'))) runAtom = require("./helpers/start-atom") -fdescribe "Starting Atom", -> +describe "Starting Atom", -> [tempDirPath, otherTempDirPath] = [] beforeEach -> From 0a9902b918053b42729f324414806681b0cec781 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 18:45:05 +0200 Subject: [PATCH 14/47] Use script/cibuild on AppVeyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 95bf9556a..081341af3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,4 +6,4 @@ deploy: off build_script: - cd %APPVEYOR_BUILD_FOLDER% - - "script/build" + - "script/cibuild" From 5a8f37bdfd57c6f5db7c095885d29d81807bb814 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 18:48:24 +0200 Subject: [PATCH 15/47] Copy AppVeyor configuration from atom/keyboard-layout --- appveyor.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 081341af3..706763363 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,10 @@ -version: "{build}" -os: Windows Server 2012 R2 +environment: + nodejs_version: "0.10" -test: off -deploy: off +install: + - ps: Install-Product node $env:nodejs_version -build_script: - - cd %APPVEYOR_BUILD_FOLDER% +test_script: - "script/cibuild" + +build: off From d90b6937f408a07672b0169ba4c483cfe320ad64 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 19:13:31 +0200 Subject: [PATCH 16/47] Explicitly use node in test_script --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 706763363..19d49846e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,6 +5,6 @@ install: - ps: Install-Product node $env:nodejs_version test_script: - - "script/cibuild" + - node "script\cibuild" build: off From 73fb36590d2efb16cd477778c9d43bb5fd43933d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 7 Apr 2015 19:28:10 +0200 Subject: [PATCH 17/47] Use a 15s timeout for webdriver startup --- spec/integration/helpers/start-atom.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 9993181a8..9775de8c7 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -128,7 +128,7 @@ module.exports = (args, env, fn) -> chromedriver.stderr.on "close", -> resolve(errorCode) - waitsFor("webdriver to start", pollChromeDriver, 5000) + waitsFor("webdriver to start", pollChromeDriver, 15000) waitsFor("webdriver to finish", (done) -> finish = once -> From dee626ab69388c2ff83fb91845003c5aa118ed80 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 08:36:46 +0200 Subject: [PATCH 18/47] Investigate timeouts issues (again) --- spec/integration/helpers/start-atom.coffee | 2 ++ spec/integration/startup-spec.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 9775de8c7..826d8c17e 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -18,6 +18,8 @@ ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBa pollChromeDriver = (done) -> checkStatus = -> http.get(ChromedriverStatusURL, (response) -> + console.log response.statusCode + if response.statusCode is 200 done() else diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index e0df3ad9b..b7f6425a3 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -19,7 +19,7 @@ describe "Starting Atom", -> tempDirPath = temp.mkdirSync("empty-dir") otherTempDirPath = temp.mkdirSync("another-temp-dir") - describe "opening a new file", -> + fdescribe "opening a new file", -> it "opens the parent directory and creates an empty text editor", -> runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: AtomHome}, (client) -> client From f9f5213cdf04ae6e9a44521cb52f271061e6d769 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 08:57:03 +0200 Subject: [PATCH 19/47] Handle http.on('error') for webdriver polling --- spec/integration/helpers/start-atom.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spec/integration/helpers/start-atom.coffee b/spec/integration/helpers/start-atom.coffee index 826d8c17e..08d3659c3 100644 --- a/spec/integration/helpers/start-atom.coffee +++ b/spec/integration/helpers/start-atom.coffee @@ -18,13 +18,11 @@ ChromedriverStatusURL = "http://localhost:#{ChromedriverPort}#{ChromedriverURLBa pollChromeDriver = (done) -> checkStatus = -> http.get(ChromedriverStatusURL, (response) -> - console.log response.statusCode - if response.statusCode is 200 done() else pollChromeDriver(done) - ) + ).on("error", -> pollChromeDriver(done)) setTimeout(checkStatus, 100) From 8e2c5a34e4fef4a7db3054d444aeb2f056f97ed1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 10:08:20 +0200 Subject: [PATCH 20/47] Avoid setting --arch=ia32 --- script/bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 4c9435852..58255749b 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -80,8 +80,8 @@ function bootstrap() { // apm ships with 32-bit node so make sure its native modules are compiled // for a 32-bit target architecture - if (process.env.JANKY_SHA1 && process.platform === 'win32') - apmInstallCommand += ' --arch=ia32'; + // if (process.env.JANKY_SHA1 && process.platform === 'win32') + // apmInstallCommand += ' --arch=ia32'; var commands = [ { From 32909efd7e2dcf0dcad5a366026894b20f4cc18c Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 10:23:54 +0200 Subject: [PATCH 21/47] Revert "Avoid setting --arch=ia32" This reverts commit 8e2c5a34e4fef4a7db3054d444aeb2f056f97ed1. --- script/bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/bootstrap b/script/bootstrap index 58255749b..4c9435852 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -80,8 +80,8 @@ function bootstrap() { // apm ships with 32-bit node so make sure its native modules are compiled // for a 32-bit target architecture - // if (process.env.JANKY_SHA1 && process.platform === 'win32') - // apmInstallCommand += ' --arch=ia32'; + if (process.env.JANKY_SHA1 && process.platform === 'win32') + apmInstallCommand += ' --arch=ia32'; var commands = [ { From b08bd79e0237ac18a740f2b053732d0f34ce6ba0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 10:27:03 +0200 Subject: [PATCH 22/47] Disable focus methods on CI --- spec/integration/startup-spec.coffee | 2 +- spec/jasmine-helper.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index b7f6425a3..e0df3ad9b 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -19,7 +19,7 @@ describe "Starting Atom", -> tempDirPath = temp.mkdirSync("empty-dir") otherTempDirPath = temp.mkdirSync("another-temp-dir") - fdescribe "opening a new file", -> + describe "opening a new file", -> it "opens the parent directory and creates an empty text editor", -> runAtom [path.join(tempDirPath, "new-file")], {ATOM_HOME: AtomHome}, (client) -> client diff --git a/spec/jasmine-helper.coffee b/spec/jasmine-helper.coffee index 1e099d897..31f65167b 100644 --- a/spec/jasmine-helper.coffee +++ b/spec/jasmine-helper.coffee @@ -7,7 +7,7 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) -> {TerminalReporter} = require 'jasmine-tagged' - disableFocusMethods() if process.env.JANKY_SHA1 + disableFocusMethods() if process.env.JANKY_SHA1 or process.env.CI TimeReporter = require './time-reporter' timeReporter = new TimeReporter() From 6d132a9a24f1a0ba79a63277fc816efd9b9c85d9 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 8 Apr 2015 10:35:58 +0200 Subject: [PATCH 23/47] Use GYP_MSVS_VERSION=2013 as suggested on #5894 --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 19d49846e..ba817084b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,6 @@ environment: nodejs_version: "0.10" + GYP_MSVS_VERSION: 2013 install: - ps: Install-Product node $env:nodejs_version From 821f60924fdd11bdea04fb5ad3f8eae23659b1c0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 10:29:36 +0200 Subject: [PATCH 24/47] Enable Multi-OS support --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 535414f56..364794759 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,9 @@ -language: objective-c +os: + - linux + - osx + +install: + - test "$TRAVIS_OS_NAME" = "linux" && sudo apt-get install build-essential git libgnome-keyring-dev fakeroot script: script/cibuild From 3d6c6d0cc12d9baf2d2b9c45ab9586d88ee5c432 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 10:40:50 +0200 Subject: [PATCH 25/47] :apple: Don't fail on Mac OS X build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 364794759..eeefbfa84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ os: - osx install: - - test "$TRAVIS_OS_NAME" = "linux" && sudo apt-get install build-essential git libgnome-keyring-dev fakeroot + - test "$TRAVIS_OS_NAME" = "linux" && sudo apt-get install build-essential git libgnome-keyring-dev fakeroot || true script: script/cibuild From f78dec2574eafab1de6343b5f8b8a9c23180d90d Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 10:58:14 +0200 Subject: [PATCH 26/47] Run against multiple nodejs versions --- .travis.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index eeefbfa84..398a2c141 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,20 @@ +env: + - NODE_VERSION=0.10 + - NODE_VERSION=0.12 + - NODE_VERSION=iojs + os: - linux - osx install: - - test "$TRAVIS_OS_NAME" = "linux" && sudo apt-get install build-essential git libgnome-keyring-dev fakeroot || true + - git clone https://github.com/creationix/nvm.git ./.nvm + - source ./.nvm/nvm.sh + - nvm install $NODE_VERSION + - nvm use $NODE_VERSION + - if [ $TRAVIS_OS_NAME == "linux" ]; then + sudo apt-get install build-essential git libgnome-keyring-dev fakeroot; + fi script: script/cibuild From c8d30d929cebdef756995d21d9928ec7b099dc16 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 11:09:23 +0200 Subject: [PATCH 27/47] Remove iojs from build matrix --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 398a2c141..7c0bde467 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ env: - NODE_VERSION=0.10 - NODE_VERSION=0.12 - - NODE_VERSION=iojs os: - linux From 31d1f587e3f1f34c80bd1e6d2ced92cd09f0e5f1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 11:36:26 +0200 Subject: [PATCH 28/47] :penguin: Run tests also on Linux --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 05efaeb38..24ad88b7e 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -226,7 +226,7 @@ module.exports = (grunt) -> ciTasks.push('set-version', 'check-licenses', 'lint') ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('create-windows-installer') if process.platform is 'win32' - ciTasks.push('test') if process.platform is 'darwin' + ciTasks.push('test') if process.platform in ['darwin', 'linux'] ciTasks.push('codesign') ciTasks.push('publish-build') grunt.registerTask('ci', ciTasks) From 5068bd530e50cdcd4e0353b8be0bf99325e13077 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 19:05:33 +0200 Subject: [PATCH 29/47] Revert ":penguin: Run tests also on Linux" This reverts commit 31d1f587e3f1f34c80bd1e6d2ced92cd09f0e5f1. --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 24ad88b7e..05efaeb38 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -226,7 +226,7 @@ module.exports = (grunt) -> ciTasks.push('set-version', 'check-licenses', 'lint') ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('create-windows-installer') if process.platform is 'win32' - ciTasks.push('test') if process.platform in ['darwin', 'linux'] + ciTasks.push('test') if process.platform is 'darwin' ciTasks.push('codesign') ciTasks.push('publish-build') grunt.registerTask('ci', ciTasks) From ffd4ab8aff517365465334a47a81a4f540460b64 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 9 Apr 2015 19:42:23 +0200 Subject: [PATCH 30/47] Clone .nvm into tmp directory --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c0bde467..7e47d0660 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ os: - osx install: - - git clone https://github.com/creationix/nvm.git ./.nvm - - source ./.nvm/nvm.sh + - git clone https://github.com/creationix/nvm.git /tmp/.nvm + - source /tmp/.nvm/nvm.sh - nvm install $NODE_VERSION - nvm use $NODE_VERSION - if [ $TRAVIS_OS_NAME == "linux" ]; then From 43a807c6301665cbf4308576c913ad249b367955 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 10 Apr 2015 10:17:17 +0200 Subject: [PATCH 31/47] Fix cibuild returning 0 as status code --- build/tasks/spec-task.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 49c9f8592..1126e2541 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -4,7 +4,7 @@ path = require 'path' _ = require 'underscore-plus' async = require 'async' -concurrency = 1 +concurrency = 2 module.exports = (grunt) -> {isAtomPackage, spawn} = require('./task-helpers')(grunt) @@ -78,7 +78,7 @@ module.exports = (grunt) -> continue unless isAtomPackage(packagePath) packageSpecQueue.push(packagePath) - packageSpecQueue.concurrency = concurrency - 1 + packageSpecQueue.concurrency = Math.min(1, concurrency - 1) packageSpecQueue.drain = -> callback(null, failedPackages) runCoreSpecs = (callback) -> @@ -110,7 +110,7 @@ module.exports = (grunt) -> fs.unlinkSync('ci.log') else # TODO: Restore concurrency on Windows - packageSpecQueue.concurrency = concurrency + packageSpecQueue?.concurrency = concurrency logDeprecations('Core Specs', results) callback(null, error) From 01504cfde56c85530dd328a95721768458b9aee6 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 10 Apr 2015 10:20:02 +0200 Subject: [PATCH 32/47] Use Math.max instead of Math.min --- build/tasks/spec-task.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 1126e2541..1151974b2 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -78,7 +78,7 @@ module.exports = (grunt) -> continue unless isAtomPackage(packagePath) packageSpecQueue.push(packagePath) - packageSpecQueue.concurrency = Math.min(1, concurrency - 1) + packageSpecQueue.concurrency = Math.max(1, concurrency - 1) packageSpecQueue.drain = -> callback(null, failedPackages) runCoreSpecs = (callback) -> From f790cda5caff682cf23d8f3f72cc56ad98ab7dd7 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 10 Apr 2015 11:45:03 +0200 Subject: [PATCH 33/47] Run CI tests verbosely --- build/tasks/spec-task.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 1151974b2..449c8e93c 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -12,7 +12,7 @@ module.exports = (grunt) -> packageSpecQueue = null logDeprecations = (label, {stderr}={}) -> - return unless process.env.JANKY_SHA1 + return unless process.env.JANKY_SHA1 or process.env.CI stderr ?= '' deprecatedStart = stderr.indexOf('Calls to deprecated functions') return if deprecatedStart is -1 @@ -60,7 +60,7 @@ module.exports = (grunt) -> cwd: packagePath env: _.extend({}, process.env, ATOM_PATH: rootDir) - grunt.verbose.writeln "Launching #{path.basename(packagePath)} specs." + grunt.log.ok "Launching #{path.basename(packagePath)} specs." spawn options, (error, results, code) -> if process.platform is 'win32' if error @@ -78,7 +78,7 @@ module.exports = (grunt) -> continue unless isAtomPackage(packagePath) packageSpecQueue.push(packagePath) - packageSpecQueue.concurrency = Math.max(1, concurrency - 1) + packageSpecQueue.concurrency = concurrency - 1 packageSpecQueue.drain = -> callback(null, failedPackages) runCoreSpecs = (callback) -> @@ -104,6 +104,7 @@ module.exports = (grunt) -> ATOM_INTEGRATION_TESTS_ENABLED: true ) + grunt.log.ok "Launching core specs." spawn options, (error, results, code) -> if process.platform is 'win32' process.stderr.write(fs.readFileSync('ci.log')) if error From 6dfcc582b39ea2b46866c609bd80d00d519eb9a6 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 10 Apr 2015 21:07:14 +0200 Subject: [PATCH 34/47] Increase defaultTimeoutInterval for Travis --- spec/spec-helper.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 1c9e6fb6b..6b4a8ff3d 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -51,7 +51,7 @@ Object.defineProperty document, 'title', jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions -if process.env.JANKY_SHA1 and process.platform is 'win32' +if (process.env.JANKY_SHA1 and process.platform is 'win32') or process.env.CI jasmine.getEnv().defaultTimeoutInterval = 60000 else jasmine.getEnv().defaultTimeoutInterval = 5000 From 2dda990533c144b7c39c5284ded5d5e378912930 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 11 Apr 2015 11:46:20 +0200 Subject: [PATCH 35/47] Try again to run specs on :penguin: --- .travis.yml | 2 ++ build/Gruntfile.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7e47d0660..2372e62b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ install: - nvm use $NODE_VERSION - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo apt-get install build-essential git libgnome-keyring-dev fakeroot; + export DISPLAY=:99.0; + sh -e /etc/init.d/xvfb start; fi script: script/cibuild diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 05efaeb38..24ad88b7e 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -226,7 +226,7 @@ module.exports = (grunt) -> ciTasks.push('set-version', 'check-licenses', 'lint') ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('create-windows-installer') if process.platform is 'win32' - ciTasks.push('test') if process.platform is 'darwin' + ciTasks.push('test') if process.platform in ['darwin', 'linux'] ciTasks.push('codesign') ciTasks.push('publish-build') grunt.registerTask('ci', ciTasks) From 756ce8cea65c75f4a6f2dc0a33f7c80108df3828 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 11 Apr 2015 12:13:17 +0200 Subject: [PATCH 36/47] Avoid specs to trip up on each other ...because of possible race conditions. --- build/tasks/spec-task.coffee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index da5b24685..da3c67df4 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -4,7 +4,7 @@ path = require 'path' _ = require 'underscore-plus' async = require 'async' -concurrency = 2 +concurrency = 1 module.exports = (grunt) -> {isAtomPackage, spawn} = require('./task-helpers')(grunt) @@ -78,7 +78,7 @@ module.exports = (grunt) -> continue unless isAtomPackage(packagePath) packageSpecQueue.push(packagePath) - packageSpecQueue.concurrency = concurrency - 1 + packageSpecQueue.concurrency = concurrency packageSpecQueue.drain = -> callback(null, failedPackages) runCoreSpecs = (callback) -> @@ -122,9 +122,9 @@ module.exports = (grunt) -> # TODO: This should really be parallel on both platforms, however our # fixtures step on each others toes currently. - if process.platform in ['darwin', 'linux'] + if process.platform is 'darwin' method = async.parallel - else if process.platform is 'win32' + else if process.platform in ['win32', 'linux'] method = async.series method [runCoreSpecs, runPackageSpecs], (error, results) -> From b9c98bced45b539df53eb84c389a25ccc3433ed7 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 11 Apr 2015 12:33:35 +0200 Subject: [PATCH 37/47] Enable RANDR extension for xvfb --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2372e62b4..9deccde61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo apt-get install build-essential git libgnome-keyring-dev fakeroot; export DISPLAY=:99.0; - sh -e /etc/init.d/xvfb start; + sh -e /etc/init.d/xvfb start -- :99 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset; fi script: script/cibuild From 458cd0bf2f4cc3c2f7f9981bf8c1ee57e306947e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 11 Apr 2015 15:05:49 +0200 Subject: [PATCH 38/47] Revert "Avoid specs to trip up on each other" This reverts commit 756ce8cea65c75f4a6f2dc0a33f7c80108df3828. --- .travis.yml | 2 +- build/tasks/spec-task.coffee | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9deccde61..2372e62b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo apt-get install build-essential git libgnome-keyring-dev fakeroot; export DISPLAY=:99.0; - sh -e /etc/init.d/xvfb start -- :99 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset; + sh -e /etc/init.d/xvfb start; fi script: script/cibuild diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index da3c67df4..da5b24685 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -4,7 +4,7 @@ path = require 'path' _ = require 'underscore-plus' async = require 'async' -concurrency = 1 +concurrency = 2 module.exports = (grunt) -> {isAtomPackage, spawn} = require('./task-helpers')(grunt) @@ -78,7 +78,7 @@ module.exports = (grunt) -> continue unless isAtomPackage(packagePath) packageSpecQueue.push(packagePath) - packageSpecQueue.concurrency = concurrency + packageSpecQueue.concurrency = concurrency - 1 packageSpecQueue.drain = -> callback(null, failedPackages) runCoreSpecs = (callback) -> @@ -122,9 +122,9 @@ module.exports = (grunt) -> # TODO: This should really be parallel on both platforms, however our # fixtures step on each others toes currently. - if process.platform is 'darwin' + if process.platform in ['darwin', 'linux'] method = async.parallel - else if process.platform in ['win32', 'linux'] + else if process.platform is 'win32' method = async.series method [runCoreSpecs, runPackageSpecs], (error, results) -> From fe4fff4dc80ad4745606cd23bcaa7ea0e953f1b6 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 11 Apr 2015 16:07:30 +0200 Subject: [PATCH 39/47] Run script/cibuild with sudo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2372e62b4..4ecf6125a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: sh -e /etc/init.d/xvfb start; fi -script: script/cibuild +script: sudo script/cibuild notifications: email: From 379ec598e87b7d84158184b909b42d8076354a33 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 13 Apr 2015 10:04:06 +0200 Subject: [PATCH 40/47] Revert "Run script/cibuild with sudo" This reverts commit fe4fff4dc80ad4745606cd23bcaa7ea0e953f1b6. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ecf6125a..2372e62b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: sh -e /etc/init.d/xvfb start; fi -script: sudo script/cibuild +script: script/cibuild notifications: email: From 4daadfc4c0751378b9eec81b9c01e053cff7e8b4 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 15 Apr 2015 14:43:33 +0200 Subject: [PATCH 41/47] Avoid codesign and publish-build on Travis --- build/Gruntfile.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index a66d47ebe..3655e91e9 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -227,8 +227,8 @@ module.exports = (grunt) -> ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('create-windows-installer') if process.platform is 'win32' ciTasks.push('test') if process.platform in ['darwin', 'linux'] - ciTasks.push('codesign') - ciTasks.push('publish-build') + ciTasks.push('codesign') unless process.env.TRAVIS + ciTasks.push('publish-build') unless process.env.TRAVIS grunt.registerTask('ci', ciTasks) defaultTasks = ['download-atom-shell', 'download-atom-shell-chromedriver', 'build', 'set-version'] From bc2747ead7690d09bbb6e43fd91a73d582db9e75 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 15 Apr 2015 15:20:54 +0200 Subject: [PATCH 42/47] Run spec on darwin only ...as we're not ready yet to use Linux. --- build/Gruntfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 3655e91e9..071dd1295 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -226,7 +226,7 @@ module.exports = (grunt) -> ciTasks.push('set-version', 'check-licenses', 'lint') ciTasks.push('mkdeb') if process.platform is 'linux' ciTasks.push('create-windows-installer') if process.platform is 'win32' - ciTasks.push('test') if process.platform in ['darwin', 'linux'] + ciTasks.push('test') if process.platform is 'darwin' ciTasks.push('codesign') unless process.env.TRAVIS ciTasks.push('publish-build') unless process.env.TRAVIS grunt.registerTask('ci', ciTasks) From 04fb61002ca9d56b7abfbea63b7f1b7d73a8c8f0 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Wed, 15 Apr 2015 16:51:11 +0200 Subject: [PATCH 43/47] Goodbye AppVeyor :wave: --- appveyor.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ba817084b..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,11 +0,0 @@ -environment: - nodejs_version: "0.10" - GYP_MSVS_VERSION: 2013 - -install: - - ps: Install-Product node $env:nodejs_version - -test_script: - - node "script\cibuild" - -build: off From 77d73f92f76996f9953b2762d71fec560c421de2 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Apr 2015 09:04:32 +0200 Subject: [PATCH 44/47] :penguin: Avoid starting xvfb on Linux ...since we don't run tests anymore in there. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2372e62b4..7e47d0660 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,6 @@ install: - nvm use $NODE_VERSION - if [ $TRAVIS_OS_NAME == "linux" ]; then sudo apt-get install build-essential git libgnome-keyring-dev fakeroot; - export DISPLAY=:99.0; - sh -e /etc/init.d/xvfb start; fi script: script/cibuild From b984a48456f0b6cc98c54bbb600e5a4f1e8d218e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Apr 2015 09:13:14 +0200 Subject: [PATCH 45/47] Don't run integration tests on Travis --- build/tasks/spec-task.coffee | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index da5b24685..09a062ac9 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -86,23 +86,25 @@ module.exports = (grunt) -> resourcePath = process.cwd() coreSpecsPath = path.resolve('spec') + # Integration tests require a fast machine and, for now, we cannot afford to + # run them on Travis. + env = _.extend({}, process.env, + ATOM_INTEGRATION_TESTS_ENABLED: not process.env.TRAVIS + ) + if process.platform in ['darwin', 'linux'] options = cmd: appPath args: ['--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}"] opts: - env: _.extend({}, process.env, - ATOM_INTEGRATION_TESTS_ENABLED: true - ) + env: env else if process.platform is 'win32' options = cmd: process.env.comspec args: ['/c', appPath, '--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}", "--log-file=ci.log"] opts: - env: _.extend({}, process.env, - ATOM_INTEGRATION_TESTS_ENABLED: true - ) + env: env grunt.log.ok "Launching core specs." spawn options, (error, results, code) -> From 17894fd36b08f5dd96c3a463cd46ef6960be6ad4 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Apr 2015 09:15:46 +0200 Subject: [PATCH 46/47] :art: --- .travis.yml | 3 +++ spec/spec-helper.coffee | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7e47d0660..de5a94718 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +git: + depth: 10 + env: - NODE_VERSION=0.10 - NODE_VERSION=0.12 diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index a0905ddf7..0112042e2 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -51,7 +51,7 @@ Object.defineProperty document, 'title', jasmine.getEnv().addEqualityTester(_.isEqual) # Use underscore's definition of equality for toEqual assertions -if (process.env.JANKY_SHA1 and process.platform is 'win32') or process.env.CI +if process.env.CI jasmine.getEnv().defaultTimeoutInterval = 60000 else jasmine.getEnv().defaultTimeoutInterval = 5000 From 50010a55b94ce4d13da905f5ff03b54ca17dbfa9 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 16 Apr 2015 09:52:41 +0200 Subject: [PATCH 47/47] Use a guard clause to disable integration specs --- build/tasks/spec-task.coffee | 14 ++++++-------- spec/integration/startup-spec.coffee | 3 +++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 09a062ac9..da5b24685 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -86,25 +86,23 @@ module.exports = (grunt) -> resourcePath = process.cwd() coreSpecsPath = path.resolve('spec') - # Integration tests require a fast machine and, for now, we cannot afford to - # run them on Travis. - env = _.extend({}, process.env, - ATOM_INTEGRATION_TESTS_ENABLED: not process.env.TRAVIS - ) - if process.platform in ['darwin', 'linux'] options = cmd: appPath args: ['--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}"] opts: - env: env + env: _.extend({}, process.env, + ATOM_INTEGRATION_TESTS_ENABLED: true + ) else if process.platform is 'win32' options = cmd: process.env.comspec args: ['/c', appPath, '--test', "--resource-path=#{resourcePath}", "--spec-directory=#{coreSpecsPath}", "--log-file=ci.log"] opts: - env: env + env: _.extend({}, process.env, + ATOM_INTEGRATION_TESTS_ENABLED: true + ) grunt.log.ok "Launching core specs." spawn options, (error, results, code) -> diff --git a/spec/integration/startup-spec.coffee b/spec/integration/startup-spec.coffee index 2dcf6ba38..b20427954 100644 --- a/spec/integration/startup-spec.coffee +++ b/spec/integration/startup-spec.coffee @@ -2,6 +2,9 @@ # # ATOM_INTEGRATION_TESTS_ENABLED=true apm test return unless process.env.ATOM_INTEGRATION_TESTS_ENABLED +# Integration tests require a fast machine and, for now, we cannot afford to +# run them on Travis. +return if process.env.TRAVIS fs = require "fs" path = require "path"