Allow substrings for TEST_ONLY in make (#6079)
This allows TEST_ONLY to match substrings of the package directory name instead of having to use the full package directory name.
This commit is contained in:
parent
370559c62f
commit
3a55e1326c
@ -114,6 +114,13 @@ To run tests for a specific package in [packages](https://github.com/babel/babel
|
|||||||
$ TEST_ONLY=babel-cli make test
|
$ TEST_ONLY=babel-cli make test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`TEST_ONLY` will also match substrings of the package name:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Run tests for the babel-plugin-transform-es2015-classes package.
|
||||||
|
$ TEST_ONLY=es2015-class make test
|
||||||
|
```
|
||||||
|
|
||||||
Use the `TEST_GREP` variable to run a subset of tests by name:
|
Use the `TEST_GREP` variable to run a subset of tests by name:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -e
|
|||||||
TEST_DIRS=""
|
TEST_DIRS=""
|
||||||
|
|
||||||
for f in packages/*; do
|
for f in packages/*; do
|
||||||
if [ -n "$TEST_ONLY" ] && [ `basename $f` != "$TEST_ONLY" ]; then
|
if [ -n "$TEST_ONLY" ] && [[ `basename $f` != *"$TEST_ONLY"* ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user