Skip to content
Snippets Groups Projects
Unverified Commit 1266870d authored by Gary Roumanis's avatar Gary Roumanis Committed by GitHub
Browse files

Deprecate PhantomJS (#1149)

parent d30c16fa
No related branches found
No related tags found
No related merge requests found
......@@ -25,31 +25,31 @@ jobs:
env: PKGS="pkgs/test pkgs/test_api pkgs/test_core"
script: ./tool/travis.sh dartfmt dartanalyzer_0
- stage: unit_test
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis --total-shards 5 --shard-index 0`"
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 0`"
dart: dev
os: linux
env: PKGS="pkgs/test"
script: ./tool/travis.sh command_0
- stage: unit_test
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis --total-shards 5 --shard-index 1`"
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 1`"
dart: dev
os: linux
env: PKGS="pkgs/test"
script: ./tool/travis.sh command_1
- stage: unit_test
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis --total-shards 5 --shard-index 2`"
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 2`"
dart: dev
os: linux
env: PKGS="pkgs/test"
script: ./tool/travis.sh command_2
- stage: unit_test
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis --total-shards 5 --shard-index 3`"
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 3`"
dart: dev
os: linux
env: PKGS="pkgs/test"
script: ./tool/travis.sh command_3
- stage: unit_test
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis --total-shards 5 --shard-index 4`"
name: "SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 4`"
dart: dev
os: linux
env: PKGS="pkgs/test"
......
## 1.11.2-dev
* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
* Deprecate `PhantomJS` and provide warning when used. Support for `PhantomJS`
will be removed in version `2.0.0`.
## 1.11.1
......
......@@ -11,8 +11,8 @@ stages:
- dartanalyzer: --fatal-warnings .
dart: 2.4.0
- unit_test:
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 0
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 1
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 2
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 3
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 4
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 0
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 1
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 2
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 3
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 4
## 0.2.19-dev
* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
* Deprecate `PhantomJS` and provide warning when used. Support for `PhantomJS`
will be removed in version `2.0.0`.
## 0.2.18
......
......@@ -7,11 +7,12 @@ import 'dart:math';
import 'package:args/args.dart';
import 'package:boolean_selector/boolean_selector.dart';
import 'package:test_api/src/backend/runtime.dart'; // ignore: implementation_imports
import 'package:test_api/src/frontend/timeout.dart'; // ignore: implementation_imports
import '../runtime_selection.dart';
import '../../util/io.dart';
import '../configuration.dart';
import '../runtime_selection.dart';
import 'reporters.dart';
import 'values.dart';
......@@ -225,6 +226,20 @@ class _Parser {
return seed;
});
var color = _ifParsed<bool>('color') ?? canUseSpecialChars;
var platform = _ifParsed<List<String>>('platform')
?.map((runtime) => RuntimeSelection(runtime))
?.toList();
if (platform
?.any((runtime) => runtime.name == Runtime.phantomJS.identifier) ??
false) {
var yellow = color ? '\u001b[33m' : '';
var noColor = color ? '\u001b[0m' : '';
print('${yellow}Warning:$noColor '
'PhatomJS is deprecated and will be removed in version ^2.0.0');
}
return Configuration(
help: _ifParsed('help'),
version: _ifParsed('version'),
......@@ -233,7 +248,7 @@ class _Parser {
jsTrace: _ifParsed('js-trace'),
pauseAfterLoad: _ifParsed('pause-after-load'),
debug: _ifParsed('debug'),
color: _ifParsed('color'),
color: color,
configurationPath: _ifParsed('configuration'),
dart2jsPath: _ifParsed('dart2js-path'),
dart2jsArgs: _ifParsed('dart2js-args'),
......@@ -247,9 +262,7 @@ class _Parser {
totalShards: totalShards,
timeout: _parseOption('timeout', (value) => Timeout.parse(value)),
patterns: patterns,
runtimes: _ifParsed<List<String>>('platform')
?.map((runtime) => RuntimeSelection(runtime))
?.toList(),
runtimes: platform,
runSkipped: _ifParsed('run-skipped'),
chosenPresets: _ifParsed('preset'),
paths: _options.rest.isEmpty ? null : _options.rest,
......
......@@ -55,24 +55,24 @@ for PKG in ${PKGS}; do
echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m"
case ${TASK} in
command_0)
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 0'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 0 || EXIT_CODE=$?
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 0'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 0 || EXIT_CODE=$?
;;
command_1)
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 1'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 1 || EXIT_CODE=$?
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 1'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 1 || EXIT_CODE=$?
;;
command_2)
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 2'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 2 || EXIT_CODE=$?
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 2'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 2 || EXIT_CODE=$?
;;
command_3)
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 3'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 3 || EXIT_CODE=$?
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 3'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 3 || EXIT_CODE=$?
;;
command_4)
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 4'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 4 || EXIT_CODE=$?
echo 'xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 4'
xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis -x phantomjs --total-shards 5 --shard-index 4 || EXIT_CODE=$?
;;
dartanalyzer_0)
echo 'dartanalyzer --fatal-infos --fatal-warnings .'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment