Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
52007064
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
52007064
编写于
4月 18, 2018
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'continuous-smoketest'
上级
27048123
7dd11a0c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
85 addition
and
51 deletion
+85
-51
build/tfs/continuous-build.yml
build/tfs/continuous-build.yml
+15
-7
build/tfs/product-build.yml
build/tfs/product-build.yml
+9
-0
package.json
package.json
+0
-1
src/vs/platform/driver/common/driver.ts
src/vs/platform/driver/common/driver.ts
+7
-0
src/vs/platform/driver/electron-main/driver.ts
src/vs/platform/driver/electron-main/driver.ts
+13
-1
test/electron/index.js
test/electron/index.js
+0
-6
test/smoke/src/application.ts
test/smoke/src/application.ts
+4
-0
test/smoke/src/areas/git/git.test.ts
test/smoke/src/areas/git/git.test.ts
+7
-0
test/smoke/src/main.ts
test/smoke/src/main.ts
+25
-2
test/smoke/src/vscode/code.ts
test/smoke/src/vscode/code.ts
+5
-0
yarn.lock
yarn.lock
+0
-34
未找到文件。
build/tfs/continuous-build.yml
浏览文件 @
52007064
...
...
@@ -14,14 +14,19 @@ phases:
npm run gulp -- hygiene
.\node_modules\.bin\tsc -p .\src\tsconfig.monaco.json --noEmit
npm run compile
node build/lib/builtInExtensions.js
name
:
build
-
powershell
:
|
.\scripts\test.bat --tfs
.\scripts\test-integration.bat
yarn smoketest --screenshots "$(Build.ArtifactStagingDirectory)\screenshots"
name
:
test
-
task
:
Publish
TestResults@2
-
task
:
Publish
BuildArtifacts@1
inputs
:
testResultsFiles
:
'
.build\tests\unit-test-results.xml'
PathtoPublish
:
'
$(Build.ArtifactStagingDirectory)/screenshots'
ArtifactName
:
Screenshots
publishLocation
:
Container
condition
:
succeededOrFailed()
-
phase
:
Linux
queue
:
Hosted Linux Preview
...
...
@@ -48,14 +53,12 @@ phases:
npm run gulp -- hygiene
./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit
npm run compile
node build/lib/builtInExtensions.js
name
:
build
-
script
:
|
DISPLAY=:10 ./scripts/test.sh --tfs
# DISPLAY=:10 ./scripts/test-integration.sh
name
:
test
-
task
:
PublishTestResults@2
inputs
:
testResultsFiles
:
'
.build/tests/unit-test-results.xml'
-
phase
:
macOS
queue
:
Hosted macOS Preview
...
...
@@ -73,11 +76,16 @@ phases:
npm run gulp -- hygiene
./node_modules/.bin/tsc -p ./src/tsconfig.monaco.json --noEmit
npm run compile
node build/lib/builtInExtensions.js
name
:
build
-
script
:
|
./scripts/test.sh --tfs
./scripts/test-integration.sh
yarn smoketest --screenshots "$(Build.ArtifactStagingDirectory)/screenshots"
name
:
test
-
task
:
Publish
TestResults@2
-
task
:
Publish
BuildArtifacts@1
inputs
:
testResultsFiles
:
'
.build/tests/unit-test-results.xml'
PathtoPublish
:
'
$(Build.ArtifactStagingDirectory)/screenshots'
ArtifactName
:
Screenshots
publishLocation
:
Container
condition
:
succeededOrFailed()
build/tfs/product-build.yml
浏览文件 @
52007064
...
...
@@ -29,6 +29,7 @@ phases:
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
npm run gulp -- mixin
node build/tfs/common/installDistro.js
node build/lib/builtInExtensions.js
-
powershell
:
|
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
...
...
@@ -39,6 +40,7 @@ phases:
-
powershell
:
|
npm run gulp -- "electron-$(VSCODE_ARCH)"
.\scripts\test.bat --build --tfs
yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
name
:
test
-
task
:
SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
...
...
@@ -253,6 +255,7 @@ phases:
npm run monaco-compile-check
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
node build/tfs/common/installDistro.js
node build/lib/builtInExtensions.js
-
script
:
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min
...
...
@@ -261,6 +264,7 @@ phases:
-
script
:
|
npm run gulp -- "electron-$(VSCODE_ARCH)"
DISPLAY=:10 ./scripts/test.sh --build --tfs
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
name
:
test
-
script
:
|
...
...
@@ -303,6 +307,7 @@ phases:
npm run monaco-compile-check
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
node build/tfs/common/installDistro.js
node build/lib/builtInExtensions.js
-
script
:
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min
...
...
@@ -311,6 +316,7 @@ phases:
-
script
:
|
npm run gulp -- "electron-$(VSCODE_ARCH)"
DISPLAY=:10 ./scripts/test.sh --build --tfs
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
name
:
test
-
script
:
|
...
...
@@ -345,6 +351,7 @@ phases:
npm run monaco-compile-check
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
node build/tfs/common/installDistro.js
node build/lib/builtInExtensions.js
-
script
:
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
...
...
@@ -354,6 +361,8 @@ phases:
-
script
:
|
./scripts/test.sh --build --tfs
APP_NAME="`ls $(agent.builddirectory)/VSCode-darwin | head -n 1`"
yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
name
:
test
-
script
:
|
...
...
package.json
浏览文件 @
52007064
...
...
@@ -102,7 +102,6 @@
"
minimatch
"
:
"
^2.0.10
"
,
"
mkdirp
"
:
"
^0.5.0
"
,
"
mocha
"
:
"
^2.2.5
"
,
"
mocha-junit-reporter
"
:
"
^1.17.0
"
,
"
object-assign
"
:
"
^4.0.1
"
,
"
optimist
"
:
"
0.3.5
"
,
"
p-all
"
:
"
^1.0.0
"
,
...
...
src/vs/platform/driver/common/driver.ts
浏览文件 @
52007064
...
...
@@ -27,6 +27,7 @@ export interface IDriver {
_serviceBrand
:
any
;
getWindowIds
():
TPromise
<
number
[]
>
;
capturePage
(
windowId
:
number
):
TPromise
<
string
>
;
reloadWindow
(
windowId
:
number
):
TPromise
<
void
>
;
dispatchKeybinding
(
windowId
:
number
,
keybinding
:
string
):
TPromise
<
void
>
;
click
(
windowId
:
number
,
selector
:
string
,
xoffset
?:
number
|
undefined
,
yoffset
?:
number
|
undefined
):
TPromise
<
void
>
;
...
...
@@ -43,6 +44,7 @@ export interface IDriver {
export
interface
IDriverChannel
extends
IChannel
{
call
(
command
:
'
getWindowIds
'
):
TPromise
<
number
[]
>
;
call
(
command
:
'
capturePage
'
):
TPromise
<
string
>
;
call
(
command
:
'
reloadWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
dispatchKeybinding
'
,
arg
:
[
number
,
string
]):
TPromise
<
void
>
;
call
(
command
:
'
click
'
,
arg
:
[
number
,
string
,
number
|
undefined
,
number
|
undefined
]):
TPromise
<
void
>
;
...
...
@@ -64,6 +66,7 @@ export class DriverChannel implements IDriverChannel {
call
(
command
:
string
,
arg
?:
any
):
TPromise
<
any
>
{
switch
(
command
)
{
case
'
getWindowIds
'
:
return
this
.
driver
.
getWindowIds
();
case
'
capturePage
'
:
return
this
.
driver
.
capturePage
(
arg
);
case
'
reloadWindow
'
:
return
this
.
driver
.
reloadWindow
(
arg
);
case
'
dispatchKeybinding
'
:
return
this
.
driver
.
dispatchKeybinding
(
arg
[
0
],
arg
[
1
]);
case
'
click
'
:
return
this
.
driver
.
click
(
arg
[
0
],
arg
[
1
],
arg
[
2
],
arg
[
3
]);
...
...
@@ -91,6 +94,10 @@ export class DriverChannelClient implements IDriver {
return
this
.
channel
.
call
(
'
getWindowIds
'
);
}
capturePage
(
windowId
:
number
):
TPromise
<
string
>
{
return
this
.
channel
.
call
(
'
capturePage
'
,
windowId
);
}
reloadWindow
(
windowId
:
number
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
reloadWindow
'
,
windowId
);
}
...
...
src/vs/platform/driver/electron-main/driver.ts
浏览文件 @
52007064
...
...
@@ -20,6 +20,7 @@ import { Emitter, toPromise } from 'vs/base/common/event';
// TODO@joao: bad layering!
import
{
KeybindingIO
}
from
'
vs/workbench/services/keybinding/common/keybindingIO
'
;
import
{
ScanCodeBinding
}
from
'
vs/workbench/services/keybinding/common/scanCode
'
;
import
{
NativeImage
}
from
'
electron
'
;
class
WindowRouter
implements
IClientRouter
{
...
...
@@ -63,12 +64,23 @@ export class Driver implements IDriver, IWindowDriverRegistry {
.
filter
(
id
=>
this
.
registeredWindowIds
.
has
(
id
)
&&
!
this
.
reloadingWindowIds
.
has
(
id
));
}
async
capturePage
(
windowId
:
number
):
TPromise
<
string
>
{
await
this
.
whenUnfrozen
(
windowId
);
const
window
=
this
.
windowsService
.
getWindowById
(
windowId
);
const
webContents
=
window
.
win
.
webContents
;
const
image
=
await
new
Promise
<
NativeImage
>
(
c
=>
webContents
.
capturePage
(
c
));
const
buffer
=
image
.
toPNG
();
return
buffer
.
toString
(
'
base64
'
);
}
async
reloadWindow
(
windowId
:
number
):
TPromise
<
void
>
{
await
this
.
whenUnfrozen
(
windowId
);
const
window
=
this
.
windowsService
.
getWindowById
(
windowId
);
this
.
reloadingWindowIds
.
add
(
windowId
);
window
.
reload
(
);
this
.
windowsService
.
reload
(
window
);
}
async
dispatchKeybinding
(
windowId
:
number
,
keybinding
:
string
):
TPromise
<
void
>
{
...
...
test/electron/index.js
浏览文件 @
52007064
...
...
@@ -8,7 +8,6 @@ const { tmpdir } = require('os');
const
{
join
}
=
require
(
'
path
'
);
const
path
=
require
(
'
path
'
);
const
mocha
=
require
(
'
mocha
'
);
const
JUnitReporter
=
require
(
'
mocha-junit-reporter
'
);
const
events
=
require
(
'
events
'
);
const
defaultReporterName
=
process
.
platform
===
'
win32
'
?
'
list
'
:
'
spec
'
;
...
...
@@ -143,11 +142,6 @@ app.on('ready', () => {
if
(
argv
.
tfs
)
{
new
TFSReporter
(
runner
);
new
JUnitReporter
(
runner
,
{
reporterOptions
:
{
mochaFile
:
'
.build/tests/unit-test-results.xml
'
}
});
}
else
{
const
reporterPath
=
path
.
join
(
path
.
dirname
(
require
.
resolve
(
'
mocha
'
)),
'
lib
'
,
'
reporters
'
,
argv
.
reporter
);
let
Reporter
;
...
...
test/smoke/src/application.ts
浏览文件 @
52007064
...
...
@@ -93,6 +93,10 @@ export class Application {
}
}
async
capturePage
():
Promise
<
string
>
{
return
this
.
code
.
capturePage
();
}
private
async
startApplication
(
workspaceOrFolder
:
string
,
extraArgs
:
string
[]
=
[]):
Promise
<
any
>
{
this
.
_code
=
await
spawn
({
codePath
:
this
.
options
.
codePath
,
...
...
test/smoke/src/areas/git/git.test.ts
浏览文件 @
52007064
...
...
@@ -11,6 +11,13 @@ const SYNC_STATUSBAR = 'div[id="workbench.parts.statusbar"] .statusbar-entry a[t
export
function
setup
()
{
describe
(
'
Git
'
,
()
=>
{
before
(
async
function
()
{
const
app
=
this
.
app
as
Application
;
cp
.
execSync
(
'
git config user.name testuser
'
,
{
cwd
:
app
.
workspacePath
});
cp
.
execSync
(
'
git config user.email monacotools@microsoft.com
'
,
{
cwd
:
app
.
workspacePath
});
});
it
(
'
reflects working tree changes
'
,
async
function
()
{
const
app
=
this
.
app
as
Application
;
...
...
test/smoke/src/main.ts
浏览文件 @
52007064
...
...
@@ -38,7 +38,8 @@ const opts = minimist(args, {
'
stable-build
'
,
'
wait-time
'
,
'
test-repo
'
,
'
keybindings
'
'
keybindings
'
,
'
screenshots
'
],
boolean
:
[
'
verbose
'
...
...
@@ -55,6 +56,12 @@ const keybindingsPath = path.join(testDataPath, 'keybindings.json');
const
extensionsPath
=
path
.
join
(
testDataPath
,
'
extensions-dir
'
);
mkdirp
.
sync
(
extensionsPath
);
const
screenshotsPath
=
opts
.
screenshots
?
path
.
resolve
(
opts
.
screenshots
)
:
null
;
if
(
screenshotsPath
)
{
mkdirp
.
sync
(
screenshotsPath
);
}
function
fail
(
errorMessage
):
void
{
console
.
error
(
errorMessage
);
process
.
exit
(
1
);
...
...
@@ -256,7 +263,7 @@ describe('Data Migration', () => {
setupDataMigrationTests
(
userDataDir
,
createApp
);
});
describe
(
'
Everything Else
'
,
()
=>
{
describe
(
'
Test
'
,
()
=>
{
before
(
async
function
()
{
const
app
=
createApp
(
quality
);
await
app
!
.
start
();
...
...
@@ -267,6 +274,22 @@ describe('Everything Else', () => {
await
this
.
app
.
stop
();
});
if
(
screenshotsPath
)
{
afterEach
(
async
function
()
{
if
(
this
.
currentTest
.
state
!==
'
failed
'
)
{
return
;
}
const
app
=
this
.
app
as
Application
;
const
raw
=
await
app
.
capturePage
();
const
buffer
=
new
Buffer
(
raw
,
'
base64
'
);
const
name
=
this
.
currentTest
.
fullTitle
().
replace
(
/
[^
a-z0-9
\-]
/ig
,
'
_
'
);
const
screenshotPath
=
path
.
join
(
screenshotsPath
,
`
${
name
}
.png`
);
fs
.
writeFileSync
(
screenshotPath
,
buffer
);
});
}
setupDataLossTests
();
setupDataExplorerTests
();
setupDataPreferencesTests
();
...
...
test/smoke/src/vscode/code.ts
浏览文件 @
52007064
...
...
@@ -202,6 +202,11 @@ export class Code {
}
}
async
capturePage
():
Promise
<
string
>
{
const
windowId
=
await
this
.
getActiveWindowId
();
return
await
this
.
driver
.
capturePage
(
windowId
);
}
async
waitForWindowIds
(
fn
:
(
windowIds
:
number
[])
=>
boolean
):
Promise
<
void
>
{
await
poll
(()
=>
this
.
driver
.
getWindowIds
(),
fn
,
`get window ids`
);
}
...
...
yarn.lock
浏览文件 @
52007064
...
...
@@ -602,10 +602,6 @@ chalk@^2.3.0:
escape-string-regexp "^1.0.5"
supports-color "^4.0.0"
charenc@~0.0.1:
version "0.0.2"
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
cheerio@^1.0.0-rc.1:
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
...
...
@@ -885,10 +881,6 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"
crypt@~0.0.1:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
cryptiles@0.2.x:
version "0.2.2"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-0.2.2.tgz#ed91ff1f17ad13d3748288594f8a48a0d26f325c"
...
...
@@ -2753,10 +2745,6 @@ is-buffer@^1.0.2:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b"
is-buffer@~1.1.1:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
is-builtin-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe"
...
...
@@ -3510,14 +3498,6 @@ math-expression-evaluator@^1.2.14:
version "1.2.17"
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
md5@^2.1.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9"
dependencies:
charenc "~0.0.1"
crypt "~0.0.1"
is-buffer "~1.1.1"
mdurl@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
...
...
@@ -3671,16 +3651,6 @@ mksnapshot@^0.3.0:
fs-extra "0.26.7"
request "^2.79.0"
mocha-junit-reporter@^1.17.0:
version "1.17.0"
resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-1.17.0.tgz#2e5149ed40fc5d2e3ca71e42db5ab1fec9c6d85c"
dependencies:
debug "^2.2.0"
md5 "^2.1.0"
mkdirp "~0.5.1"
strip-ansi "^4.0.0"
xml "^1.0.0"
mocha@^2.0.1, mocha@^2.2.5:
version "2.5.3"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58"
...
...
@@ -6029,10 +5999,6 @@ xml2js@^0.4.19:
sax ">=0.6.0"
xmlbuilder "~9.0.1"
xml@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
xmlbuilder@0.4.3:
version "0.4.3"
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-0.4.3.tgz#c4614ba74e0ad196e609c9272cd9e1ddb28a8a58"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录