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
8712f63d
Unverified
Commit
8712f63d
authored
Feb 01, 2021
by
Jenn Magder
Committed by
GitHub
Feb 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split tools_tests subshards into separate shards to support sub-sub-sharding (#75033)
parent
13fe079b
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
237 additions
and
66 deletions
+237
-66
test.dart
dev/bots/test.dart
+196
-66
test_test.dart
dev/bots/test/test_test.dart
+41
-0
No files found.
dev/bots/test.dart
View file @
8712f63d
This diff is collapsed.
Click to expand it.
dev/bots/test/test_test.dart
View file @
8712f63d
...
...
@@ -8,6 +8,7 @@ import 'package:file/file.dart' as fs;
import
'package:file/memory.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:path/path.dart'
as
path
;
import
'package:process/process.dart'
;
import
'../test.dart'
;
import
'common.dart'
;
...
...
@@ -80,4 +81,44 @@ void main() {
expect
(
actualHash
,
kSampleHash
);
});
});
group
(
'test.dart script'
,
()
{
const
ProcessManager
processManager
=
LocalProcessManager
();
Future
<
ProcessResult
>
runScript
(
[
Map
<
String
,
String
>
environment
,
List
<
String
>
otherArgs
=
const
<
String
>[]])
async
{
final
String
dart
=
path
.
absolute
(
path
.
join
(
'..'
,
'..'
,
'bin'
,
'cache'
,
'dart-sdk'
,
'bin'
,
'dart'
));
final
ProcessResult
scriptProcess
=
processManager
.
runSync
(<
String
>[
dart
,
'test.dart'
,
...
otherArgs
,
],
environment:
environment
);
return
scriptProcess
;
}
test
(
'subshards tests correctly'
,
()
async
{
ProcessResult
result
=
await
runScript
(
<
String
,
String
>{
'SHARD'
:
'smoke_tests'
,
'SUBSHARD'
:
'1_3'
},
);
expect
(
result
.
exitCode
,
0
);
// There are currently 6 smoke tests. This shard should contain test 1 and 2.
expect
(
result
.
stdout
,
contains
(
'Selecting subshard 1 of 3 (range 1-2 of 6)'
));
result
=
await
runScript
(
<
String
,
String
>{
'SHARD'
:
'smoke_tests'
,
'SUBSHARD'
:
'5_6'
},
);
expect
(
result
.
exitCode
,
0
);
// This shard should contain only test 5.
expect
(
result
.
stdout
,
contains
(
'Selecting subshard 5 of 6 (range 5-5 of 6)'
));
});
test
(
'exits with code 1 when SUBSHARD index greater than total'
,
()
async
{
final
ProcessResult
result
=
await
runScript
(
<
String
,
String
>{
'SHARD'
:
'smoke_tests'
,
'SUBSHARD'
:
'100_99'
},
);
expect
(
result
.
exitCode
,
1
);
expect
(
result
.
stdout
,
contains
(
'Invalid subshard name'
));
});
});
}
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