Skip to content

Commit

Permalink
Better document run_test.r (#5479)
Browse files Browse the repository at this point in the history
* Better document run_test.r

* Add news bullet for #5479

* Update news/5479-better-document-run_test.r

---------

Co-authored-by: Bianca Henderson <bhenderson@anaconda.com>
Co-authored-by: Bianca Henderson <beeankha@gmail.com>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent 655e5bc commit f76aa2d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions conda_build/skeletons/cran.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
- $R -e "library('{cran_packagename}')" # [not win]
- "\\"%R%\\" -e \\"library('{cran_packagename}')\\"" # [win]
# You can also put a file called run_test.py, run_test.sh, or run_test.bat
# in the recipe that will be run at test time.
# You can also put a file called run_test.r, run_test.py, run_test.sh,
# or run_test.bat in the recipe that will be run at test time.
# requires:
# Put any additional test requirements here.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/concepts/recipe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ is a flat directory that contains the following files:
* ``bld.bat`` — The build script that installs the files for the
package on Windows. It is executed using ``cmd``.

* ``run_test.[py,pl,sh,bat]`` — An optional Python test file, a
* ``run_test.[py,pl,sh,bat,r]`` — An optional Python test file, a
test script that runs automatically if it is part of the recipe.

* Optional patches that are applied to the source.
Expand Down
12 changes: 6 additions & 6 deletions docs/source/resources/define-metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ Test section
============

If this section exists or if there is a
``run_test.[py,pl,sh,bat]`` file in the recipe, the package is
``run_test.[py,pl,sh,bat,r]`` file in the recipe, the package is
installed into a test environment after the build is finished
and the tests are run there.

Expand Down Expand Up @@ -1212,12 +1212,12 @@ following:
Run test script
---------------

The script ``run_test.sh``---or ``.bat``, ``.py``, or
``.pl``---is run automatically if it is part of the recipe.
The script ``run_test.sh``---or ``.bat``, ``.py``, ``.pl``,
or ``.r``---is run automatically if it is part of the recipe.

.. note::
Python .py and Perl .pl scripts are valid only
as part of Python and Perl packages, respectively.
Python .py, Perl .pl, and R .r scripts are valid only
as part of Python, Perl, and R packages, respectively.


Downstream tests
Expand Down Expand Up @@ -1491,7 +1491,7 @@ You can test subpackages independently of the top-level package.
Independent test script files for each separate package are
specified under the subpackage's test section. These files
support the same formats as the top-level ``run_test.*`` scripts,
which are .py, .pl, .bat, and .sh. These may be extended to
which are .py, .pl, .r, .bat, and .sh. These may be extended to
support other script types in the future.

.. code-block:: yaml
Expand Down
19 changes: 19 additions & 0 deletions news/5479-better-document-run_test.r
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* <news item>

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* Better document `run_test.r`. (#5479)

### Other

* <news item>

0 comments on commit f76aa2d

Please sign in to comment.