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
f50e2316
Unverified
Commit
f50e2316
authored
Jul 21, 2021
by
Jenn Magder
Committed by
GitHub
Jul 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused build_mode_test (#86808)
parent
883cdfb4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
101 deletions
+3
-101
build_mode_test.dart
dev/devicelab/bin/tasks/build_mode_test.dart
+0
-85
integration_test.dart
...tegration_tests/ui/integration_test/integration_test.dart
+3
-2
build_mode.dart
dev/integration_tests/ui/lib/build_mode.dart
+0
-14
No files found.
dev/devicelab/bin/tasks/build_mode_test.dart
deleted
100644 → 0
View file @
883cdfb4
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:flutter_devicelab/common.dart'
;
import
'package:flutter_devicelab/framework/devices.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/task_result.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
Future
<
String
>
runFlutterAndQuit
(
List
<
String
>
args
,
Device
device
)
async
{
final
Completer
<
void
>
ready
=
Completer
<
void
>();
print
(
'run: starting...'
);
final
Process
run
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
<
String
>[
'run'
,
'--suppress-analytics'
,
'--no-publish-port'
,
...
args
],
isBot:
false
,
// we just want to test the output, not have any debugging info
);
final
List
<
String
>
stdout
=
<
String
>[];
final
List
<
String
>
stderr
=
<
String
>[];
int
?
runExitCode
;
run
.
stdout
.
transform
<
String
>(
utf8
.
decoder
).
transform
<
String
>(
const
LineSplitter
()).
listen
(
(
String
line
)
{
print
(
'run:stdout:
$line
'
);
stdout
.
add
(
line
);
if
(
line
.
contains
(
'>>> FINISHED <<<'
))
{
ready
.
complete
();
}
},
);
run
.
stderr
.
transform
<
String
>(
utf8
.
decoder
).
transform
<
String
>(
const
LineSplitter
()).
listen
(
(
String
line
)
{
print
(
'run:stderr:
$line
'
);
stderr
.
add
(
line
);
},
);
unawaited
(
run
.
exitCode
.
then
<
void
>((
int
exitCode
)
{
runExitCode
=
exitCode
;
}));
await
Future
.
any
<
dynamic
>(<
Future
<
dynamic
>>[
ready
.
future
,
run
.
exitCode
]);
if
(
runExitCode
!=
null
)
{
throw
'Failed to run test app; runner unexpected exited, with exit code
$runExitCode
.'
;
}
run
.
stdin
.
write
(
'q'
);
await
run
.
exitCode
;
if
(
stderr
.
isNotEmpty
)
{
throw
'flutter run
${args.join(' ')}
had output on standard error:
\n
${stderr.join('\n')}
'
;
}
return
stdout
.
join
(
'
\n
'
);
}
void
main
(
)
{
task
(()
async
{
final
Device
device
=
await
devices
.
workingDevice
;
await
device
.
unlock
();
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/ui'
));
Future
<
void
>
checkMode
(
String
mode
,
{
bool
releaseExpected
=
false
,
bool
dynamic
=
false
})
async
{
await
inDirectory
(
appDir
,
()
async
{
print
(
'run: starting
$mode
test...'
);
final
List
<
String
>
args
=
<
String
>[
'--
$mode
'
,
if
(
dynamic
)
'--dynamic'
,
'-d'
,
device
.
deviceId
,
'lib/build_mode.dart'
,
];
final
String
stdout
=
await
runFlutterAndQuit
(
args
,
device
);
if
(!
stdout
.
contains
(
'>>> Release:
$releaseExpected
<<<'
))
{
throw
"flutter run --
$mode
${dynamic ? '--dynamic ' : ''}
didn't set kReleaseMode properly"
;
}
});
}
await
checkMode
(
'debug'
,
releaseExpected:
false
);
await
checkMode
(
'profile'
,
releaseExpected:
false
);
await
checkMode
(
'profile'
,
releaseExpected:
false
,
dynamic
:
true
);
await
checkMode
(
'release'
,
releaseExpected:
true
);
await
checkMode
(
'release'
,
releaseExpected:
true
,
dynamic
:
true
);
return
TaskResult
.
success
(
null
);
});
}
dev/integration_tests/ui/integration_test/integration_test.dart
View file @
f50e2316
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:integration_ui/
build_mode
.dart'
as
app
;
import
'package:integration_ui/
overflow
.dart'
as
app
;
void
main
(
)
{
void
main
(
)
{
group
(
'Integration Test'
,
()
{
group
(
'Integration Test'
,
()
{
...
@@ -11,7 +12,7 @@ void main() {
...
@@ -11,7 +12,7 @@ void main() {
app
.
main
();
app
.
main
();
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
find
.
text
(
'Hello, world!'
),
findsOneWidget
);
expect
(
find
.
byType
(
SizedBox
),
findsOneWidget
);
});
});
});
});
}
}
dev/integration_tests/ui/lib/build_mode.dart
deleted
100644 → 0
View file @
883cdfb4
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/widgets.dart'
;
Future
<
void
>
main
()
async
{
print
(
'>>> Release:
$kReleaseMode
<<<'
);
print
(
'>>> FINISHED <<<'
);
stdout
.
flush
();
runApp
(
const
Text
(
'Hello, world!'
,
textDirection:
TextDirection
.
ltr
));
}
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