Skip to content

Commit f73542b

Browse files
authored
Document test.windows= et al. (#12)
1 parent e65d807 commit f73542b

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ these tests to fail, you have the following options:
9191
people responsible for the breaking test(s) (see the relevant .test
9292
files), help them fix their code, and update this repository to use
9393
the new version of their tests, in addition to the steps described
94-
on the wiki.
94+
on the wiki. You will also need to land your change in two parts,
95+
so that people have time to migrate (a "soft-breaking" change).
9596

9697
3. Remove the test in question. This is by far the least ideal
9798
solution. To go down this path, we must first establish that one of

registry/template.test

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,31 @@ update=.
9696
# shell script from that same directory, and the "extra_tests.dart"
9797
# program in the "dev" directory, run via "dart".
9898
#
99-
# These commands must work identically on Windows, macOS, and Linux.
100-
# This generally means you want to limit yourself to simple commands
101-
# like `flutter test`. For anything more elaborate, consider creating
102-
# a "tests" shell script to run on macOS and Linux and a "tests.bat"
103-
# batch file to run on Windows (referencing it without the extension
104-
# here should mean that in runs the shell script on Unix systems and
105-
# the batch file on Windows, because of how Windows looks up
106-
# commands). On Windows, these commands are executed via `CMD.EXE /S
107-
# /C "command..."`.
99+
# Commands specified using "test=" must work identically on Windows,
100+
# macOS, and Linux. This generally means you want to limit yourself to
101+
# simple commands like `flutter test`. For anything more elaborate,
102+
# consider creating a "tests" shell script to run on macOS and Linux
103+
# and a "tests.bat" batch file to run on Windows (referencing it
104+
# without the extension here should mean that in runs the shell script
105+
# on Unix systems and the batch file on Windows, because of how
106+
# Windows looks up commands). On Windows, these commands are executed
107+
# via `CMD.EXE /S /C "command..."`.
108+
#
109+
# Alternatively, you can use a platform-specific test line:
110+
# test.windows= to run a command on Windows only.
111+
# test.macos= to run a command on MacOS only.
112+
# test.linux= to run a command on Linux only.
113+
# test.posix= to run a command on MacOS and Linux only.
114+
#
115+
# There must be sufficient test lines specified such that tests are
116+
# available on each of Windows, MacOS, and Linux. In the example
117+
# below, we run mytest.bat on Windows and mytest.sh on MacOS and Linux
118+
# (in both cases, from the "scripts" directory).
108119
test=flutter test
109120
test=more_tests
110121
test=dart dev/extra_tests.dart
122+
test.windows=scripts\mytest.bat
123+
test.posix=scripts/mytest.sh
111124

112125
# To test your tests, check out the flutter/flutter repository and
113126
# then, from the root of that repository, run:

0 commit comments

Comments
 (0)