|
1 | 1 | 'use strict';
|
2 |
| -const Config = require("./config"), |
3 |
| - logger = require("./logger").syncCliLogger, |
4 |
| - Constants = require("./constants"), |
5 |
| - utils = require("./utils"), |
6 |
| - request = require('request'), |
7 |
| - syncSpecsLogs = require('./sync/syncSpecsLogs'), |
| 2 | +const syncSpecsLogs = require('./sync/syncSpecsLogs'), |
8 | 3 | specDetails = require('./sync/failedSpecsDetails'),
|
9 |
| - specsSummary = require('./sync/specsSummary'), |
10 |
| - { table, getBorderCharacters } = require('table'), |
11 |
| - chalk = require('chalk'); |
| 4 | + specsSummary = require('./sync/specsSummary'); |
12 | 5 |
|
13 | 6 | exports.pollBuildStatus = (bsConfig, buildDetails) => {
|
14 | 7 | return new Promise((resolve, reject) => {
|
15 |
| - //logBuildDetails(bsConfig, buildDetails); |
16 | 8 | syncSpecsLogs.printSpecsStatus(bsConfig, buildDetails).then((data) => {
|
17 | 9 | return specDetails.failedSpecsDetails(data);
|
18 |
| - // return specsSummary.printSpecsRunSummary(data.specs, data.duration, buildDetails.machines); |
19 | 10 | }).then((data) => {
|
20 | 11 | return specsSummary.printSpecsRunSummary(data, buildDetails.machines);
|
21 |
| - // return specDetails.failedSpecsDetails(data); |
22 | 12 | }).then((successExitCode) => {
|
23 | 13 | resolve(successExitCode); // exit code 0
|
24 | 14 | }).catch((nonZeroExitCode) => {
|
25 | 15 | resolve(nonZeroExitCode); // exit code 1
|
26 | 16 | })
|
27 | 17 | });
|
28 | 18 | };
|
29 |
| - |
30 |
| -let logBuildDetails = (bsConfig, buildDetails) => { |
31 |
| - let parallels_enabled = false; |
32 |
| - if (bsConfig.run_settings.parallels) { |
33 |
| - parallels_enabled = true; |
34 |
| - } |
35 |
| - let parallelMessage = `Run in parallel: ${parallels_enabled ? 'enabled' : 'disabled'}`; |
36 |
| - if (parallels_enabled) parallelMessage = parallelMessage + ` (attempting to run on ${buildDetails.machines} machines)`; |
37 |
| - |
38 |
| - logger.info(`Browser Combinations: ${buildDetails.combinations}`); |
39 |
| - logger.info(parallelMessage); |
40 |
| - logger.info(`BrowserStack Dashboard: ${buildDetails.dashboard_url}`); |
41 |
| -}; |
0 commit comments