Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
a71829cd
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a71829cd
编写于
7月 01, 2021
作者:
D
Darren Chan
提交者:
GitHub
7月 01, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prepare for cfv2 unittests. (#27036)
上级
28787927
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
38 addition
and
231 deletion
+38
-231
shell/platform/fuchsia/flutter/BUILD.gn
shell/platform/fuchsia/flutter/BUILD.gn
+5
-19
shell/platform/fuchsia/flutter/meta/flutter_runner_scenic_tests.cmx
...form/fuchsia/flutter/meta/flutter_runner_scenic_tests.cmx
+1
-1
shell/platform/fuchsia/flutter/runner_unittest.cc
shell/platform/fuchsia/flutter/runner_unittest.cc
+5
-0
testing/fuchsia/run_tests.sh
testing/fuchsia/run_tests.sh
+0
-204
testing/fuchsia/test_suites
testing/fuchsia/test_suites
+0
-0
tools/fuchsia/compile_cml.py
tools/fuchsia/compile_cml.py
+7
-6
tools/fuchsia/fuchsia_archive.gni
tools/fuchsia/fuchsia_archive.gni
+20
-1
未找到文件。
shell/platform/fuchsia/flutter/BUILD.gn
浏览文件 @
a71829cd
...
@@ -513,9 +513,7 @@ executable("flutter_runner_scenic_unittests") {
...
@@ -513,9 +513,7 @@ executable("flutter_runner_scenic_unittests") {
] + flutter_deps
] + flutter_deps
}
}
fuchsia_archive("flutter_runner_tests") {
fuchsia_test_archive("flutter_runner_tests") {
testonly = true
deps = [ ":flutter_runner_unittests" ]
deps = [ ":flutter_runner_unittests" ]
binary = "$target_name"
binary = "$target_name"
...
@@ -543,14 +541,10 @@ fuchsia_archive("flutter_runner_tests") {
...
@@ -543,14 +541,10 @@ fuchsia_archive("flutter_runner_tests") {
]
]
cmx_file = rebase_path("meta/$target_name.cmx")
cmx_file = rebase_path("meta/$target_name.cmx")
libraries = common_libs
}
}
fuchsia_archive("flutter_runner_tzdata_tests") {
fuchsia_test_archive("flutter_runner_scenic_tests") {
testonly = true
deps = [ ":flutter_runner_scenic_unittests" ]
deps = [ ":flutter_runner_tzdata_unittests" ]
binary = "$target_name"
binary = "$target_name"
...
@@ -562,14 +556,10 @@ fuchsia_archive("flutter_runner_tzdata_tests") {
...
@@ -562,14 +556,10 @@ fuchsia_archive("flutter_runner_tzdata_tests") {
]
]
cmx_file = rebase_path("meta/$target_name.cmx")
cmx_file = rebase_path("meta/$target_name.cmx")
libraries = common_libs
}
}
fuchsia_archive("flutter_runner_scenic_tests") {
fuchsia_test_archive("flutter_runner_tzdata_tests") {
testonly = true
deps = [ ":flutter_runner_tzdata_unittests" ]
deps = [ ":flutter_runner_scenic_unittests" ]
binary = "$target_name"
binary = "$target_name"
...
@@ -579,10 +569,6 @@ fuchsia_archive("flutter_runner_scenic_tests") {
...
@@ -579,10 +569,6 @@ fuchsia_archive("flutter_runner_scenic_tests") {
dest = "icudtl.dat"
dest = "icudtl.dat"
},
},
]
]
cmx_file = rebase_path("meta/$target_name.cmx")
libraries = common_libs
}
}
fuchsia_test_archive("fml_tests") {
fuchsia_test_archive("fml_tests") {
...
...
shell/platform/fuchsia/flutter/meta/flutter_runner_scenic_tests.cmx
浏览文件 @
a71829cd
{
{
"program": {
"program": {
"binary": "bin/app"
"binary": "bin/app"
},
},
"sandbox": {
"sandbox": {
...
...
shell/platform/fuchsia/flutter/runner_unittest.cc
浏览文件 @
a71829cd
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
// found in the LICENSE file.
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include <cstdlib>
#include "runner.h"
#include "runner.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
...
@@ -10,6 +11,10 @@
...
@@ -10,6 +11,10 @@
namespace
flutter_runner
{
namespace
flutter_runner
{
TEST
(
RunnerTest
,
TZData
)
{
TEST
(
RunnerTest
,
TZData
)
{
// TODO(fxbug.dev/69570): Move to cml file if env_vars gains supported for the
// gtest_runner.
setenv
(
"ICU_TIMEZONE_FILES_DIR"
,
"/pkg/data/tzdata"
,
true
);
UErrorCode
err
=
U_ZERO_ERROR
;
UErrorCode
err
=
U_ZERO_ERROR
;
const
auto
version_before
=
std
::
string
(
icu
::
TimeZone
::
getTZDataVersion
(
err
));
const
auto
version_before
=
std
::
string
(
icu
::
TimeZone
::
getTZDataVersion
(
err
));
ASSERT_EQ
(
U_ZERO_ERROR
,
err
)
<<
"unicode error: "
<<
u_errorName
(
err
);
ASSERT_EQ
(
U_ZERO_ERROR
,
err
)
<<
"unicode error: "
<<
u_errorName
(
err
);
...
...
testing/fuchsia/run_tests.sh
已删除
100755 → 0
浏览文件 @
28787927
#!/bin/bash
# Any modifications to this script may be applicable to
# https://github.com/flutter/flutter/blob/master/dev/bots/run_fuchsia_tests.sh
# This expects the device to be in zedboot mode, with a zedboot that is
# is compatible with the Fuchsia system image provided.
#
# The first and only parameter should be the path to the Fuchsia system image
# tarball, e.g. `./fuchsia-test.sh generic-x64.tgz`.
#
# This script expects `pm`, `device-finder`, and `fuchsia_ctl` to all be in the
# same directory as the script, as well as the `flutter_aot_runner-0.far` and
# the `flutter_runner_tests-0.far`. It is written to be run from its own
# directory, and will fail if run from other directories or via sym-links.
#
# This script also expects a private key available at:
# "/etc/botanist/keys/id_rsa_infra".
set
-Eex
test_timeout_seconds
=
300
# This is longer than the test timeout as dumping the
# logs can sometimes take longer.
ssh_timeout_seconds
=
360
# The nodes are named blah-blah--four-word-fuchsia-id
device_name
=
${
SWARMING_BOT_ID
#*--
}
# Bot key to pave and ssh the device.
pkey
=
"/etc/botanist/keys/id_rsa_infra"
if
[
-z
"
$device_name
"
]
then
echo
"No device found. Aborting."
exit
1
else
echo
"Connecting to device
$device_name
"
fi
# Wrapper function to pass common args to fuchsia_ctl.
fuchsia_ctl
()
{
./fuchsia_ctl
-d
$device_name
"
$@
"
}
reboot
()
{
# As we are not using recipes we don't have a way to know the location
# to upload the log to isolated. We are saving the log to a file to avoid dart
# hanging when running the process and then just using printing the content to
# the console.
kill
-9
$PID
cat
/tmp/log.txt
echo
"
$(
date
)
START:REBOOT ----------------------------------------"
# note: this will set an exit code of 255, which we can ignore.
fuchsia_ctl ssh
\
--identity-file
$pkey
\
-c
"dm reboot-recovery"
||
true
echo
"
$(
date
)
END:REBOOT ------------------------------------------"
}
trap
reboot EXIT
echo
"
$(
date
)
START:PAVING ------------------------------------------"
ssh-keygen
-y
-f
$pkey
>
key.pub
fuchsia_ctl pave
\
-i
$1
\
--public-key
"key.pub"
echo
"
$(
date
)
END:PAVING --------------------------------------------"
echo
"
$(
date
)
START:WAIT_DEVICE_READY -------------------------------"
for
i
in
{
1..10
}
;
do
fuchsia_ctl ssh
\
--identity-file
$pkey
\
-c
"echo up"
&&
break
||
sleep
15
;
done
rm
-rf
/tmp/log.txt
fuchsia_ctl ssh
--timeout-seconds
1800
--identity-file
$pkey
-c
"log_listener"
--log-file
/tmp/log.txt &
PID
=
$!
echo
"
$(
date
)
END:WAIT_DEVICE_READY ---------------------------------"
echo
"
$(
date
)
START:EXTRACT_PACKAGES -------------------------------"
mkdir
-p
packages
tar
-xvzf
$2
-C
packages 1> /dev/null
echo
"
$(
date
)
END:EXTRACT_PACKAGES ---------------------------------"
echo
"
$(
date
)
START:testing_tests -----------------------------------"
fuchsia_ctl
test
\
-f
testing_tests-0.far
\
-t
testing_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:testing_tests ------------------------------------"
# TODO(https://github.com/flutter/flutter/issues/61212): Re-enable ParagraphTest
# once it passes on Fuchsia.
echo
"
$(
date
)
START:txt_tests ---------------------------------------"
fuchsia_ctl
test
\
-f
txt_tests-0.far
\
-t
txt_tests
\
-a
"--gtest_filter=-ParagraphTest.*"
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:txt_tests ----------------------------------------"
# TODO(https://github.com/flutter/flutter/issues/57709): Re-enable FileTest
# once it passes on Fuchsia.
# TODO(https://github.com/flutter/flutter/issues/58211): Re-enable MessageLoop
# test once it passes on Fuchsia.
echo
"
$(
date
)
START:fml_tests ---------------------------------------"
fuchsia_ctl
test
\
-f
fml_tests-0.far
\
-t
fml_tests
\
-a
"--gtest_filter=-MessageLoop.TimeSensistiveTest_*:FileTest.CanTruncateAndWrite:FileTest.CreateDirectoryStructure"
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:fml_tests ----------------------------------------"
echo
"
$(
date
)
START:flow_tests --------------------------------------"
fuchsia_ctl
test
\
-f
flow_tests-0.far
\
-t
flow_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:flow_tests ---------------------------------------"
echo
"
$(
date
)
START:runtime_tests -----------------------------------"
fuchsia_ctl
test
\
-f
runtime_tests-0.far
\
-t
runtime_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:runtime_tests ------------------------------------"
echo
"
$(
date
)
START:ui_tests ----------------------------------------"
fuchsia_ctl
test
\
-f
ui_tests-0.far
\
-t
ui_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:ui_tests -----------------------------------------"
echo
"
$(
date
)
START:shell_tests -------------------------------------"
fuchsia_ctl
test
\
-f
shell_tests-0.far
\
-t
shell_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:shell_tests --------------------------------------"
echo
"
$(
date
)
START:embedder_tests -------------------------------------"
fuchsia_ctl
test
\
-f
embedder_tests-0.far
\
-t
embedder_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:embedder_tests --------------------------------------"
echo
"
$(
date
)
START:dart_utils_tests -------------------------------------"
fuchsia_ctl
test
\
-f
dart_utils_tests-0.far
\
-t
dart_utils_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:dart_utils_tests --------------------------------------"
# TODO(gw280): Enable tests using JIT runner
echo
"
$(
date
)
START:flutter_runner_tests ----------------------------"
fuchsia_ctl
test
\
-f
flutter_aot_runner-0.far
\
-f
flutter_runner_tests-0.far
\
-t
flutter_runner_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
# TODO(https://github.com/flutter/flutter/issues/61768): De-flake and re-enable
# fuchsia_ctl test \
# -f flutter_aot_runner-0.far \
# -f flutter_runner_scenic_tests-0.far \
# -t flutter_runner_scenic_tests \
# --identity-file $pkey \
# --timeout-seconds $test_timeout_seconds \
# --packages-directory packages
fuchsia_ctl
test
\
-f
flutter_aot_runner-0.far
\
-f
flutter_runner_tzdata_tests-0.far
\
-t
flutter_runner_tzdata_tests
\
--identity-file
$pkey
\
--timeout-seconds
$test_timeout_seconds
\
--packages-directory
packages
echo
"
$(
date
)
DONE:flutter_runner_tests -----------------------------"
testing/fuchsia/test_suites
0 → 100644
浏览文件 @
a71829cd
tools/fuchsia/compile_cml.py
浏览文件 @
a71829cd
...
@@ -14,13 +14,17 @@ import sys
...
@@ -14,13 +14,17 @@ import sys
def
main
():
def
main
():
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--cmc-bin'
,
dest
=
'cmc_bin'
,
action
=
'store'
,
required
=
True
)
parser
.
add_argument
(
'--cmc-bin'
,
dest
=
'cmc_bin'
,
action
=
'store'
,
required
=
True
)
parser
.
add_argument
(
parser
.
add_argument
(
'--output'
,
dest
=
'output'
,
action
=
'store'
,
required
=
True
)
'--output'
,
dest
=
'output'
,
action
=
'store'
,
required
=
True
)
parser
.
add_argument
(
parser
.
add_argument
(
'--manifest-file'
,
dest
=
'manifest_file'
,
action
=
'store'
,
required
=
True
)
'--manifest-file'
,
dest
=
'manifest_file'
,
action
=
'store'
,
required
=
True
)
parser
.
add_argument
(
parser
.
add_argument
(
'--includepath'
,
dest
=
'includepath'
,
action
=
'store'
,
required
=
True
'--includepath'
,
dest
=
'includepath'
,
action
=
'append'
,
required
=
True
,
)
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
...
@@ -28,16 +32,13 @@ def main():
...
@@ -28,16 +32,13 @@ def main():
assert
os
.
path
.
exists
(
args
.
cmc_bin
)
assert
os
.
path
.
exists
(
args
.
cmc_bin
)
assert
os
.
path
.
exists
(
args
.
manifest_file
)
assert
os
.
path
.
exists
(
args
.
manifest_file
)
print
(
args
.
includepath
)
subprocess
.
check_output
([
subprocess
.
check_output
([
args
.
cmc_bin
,
args
.
cmc_bin
,
'compile'
,
'compile'
,
'--output'
,
'--output'
,
args
.
output
,
args
.
output
,
args
.
manifest_file
,
args
.
manifest_file
,
'--includepath'
,
]
+
(
args
.
includepath
and
[
'--includepath'
]
+
args
.
includepath
))
args
.
includepath
,
])
return
0
return
0
...
...
tools/fuchsia/fuchsia_archive.gni
浏览文件 @
a71829cd
...
@@ -18,6 +18,9 @@ template("_compile_cml") {
...
@@ -18,6 +18,9 @@ template("_compile_cml") {
script = "//flutter/tools/fuchsia/compile_cml.py"
script = "//flutter/tools/fuchsia/compile_cml.py"
sources = [ invoker.manifest ]
sources = [ invoker.manifest ]
if (defined(invoker.cml_includes)) {
sources += invoker.cml_includes
}
inputs = [ "//fuchsia/sdk/$host_os/tools/cmc" ]
inputs = [ "//fuchsia/sdk/$host_os/tools/cmc" ]
...
@@ -30,6 +33,8 @@ template("_compile_cml") {
...
@@ -30,6 +33,8 @@ template("_compile_cml") {
rebase_path(invoker.output, root_build_dir),
rebase_path(invoker.output, root_build_dir),
"--includepath",
"--includepath",
get_path_info(invoker.manifest, "dir"),
get_path_info(invoker.manifest, "dir"),
"--includepath",
rebase_path("//"),
]
]
outputs = [ invoker.output ]
outputs = [ invoker.output ]
}
}
...
@@ -114,6 +119,8 @@ template("fuchsia_archive") {
...
@@ -114,6 +119,8 @@ template("fuchsia_archive") {
if (defined(invoker.cml_file)) {
if (defined(invoker.cml_file)) {
_compile_cml(target_name + "_compile_cml") {
_compile_cml(target_name + "_compile_cml") {
forward_variables_from(invoker, [ "cml_includes" ])
manifest = invoker.cml_file
manifest = invoker.cml_file
output = "$far_base_dir/meta/${pkg_target_name}.cm"
output = "$far_base_dir/meta/${pkg_target_name}.cm"
}
}
...
@@ -181,6 +188,18 @@ template("fuchsia_test_archive") {
...
@@ -181,6 +188,18 @@ template("fuchsia_test_archive") {
libraries += invoker.libraries
libraries += invoker.libraries
}
}
cmx_file = rebase_path("//flutter/testing/fuchsia/meta/fuchsia_test.cmx")
# TODO(fxbug.dev/79873): Only cfv2 components should be allowed after
# FakeScenic is available.
if (defined(invoker.cmx_file)) {
cmx_file = invoker.cmx_file
} else {
# TODO(fxbug.dev/79691): Default to cml after soft transition.
# cml_file =
# rebase_path("//flutter/testing/fuchsia/meta/fuchsia_test.cml")
# if (defined(invoker.cml_file)) {
# cml_file = invoker.cml_file
# }
cmx_file = rebase_path("//flutter/testing/fuchsia/meta/fuchsia_test.cmx")
}
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录