Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: test/build/handles_long_paths_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Dart2js can take a long time to compile dart code, so we increase the timeout
6 // to cope with that.
7 @Timeout.factor(3)
8
5 import 'package:scheduled_test/scheduled_test.dart'; 9 import 'package:scheduled_test/scheduled_test.dart';
6 10
7 import 'package:path/path.dart' as path; 11 import 'package:path/path.dart' as path;
8 12
9 import '../descriptor.dart' as d; 13 import '../descriptor.dart' as d;
10 import '../test_pub.dart'; 14 import '../test_pub.dart';
11 15
12 main() { 16 main() {
13 initConfig();
14
15 // This is a regression test for dartbug.com/14442. 17 // This is a regression test for dartbug.com/14442.
16 // 18 //
17 // If you have a long chain of path dependencies with long relative paths, 19 // If you have a long chain of path dependencies with long relative paths,
18 // you can end up with a combined path that is longer than the OS can handle. 20 // you can end up with a combined path that is longer than the OS can handle.
19 // For example, the path that revealed this bug was: 21 // For example, the path that revealed this bug was:
20 // 22 //
21 // C:\jenkins-slave\workspace\mSEE-Dev\ozone\dart\portfolio-manager\src\main\ 23 // C:\jenkins-slave\workspace\mSEE-Dev\ozone\dart\portfolio-manager\src\main\
22 // portfolio-manager\..\..\..\..\portfolio-common\src\main\portfolio-common\ 24 // portfolio-manager\..\..\..\..\portfolio-common\src\main\portfolio-common\
23 // ../../../../dart-visualization/src/main/dart-visualization\lib\src\vega\ 25 // ../../../../dart-visualization/src/main/dart-visualization\lib\src\vega\
24 // data\transform\visual 26 // data\transform\visual
25 // 27 //
26 // This test ensures that we're normalizing at some point before we throw the 28 // This test ensures that we're normalizing at some point before we throw the
27 // path at the OS to choke on. 29 // path at the OS to choke on.
28 30
29 integration("handles long relative paths", () { 31 integration("handles long relative paths", () {
30 // Dart2js can take a long time to compile dart code, so we increase the
31 // timeout to cope with that.
32 currentSchedule.timeout *= 3;
33
34 d.dir("some_long_dependency_name", [ 32 d.dir("some_long_dependency_name", [
35 d.libPubspec("foo", "0.0.1"), 33 d.libPubspec("foo", "0.0.1"),
36 d.dir("lib", [ 34 d.dir("lib", [
37 d.file("foo.txt", "foo") 35 d.file("foo.txt", "foo")
38 ]) 36 ])
39 ]).create(); 37 ]).create();
40 38
41 // Build a 2,800 character (non-canonicalized) path. 39 // Build a 2,800 character (non-canonicalized) path.
42 var longPath = ""; 40 var longPath = "";
43 for (var i = 0; i < 100; i++) 41 for (var i = 0; i < 100; i++)
(...skipping 20 matching lines...) Expand all
64 d.dir('packages', [ 62 d.dir('packages', [
65 d.dir('foo', [ 63 d.dir('foo', [
66 d.file('foo.txt', 'foo') 64 d.file('foo.txt', 'foo')
67 ]) 65 ])
68 ]) 66 ])
69 ]) 67 ])
70 ]) 68 ])
71 ]).validate(); 69 ]).validate();
72 }); 70 });
73 } 71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698