テストの1つが失敗しているので、gitbisectを使用して追跡したいと思います。
そのためには、devtools::test
プロセスの終了コードがすべてのテストに合格したかどうかを示すように、コマンドラインから実行する必要があります。
それ、どうやったら出来るの?
コマンドラインでの標準のパッケージビルドワークフローは、を使用してパッケージtarballを作成し、を使用R CMD build
してチェックすることR CMD check
です。devtoolsは、system()
呼び出しを使用してこのワークフローを実行するだけです。これはあなたにとってどのように見えるでしょうか:
R CMD build dirname
R CMD check pkgname_version.tar.gz
これにより、すべてのチェックが成功したかどうかに応じて、適切なステータスコードが表示されます。テストをチェックしたいだけの場合(他のパッケージ機能はチェックしたくない場合)、R CMD check
オプションを検討する必要があります。これらを使用すると、ドキュメントの例、ビネット、ドキュメントのPDFの作成など、他の特定のチェック(の一部)をオフにすることができます。
これらのオプション(R2.3.3の場合)の現在のリストは次のとおりです。
> R CMD check --help
Check R packages from package sources, which can be directories or
package 'tar' archives with extension '.tar.gz', '.tar.bz2',
'.tar.xz' or '.tgz'.
A variety of diagnostic checks on directory structure, index and
control files are performed. The package is installed into the log
directory and production of the package PDF manual is tested.
All examples and tests provided by the package are tested to see if
they run successfully. By default code in the vignettes is tested,
as is re-building the vignette PDFs.
Options:
-h, --help print short help message and exit
-v, --version print version info and exit
-l, --library=LIB library directory used for test installation
of packages (default is outdir)
-o, --output=DIR directory for output, default is current directory.
Logfiles, R output, etc. will be placed in 'pkg.Rcheck'
in this directory, where 'pkg' is the name of the
checked package
--no-clean do not clean 'outdir' before using it
--no-codoc do not check for code/documentation mismatches
--no-examples do not run the examples in the Rd files
--no-install skip installation and associated tests
--no-tests do not run code in 'tests' subdirectory
--no-manual do not produce the PDF manual
--no-vignettes do not run R code in vignettes nor build outputs
--no-build-vignettes do not build vignette outputs
--run-dontrun do run \dontrun sections in the Rd files
--run-donttest do run \donttest sections in the Rd files
--use-gct use 'gctorture(TRUE)' when running examples/tests
--use-valgrind use 'valgrind' when running examples/tests/vignettes
--timings record timings for examples
--install-args= command-line args to be passed to INSTALL
--test-dir= look in this subdirectory for test scripts (default tests)
--check-subdirs=default|yes|no
run checks on the package subdirectories
(default is yes for a tarball, no otherwise)
--as-cran select customizations similar to those used
for CRAN incoming checking
The following options apply where sub-architectures are in use:
--extra-arch do only runtime tests needed for an additional
sub-architecture.
--multiarch do runtime tests on all installed sub-archs
--no-multiarch do runtime tests only on the main sub-architecture
--force-multiarch run tests on all sub-archs even for packages
with no compiled code
By default, all test sections are turned on.
Report bugs at bugs.r-project.org .
注:の場合R CMD check
、パッケージのバージョン番号を手動で指定する必要があります(Version
パッケージDESCRIPTION
ファイルのの値に基づきます)。ディレクトリに作成されているパッケージtarballが1つしかない場合は、ワイルドカードを使用して再利用可能なワークフローを作成できます。
R CMD build dirname
R CMD check pkgname*.tar.gz
パッケージをCRANに発送することを計画している--as-cran
場合は、いくつかの追加チェックを実行するオプションを使用してチェックも実行する必要があることも覚えておいてください。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加