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
c8fd99fb
Unverified
Commit
c8fd99fb
authored
Mar 12, 2018
by
xster
Committed by
GitHub
Mar 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a simple convenience test task runner for VSCode (#15417)
parent
e5ba3041
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
1 deletion
+54
-1
.gitignore
.gitignore
+3
-1
tasks.json
.vscode/tasks.json
+24
-0
test.sh
.vscode/test.sh
+27
-0
No files found.
.gitignore
View file @
c8fd99fb
...
...
@@ -17,7 +17,7 @@
.idea/
# Visual Studio Code related
.vscode/
.vscode/
*
# Flutter repo-specific
/bin/cache/
...
...
@@ -79,6 +79,8 @@ unlinked_spec.ds
**/ios/Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!.vscode/tasks.json
!.vscode/test.sh
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
...
...
.vscode/tasks.json
0 → 100644
View file @
c8fd99fb
{
"version"
:
"2.0.0"
,
"tasks"
:
[
{
"command"
:
"./.vscode/test.sh"
,
"windows"
:
{
//
TODO
:
S
},
"label"
:
"test"
,
"type"
:
"shell"
,
"group"
:
{
"kind"
:
"test"
,
"isDefault"
:
true
},
"presentation"
:
{
"echo"
:
true
,
"reveal"
:
"always"
,
"focus"
:
false
,
"panel"
:
"new"
},
"args"
:
[
"${relativeFile}"
]
}
]
}
.vscode/test.sh
0 → 100755
View file @
c8fd99fb
#!/bin/bash
if
[[
$#
-ne
1
]]
;
then
echo
"Invalid test target arguments.
Please invoke test from VSCode via the workbench.action.tasks.test command."
exit
1
fi
if
[[
"
$1
"
!=
*
.dart
]]
;
then
echo
"Only .dart files can be tested by task in this repo."
exit
1
fi
echo
"Testing
$1
..."
if
[[
"
$1
"
==
packages/flutter/test/
*
]]
;
then
cd
packages/flutter
../../bin/flutter
test
../../
$1
elif
[[
"
$1
"
==
packages/flutter_tools/test/
*
]]
;
then
bin/cache/dart-sdk/bin/dart
$1
else
echo
"No test task configured for
$1
.
Please edit .vscode/test.sh to configure new test types."
exit
1
fi
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