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
a655a177
Unverified
Commit
a655a177
authored
Oct 22, 2020
by
Jonah Williams
Committed by
GitHub
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[null-safety] swap tool unit tests to tester (#68733)
parent
2783f8e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
78 deletions
+6
-78
test.dart
dev/bots/test.dart
+6
-78
No files found.
dev/bots/test.dart
View file @
a655a177
...
@@ -308,22 +308,12 @@ Future<void> _runToolTests() async {
...
@@ -308,22 +308,12 @@ Future<void> _runToolTests() async {
final
String
suffix
=
Platform
.
isWindows
&&
subshard
==
'commands'
final
String
suffix
=
Platform
.
isWindows
&&
subshard
==
'commands'
?
'permeable'
?
'permeable'
:
''
;
:
''
;
// Try out tester on unit test shard
await
_pubRunTest
(
if
(
subshard
==
'general'
)
{
toolsPath
,
await
_pubRunTester
(
forceSingleCore:
subshard
!=
'general'
,
toolsPath
,
testPaths:
<
String
>[
path
.
join
(
kTest
,
'
$subshard$kDotShard
'
,
suffix
)],
testPaths:
<
String
>[
path
.
join
(
kTest
,
'
$subshard$kDotShard
'
,
suffix
)],
enableFlutterToolAsserts:
subshard
!=
'general'
,
// Detect unit test time regressions (poor time delay handling, etc).
);
perTestTimeout:
(
subshard
==
'general'
)
?
15
:
null
,
);
}
else
{
await
_pubRunTest
(
toolsPath
,
forceSingleCore:
true
,
testPaths:
<
String
>[
path
.
join
(
kTest
,
'
$subshard$kDotShard
'
,
suffix
)],
enableFlutterToolAsserts:
true
,
);
}
},
},
);
);
...
@@ -933,68 +923,6 @@ Future<void> _runFlutterWebTest(String workingDirectory, List<String> tests) asy
...
@@ -933,68 +923,6 @@ Future<void> _runFlutterWebTest(String workingDirectory, List<String> tests) asy
);
);
}
}
const
String
_supportedTesterVersion
=
'0.0.2-dev7'
;
Future
<
void
>
_pubRunTester
(
String
workingDirectory
,
{
List
<
String
>
testPaths
,
bool
forceSingleCore
=
false
,
int
perTestTimeout
,
})
async
{
int
cpus
;
final
String
cpuVariable
=
Platform
.
environment
[
'CPU'
];
// CPU is set in cirrus.yml
if
(
cpuVariable
!=
null
)
{
cpus
=
int
.
tryParse
(
cpuVariable
,
radix:
10
);
if
(
cpus
==
null
)
{
print
(
'
${red}
The CPU environment variable, if set, must be set to the integer number of available cores.
$reset
'
);
print
(
'Actual value: "
$cpuVariable
"'
);
exit
(
1
);
}
}
else
{
cpus
=
2
;
// Don't default to 1, otherwise we won't catch race conditions.
}
// Integration tests that depend on external processes like chrome
// can get stuck if there are multiple instances running at once.
if
(
forceSingleCore
)
{
cpus
=
1
;
}
final
List
<
String
>
args
=
<
String
>[
'global'
,
'activate'
,
'tester'
,
_supportedTesterVersion
];
final
Map
<
String
,
String
>
pubEnvironment
=
<
String
,
String
>{
'FLUTTER_ROOT'
:
flutterRoot
,
};
if
(
Directory
(
pubCache
).
existsSync
())
{
pubEnvironment
[
'PUB_CACHE'
]
=
pubCache
;
}
await
runCommand
(
pub
,
args
,
workingDirectory:
workingDirectory
,
environment:
pubEnvironment
,
);
await
runCommand
(
pub
,
<
String
>[
'global'
,
'run'
,
'tester'
,
'-j
$cpus
'
,
'-v'
,
'--ci'
,
if
(
perTestTimeout
!=
null
)
'--timeout=
$perTestTimeout
'
else
'--timeout=-1'
,
...
testPaths
,
],
workingDirectory:
workingDirectory
,
environment:
pubEnvironment
,
);
}
Future
<
void
>
_pubRunTest
(
String
workingDirectory
,
{
Future
<
void
>
_pubRunTest
(
String
workingDirectory
,
{
List
<
String
>
testPaths
,
List
<
String
>
testPaths
,
bool
enableFlutterToolAsserts
=
true
,
bool
enableFlutterToolAsserts
=
true
,
...
...
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