Add sample directories to the package config.

This allows the package imports in the tests to resolve.

Change-Id: Idadca8b55516a5b5d1511ebc38c298479aa8eda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333662
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
Jake Macdonald
2023-11-02 21:00:41 +00:00
committed by Commit Queue
parent a18a24c16c
commit 1405695675
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name: http
name: http_sample
version: 0.0.1
publish_to: none
+1 -1
View File
@@ -6,7 +6,7 @@ import 'dart:async';
import 'package:test/test.dart';
import 'package:http/http.dart';
import 'package:http_sample/http.dart';
Future<void> main() async {
test('httpGet', () async {
+5 -1
View File
@@ -57,13 +57,16 @@ void main(List<String> args) {
platform('pkg/vm/testcases'),
];
var sampleDirs = listSubdirectories(platform('samples')).toList();
// Validate that all the given directories exist.
var hasMissingDirectories = false;
for (var path in [
...packageDirs,
...cfePackageDirs,
...feAnalyzerSharedPackageDirs,
...pkgVmPackageDirs
...pkgVmPackageDirs,
...sampleDirs,
]) {
if (!Directory(join(repoRoot, path)).existsSync()) {
stderr.writeln("Unable to locate directory: '$path'.");
@@ -81,6 +84,7 @@ void main(List<String> args) {
...makeFeAnalyzerSharedPackageConfigs(feAnalyzerSharedPackageDirs),
...makeFrontendServerPackageConfigs(frontendServerPackageDirs),
...makePkgVmPackageConfigs(pkgVmPackageDirs),
...makePackageConfigs(sampleDirs),
];
packages.sort((a, b) => a.name.compareTo(b.name));