pjdfstest学习

pjdfstest是什么?

使用perl的标准模块TAP::Harness进行脚本测试统计。

TAP::Harness-使用统计数据运行测试脚本。
这是一个简单的测试线束,它允许测试运行,结果自动汇总并输出到STDOUT。

执行的时候,使用prove,实际上prove就是一个perl脚本。

#!/usr/bin/perl -w

eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
if 0; # not running under some shell

use strict;
use App::Prove;

my $app = App::Prove->new;
$app->process_args(@ARGV);
exit( $app->run ? 0 : 1 );

__END__

=head1 NAME

prove - Run tests through a TAP harness.

=head1 USAGE

prove [options] [files or directories]

=head1 OPTIONS

Boolean options:

-v, --verbose Print all test lines.
-l, --lib Add 'lib' to the path for your tests (-Ilib).
-b, --blib Add 'blib/lib' and 'blib/arch' to the path for
your tests......

man一下prove,如下:

 

PROVE(1) User Contributed Perl Documentation PROVE(1)

NAME
prove - Run tests through a TAP harness.

USAGE
prove [options] [files or directories]

OPTIONS
Boolean options:

-v, --verbose Print all test lines.
-l, --lib Add 'lib' to the path for your tests (-Ilib).
-b, --blib Add 'blib/lib' and 'blib/arch' to the path for
your tests
-s, --shuffle Run the tests in random order.
-c, --color Colored test output (default).
--nocolor Do not color test output.
--count Show the X/Y test count when not verbose
(default)
--nocount Disable the X/Y test count.
-D --dry Dry run. Show test that would have run.
-f, --failures Show failed tests.
-o, --comments Show comments.
--ignore-exit Ignore exit status from test scripts.
-m, --merge Merge test scripts' STDERR with their STDOUT.
-r, --recurse Recursively descend into directories.
--reverse Run the tests in reverse order.
-q, --quiet Suppress some test output while running tests.
-Q, --QUIET Only print summary results.
-p, --parse Show full list of TAP parse errors, if any.
--directives Only show results with TODO or SKIP directives.
--timer Print elapsed time after each test.
--trap Trap Ctrl-C and print summary on interrupt.
--normalize Normalize TAP output in verbose output
-T Enable tainting checks.
-t Enable tainting warnings.
-W Enable fatal warnings.
-w Enable warnings.
-h, --help Display this help
-?, Display this help
-H, --man Longer manpage for prove
--norc Don't process default .proverc

从源代码的README看介绍:

============
Introduction
============

pjdfstest is a test suite that helps exercise POSIX system calls.

pjdfstest supports the following operating systems/filesystems:

- Supported Operating Systems: FreeBSD, Linux, Solaris
- Supported Filesystems: ext4, UFS, ZFS

 它就是一个POSIX系统接口的测试套。

什么叫POSIX接口?

参考这个:https://pubs.opengroup.org/onlinepubs/9699919799/functions/contents.html

 

从github.com看代码。

GitHub - pjd/pjdfstest: File system test suite.

最近的一次更新是八个月以前。

posted @   文小海  阅读(477)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
点击右上角即可分享
微信分享提示