Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
15269e56
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
15269e56
编写于
8月 19, 2016
作者:
E
Emilia Kasper
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add more details on how to add a new SSL test
Reviewed-by:
N
Stephen Henson
<
steve@openssl.org
>
上级
45dcb5cf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
44 addition
and
19 deletion
+44
-19
test/README.ssltest.md
test/README.ssltest.md
+39
-18
test/recipes/80-test_ssl_new.t
test/recipes/80-test_ssl_new.t
+5
-1
未找到文件。
test/README.ssltest.md
浏览文件 @
15269e56
...
@@ -10,23 +10,7 @@ harness generates the output files on the fly.
...
@@ -10,23 +10,7 @@ harness generates the output files on the fly.
However, for verification, we also include checked-in configuration outputs
However, for verification, we also include checked-in configuration outputs
corresponding to the default configuration. These testcases live in
corresponding to the default configuration. These testcases live in
`test/ssl-tests/*.conf`
files. Therefore, whenever you're adding or updating a
`test/ssl-tests/*.conf`
files.
generated test, you should run
```
$ ./config
$ cd test
$ TOP=.. perl -I testlib/ generate_ssl_tests.pl ssl-tests/my.conf.in \
> ssl-tests/my.conf
```
where
`my.conf.in`
is your test input file.
For example, to generate the test cases in
`ssl-tests/01-simple.conf.in`
, do
```
$ TOP=.. perl generate_ssl_tests.pl ssl-tests/01-simple.conf.in > ssl-tests/01-simple.conf
```
For more details, see
`ssl-tests/01-simple.conf.in`
for an example.
For more details, see
`ssl-tests/01-simple.conf.in`
for an example.
...
@@ -206,7 +190,44 @@ client => {
...
@@ -206,7 +190,44 @@ client => {
## Adding a test to the test harness
## Adding a test to the test harness
Add your configuration file to
`test/recipes/80-test_ssl_new.t`
.
1.
Add a new test configuration to
`test/ssl-tests`
, following the examples of
existing
`*.conf.in`
files (for example,
`01-simple.conf.in`
).
2.
Generate the generated
`*.conf`
test input file. You can do so by running
`generate_ssl_tests.pl`
:
```
$ ./config
$ cd test
$ TOP=.. perl -I testlib/ generate_ssl_tests.pl ssl-tests/my.conf.in \
> ssl-tests/my.conf
```
where
`my.conf.in`
is your test input file.
For example, to generate the test cases in
`ssl-tests/01-simple.conf.in`
, do
```
$ TOP=.. perl -I testlib/ generate_ssl_tests.pl ssl-tests/01-simple.conf.in > ssl-tests/01-simple.conf
```
Alternatively (hackish but simple), you can comment out
```
unlink glob $tmp_file;
```
in
`test/recipes/80-test_ssl_new.t`
and run
```
$ make TESTS=test_ssl_new test
```
This will save the generated output in a
`*.tmp`
file in the build directory.
3.
Update the number of tests planned in
`test/recipes/80-test_ssl_new.t`
. If
the test suite has any skip conditions, update those too (see
`test/recipes/80-test_ssl_new.t`
for details).
## Running the tests with the test harness
## Running the tests with the test harness
...
...
test/recipes/80-test_ssl_new.t
浏览文件 @
15269e56
...
@@ -44,6 +44,8 @@ my $no_npn = disabled("nextprotoneg");
...
@@ -44,6 +44,8 @@ my $no_npn = disabled("nextprotoneg");
my
$no_ct
=
disabled
("
ct
");
my
$no_ct
=
disabled
("
ct
");
my
$no_ec
=
disabled
("
ec
");
my
$no_ec
=
disabled
("
ec
");
# Add your test here if the test conf.in generates test cases and/or
# expectations dynamically based on the OpenSSL compile-time config.
my
%conf_dependent_tests
=
(
my
%conf_dependent_tests
=
(
"
02-protocol-version.conf
"
=>
!
$is_default_tls
,
"
02-protocol-version.conf
"
=>
!
$is_default_tls
,
"
04-client_auth.conf
"
=>
!
$is_default_tls
,
"
04-client_auth.conf
"
=>
!
$is_default_tls
,
...
@@ -52,7 +54,9 @@ my %conf_dependent_tests = (
...
@@ -52,7 +54,9 @@ my %conf_dependent_tests = (
"
11-dtls_resumption.conf
"
=>
!
$is_default_dtls
,
"
11-dtls_resumption.conf
"
=>
!
$is_default_dtls
,
);
);
# Default is $no_tls but some tests have different skip conditions.
# Add your test here if it should be skipped for some compile-time
# configurations. Default is $no_tls but some tests have different skip
# conditions.
my
%skip
=
(
my
%skip
=
(
"
07-dtls-protocol-version.conf
"
=>
$no_dtls
,
"
07-dtls-protocol-version.conf
"
=>
$no_dtls
,
"
08-npn.conf
"
=>
$no_tls
||
$no_npn
,
"
08-npn.conf
"
=>
$no_tls
||
$no_npn
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录