a7175938c3
context: the package_root logic is not portable to how we run this test outside the sdk in other build systems like bazel. To make it work in bazel, we currently use const.fromEnvironment to override the location of the package root. Due to upcoming changes to constant evaluation we can't continue using const.fromEnvironment. I considered 3 other options: * using Platform.environment * changing platform_root to be more sophisticated (e.g. look for a folder containing `test`, instead of looking for `pkg`) * directly defining the root at the beginning of main based on Platform.script The latter works out of the box in bazel and is also pretty simple, so I felt it was a good choice. Note: there are several other tests depending on package_root that we can update in a similar fashion. Today this is the only test that depends on package_root that we are running internally in bazel. Change-Id: Ie7b79a82c78605048b26b9676eac2fbd8b15aaa7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98879 Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>