@@ -28,8 +28,9 @@ usage: tools/test [OPTION]... [SUITE]...
2828
2929Run our tests.
3030
31- By default, run all suites, but only on files changed in this branch
32- as found by \` tools/git changed-files \$ (tools/git base)\` .
31+ By default, run all suites except any noted under "Suites:" below, but only
32+ on files changed in this branch as found by
33+ \` tools/git changed-files \$ (tools/git base)\` .
3334
3435What tests to run:
3536 --all-files
@@ -48,8 +49,9 @@ What tests to run:
4849 run Jest tests on only one platform (iOS). This is
4950 usually fine, because the vast majority of our Jest
5051 tests don't depend meaningfully on the platform.
51- --all In the given suites, run all tests on all files. Same as
52- --all-files --platform both.
52+ --all In the given suites, run all tests on all files, equivalently
53+ to \` --all-files --platform both\` . If no list of suites was
54+ specified, run all suites.
5355
5456Extra things to do:
5557 --coverage Collect test-coverage information. Only meaningful
6870 exit 2
6971}
7072
73+ # The complete list of suites.
74+ all_suites=(native flow lint jest prettier deps tsflower)
75+
7176opt_coverage=
7277opt_files=branch
7378opt_platform=sloppy
7479opt_fix=
80+
81+ # The suites to run if none are given as arguments. Unless --all is
82+ # specified, this doesn't have to be the complete list; just be sure to
83+ # document in the usage message when a suite gets skipped.
84+ opt_default_suites=(native flow lint jest prettier deps tsflower)
85+
7586opt_suites=()
7687while (( $# )) ; do
7788 case " $1 " in
@@ -86,7 +97,7 @@ while (( $# )); do
8697 esac
8798 shift
8899 ;;
89- --all) opt_files=all; opt_platform=both; shift ;;
100+ --all) opt_files=all; opt_platform=both; opt_default_suites=( " ${all_suites[@]} " ) ; shift ;;
90101 --fix) opt_fix=1; shift ;;
91102 native|flow|lint|jest|prettier|deps|tsflower)
92103 opt_suites+=(" $1 " ); shift ;;
@@ -95,9 +106,7 @@ while (( $# )); do
95106done
96107
97108if [ -z " $opt_suites " ]; then
98- # This default doesn't have to be the complete list; just be sure to
99- # document in the usage message any suites that it skips.
100- opt_suites=(native flow lint jest prettier deps tsflower)
109+ opt_suites=( " ${opt_default_suites[@]} " )
101110fi
102111
103112files_base_commit=
0 commit comments