Skip to content

Add support for running tests in multiple timezones #44928

Open
@natebosch

Description

@natebosch

We have at least one test that should be run in multiple timezones to get the full value:

void main() {
// The following code constructs a String with all timezones that are
// relevant for this test.
// This can be helpful for running tests in multiple timezones.
// Typically, one would write something like:
// for tz in <contents_of_string>; do TZ=$tz tools/test.py ...; done
var result = new StringBuffer();
for (int i = 0; i < daylightSavingChanges.length; i += 2) {
if (i != 0) result.write(" ");
result.write(daylightSavingChanges[i][0]);
}
runTests();
}

We are adding another test that needs to do extra work in order to determine interesting test cases for whatever timezone the test is running in. It would be better to have support for configuring the timezone in the test runner which would set the TZ environment variable for the subprocess. With that support we could hardcode the interesting test cases for one or more timezones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions