Skip to content

Commit

Permalink
tools/test: Rename --full to --all-files.
Browse files Browse the repository at this point in the history
This doesn't control which suites are run; it controls which files
are tested. So, give it a name that makes more explicit what it does
and doesn't do. As Greg suggests:
  zulip#4700 (comment).
  • Loading branch information
chrisbobbe committed Apr 28, 2021
1 parent fc4b3bf commit 4299827
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: bahmutov/npm-install@v1

- name: Run tools/test
run: TERM=dumb tools/test --full
run: TERM=dumb tools/test --all-files

- run: tools/verify-webview-js

Expand Down
2 changes: 1 addition & 1 deletion docs/howto/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ simple terminology for the process we follow with both.
our translation contributors. See
[howto/translations.md](translations.md) for background.

* Check that tests pass: `tools/test --full`.
* Check that tests pass: `tools/test --all-files`.

* Run `tools/bump-version` to update the version number in the
Android and iOS build metadata.
Expand Down
2 changes: 1 addition & 1 deletion docs/howto/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Run `tools/test` to run all our test suites. This command is
typically quite fast (5-10s, sometimes less), because it only rechecks
tests related to the files you've changed.

You can run all our tests with `tools/test --full`.
You can run all our tests with `tools/test --all-files`.

To see all options, run `tools/test --help`.

Expand Down
15 changes: 8 additions & 7 deletions tools/test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

usage() {
cat >&2 <<EOF
usage: tools/test [--full | --diff COMMIT] [SUITES]
usage: tools/test [--all-files | --diff COMMIT] [SUITES]
Run our tests.
Expand All @@ -14,9 +14,10 @@ as found by \`tools/info changed-files\`.
Options:
--coverage Collect test-coverage information. Only meaningful
with --full.
with --all-files.
--fix Fix issues found, where possible.
--full Run on all files, not only changed files.
--all-files
Run on all files, not only changed files.
--diff COMMIT
Run only on files that differ from the given commit.
(E.g., \`--diff @\` for files with uncommitted changes;
Expand Down Expand Up @@ -44,7 +45,7 @@ while (( $# )); do
case "$1" in
--coverage) coverage=1; shift;;
--diff) shift; files=diff:"$1"; shift;;
--full) files=full; shift;;
--all-files) files=all; shift;;
--fix) fix=1; shift;;
native|flow|lint|jest|prettier|deps)
suites+=("$1"); shift;;
Expand All @@ -70,7 +71,7 @@ PATH=node_modules/.bin:"$PATH"
# directories meaning their whole subtrees.
files_js() {
case "$files" in
full)
all)
echo src/
;;
branch)
Expand All @@ -87,7 +88,7 @@ files_js() {
# True just if $files intersects the given set of paths.
files_check() {
case "$files" in
full)
all)
;;
branch)
! git diff --quiet "$(tools/info base-commit)" "$@"
Expand Down Expand Up @@ -146,7 +147,7 @@ run_jest() {
# Unlike some others, this inspects "$files" for itself.
jest_args=()
case "$files" in
full)
all)
if [ -n "$coverage" ]; then
jest_args+=( --coverage )
fi
Expand Down

0 comments on commit 4299827

Please sign in to comment.