Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e7601e3f
Commit
e7601e3f
authored
Sep 09, 2016
by
Chris Bracken
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use .packages for flutter driver tests (#5795)
Fixes flutter drive breakage introduced in
d2fda677
.
parent
cc3df142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
drive.dart
packages/flutter_tools/lib/src/commands/drive.dart
+15
-11
No files found.
packages/flutter_tools/lib/src/commands/drive.dart
View file @
e7601e3f
...
...
@@ -6,7 +6,6 @@ import 'dart:async';
import
'dart:io'
as
io
;
import
'package:path/path.dart'
as
path
;
import
'package:test/src/executable.dart'
as
executable
;
// ignore: implementation_imports
import
'../android/android_device.dart'
show
AndroidDevice
;
import
'../application_package.dart'
;
...
...
@@ -17,6 +16,7 @@ import '../base/os.dart';
import
'../base/process.dart'
;
import
'../build_info.dart'
;
import
'../cache.dart'
;
import
'../dart/package_map.dart'
;
import
'../dart/sdk.dart'
;
import
'../device.dart'
;
import
'../globals.dart'
;
...
...
@@ -126,13 +126,11 @@ class DriveCommand extends RunCommandBase {
printStatus
(
'Will connect to already running application instance.'
);
}
// Check for the existance of a `packages/` directory; pub test does not yet
// support running without symlinks.
if
(!
new
io
.
Directory
(
'packages'
).
existsSync
())
{
Status
status
=
logger
.
startProgress
(
'Missing packages directory; running `pub get` (to work around https://github.com/dart-lang/test/issues/327):'
);
await
runAsync
(<
String
>[
sdkBinaryName
(
'pub'
),
'get'
,
'--no-precompile'
]);
// Check for the existence of a `.packages` file.
PackageMap
.
globalPackagesPath
=
path
.
normalize
(
path
.
absolute
(
PackageMap
.
globalPackagesPath
));
if
(!
new
io
.
File
(
PackageMap
.
globalPackagesPath
).
existsSync
())
{
Status
status
=
logger
.
startProgress
(
'Missing .packages file; running `pub get`:'
);
await
runAsync
(<
String
>[
sdkBinaryName
(
'pub'
),
'get'
,
'--no-precompile'
,
'--no-packages-dir'
]);
status
.
stop
(
showElapsedTime:
true
);
}
...
...
@@ -335,9 +333,15 @@ void restoreTestRunner() {
Future
<
int
>
runTests
(
List
<
String
>
testArgs
)
async
{
printTrace
(
'Running driver tests.'
);
List
<
String
>
args
=
testArgs
.
toList
()..
add
(
'-rexpanded'
);
await
executable
.
main
(
args
);
return
io
.
exitCode
;
List
<
String
>
args
=
testArgs
.
toList
()
..
add
(
'--packages=
${PackageMap.globalPackagesPath}
'
)
..
add
(
'-rexpanded'
);
String
dartVmPath
=
path
.
join
(
dartSdkPath
,
'bin'
,
'dart'
);
io
.
Process
driver
=
await
io
.
Process
.
start
(
dartVmPath
,
args
);
driver
.
stdout
.
listen
(
io
.
stdout
.
add
);
driver
.
stderr
.
listen
(
io
.
stderr
.
add
);
return
await
driver
.
exitCode
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment