Files
sdk/pkg/reload_test/README.md
Srujan Gaddam 8aa6b413eb [ddc] Update hot reload test suite to use recompile-restart
A new optional suffix to the file names is added: '.restart'.
This allows us to differentiate between hot reload generations
and hot restart generations. All files with the same generation
should either have the suffix or don't. If present, uses the
recompile-request instruction in the frontend server. If not,
uses the recompile instruction. Tests are renamed and a WIP
README is added to document this change.

Change-Id: I2691c5ec0b7336115a76dc0e0369213e74b6ea21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406183
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2025-02-05 14:51:21 -08:00

886 B

Testing Framework for Hot Reload/Restart Tests for DDC

This package contains utilities to test multiple generations of files in order to validate hot reload and hot restart.

Test File Conventions

  • Different generations of files have a generation number after the file name e.g. file_name.1.dart is the generation 1-version of the file.
  • If a generation file is intended to be rejected, it should contain .reject in the file name. The config.json file should contain a key "expectedErrors" with its value being a map of generation number string to the error string.
  • If a generation does a hot restart instead of a reload, it should contain .restart in every file name in the same generation.
  • It is an error to specify both .reject and .restart.