getCommandsToRun method

Iterable<CommandToRun> getCommandsToRun(
  1. Iterable<PackageToTest> packagesToTest, {
  2. required List<String> flutterArgs,
  3. required List<String> dartArgs,
})

Implementation

Iterable<CommandToRun> getCommandsToRun(
  Iterable<PackageToTest> packagesToTest, {
  required List<String> flutterArgs,
  required List<String> dartArgs,
}) sync* {
  for (final packageToTest in packagesToTest) {
    yield createTestCommand(
      projectRoot: packageToTest.packagePath,
      relativeProjectRoot:
          packageRootFor(path.relative(packageToTest.packagePath)),
      flutterArgs: flutterArgs,
      tool: packageToTest.tool,
      dartArgs: dartArgs,
      tests: [
        if (packageToTest.optimizedPath case final test?
            when packageToTest.tool.isDart)
          path.relative(
            test,
            from: packageToTest.packagePath,
          ),
      ],
    );
  }
}