From 1369a61df42c9aeafa19f98a2b0eafdccb16d3ee Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 29 Jul 2016 17:42:56 +0200 Subject: [PATCH] Start on build/test.js --- build/package.json | 1 + build/test.js | 22 ++++++++++++++++++++++ circle.yml | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 build/test.js diff --git a/build/package.json b/build/package.json index 1485970fb..141f64652 100644 --- a/build/package.json +++ b/build/package.json @@ -4,6 +4,7 @@ "dependencies": { "babel-core": "5.8.38", "coffee-script": "1.8.0", + "colors": "1.1.2", "electron-packager": "7.3.0", "fs-extra": "0.30.0", "glob": "7.0.3", diff --git a/build/test.js b/build/test.js new file mode 100755 index 000000000..36b13e3a5 --- /dev/null +++ b/build/test.js @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +'use strict' + +require('colors') + +const path = require('path') +const childProcess = require('child_process') +const CONFIG = require('./config') + +const packagedAppPath = path.resolve(__dirname, '..', 'out', 'Atom-darwin-x64') +const executablePath = path.join(packagedAppPath, 'Atom.app', 'Contents', 'MacOS', 'Atom') + +const resourcePath = CONFIG.repositoryRootPath +const testPath = path.join(CONFIG.repositoryRootPath, 'spec') +const testArguments = [ + '--resource-path', resourcePath, + '--test', testPath +] + +console.log('Executing core specs...'.bold.green) +childProcess.spawnSync(executablePath, testArguments, {stdio: 'inherit'}) diff --git a/circle.yml b/circle.yml index 6f75569e0..a7e5eb2b2 100644 --- a/circle.yml +++ b/circle.yml @@ -33,4 +33,4 @@ dependencies: test: override: - - out/Atom-darwin-x64/Atom.app/Contents/MacOS/Atom --resource-path $(pwd) --test spec + - build/test.js