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:
committed by
Commit Queue
parent
a18a24c16c
commit
1405695675
@@ -1,4 +1,4 @@
|
||||
name: http
|
||||
name: http_sample
|
||||
version: 0.0.1
|
||||
publish_to: none
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user