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

Issue 1290623002: Add tests for simple packages scenarios (Closed)

Created:
5 years, 4 months ago by Harry Terkelsen
Modified:
5 years, 4 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : add .gitignored files #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -81 lines) Patch
A tests/standalone/package/scenarios/both_dir_and_file/.packages View 1 1 chunk +1 line, -0 lines 0 comments Download
A + tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
A + tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/standalone/package/scenarios/both_dir_and_file/packages/foo/foo.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart View 1 2 3 4 1 chunk +7 lines, -11 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_dir_only/packages/foo/foo.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_noimports_test.dart View 1 chunk +3 lines, -3 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_dir_only/packages_dir_only_test.dart View 1 2 3 4 1 chunk +7 lines, -10 lines 0 comments Download
A tests/standalone/package/scenarios/packages_file_in_parent/.packages View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart View 1 2 3 4 1 chunk +6 lines, -10 lines 0 comments Download
A tests/standalone/package/scenarios/packages_file_only/.packages View 1 1 chunk +1 line, -0 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_only/foo/foo.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart View 1 chunk +4 lines, -4 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart View 1 2 3 4 1 chunk +6 lines, -10 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart View 1 2 3 1 chunk +5 lines, -3 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart View 1 2 3 4 1 chunk +7 lines, -10 lines 0 comments Download
A tests/standalone/package/scenarios/packages_option_only/sub/.packages View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A + tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M tests/standalone/standalone.status View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 2 3 8 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
Harry Terkelsen
I added tests for a few of the scenarios we discussed, let me know if ...
5 years, 4 months ago (2015-08-12 00:34:36 UTC) #2
sethladd
+ Brian, DanR for dartanalyzer
5 years, 4 months ago (2015-08-12 01:13:16 UTC) #4
Ivan Posva
I really like the way how the different scenarios are isolated from each other in ...
5 years, 4 months ago (2015-08-12 05:59:55 UTC) #5
Harry Terkelsen
Added a few more scenarios. This covers almost all scenarios that we have outlined. The ...
5 years, 4 months ago (2015-08-12 23:42:44 UTC) #6
Harry Terkelsen
This is ready to go if someone can lgtm
5 years, 4 months ago (2015-08-17 23:40:42 UTC) #7
Ivan Posva
Otherwise LGTM. -Ivan https://codereview.chromium.org/1290623002/diff/60001/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart File tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart (right): https://codereview.chromium.org/1290623002/diff/60001/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart#newcode7 tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart:7: library prefers_packages_file_test; This scenario appears to ...
5 years, 4 months ago (2015-08-17 23:48:00 UTC) #8
pquitslund
lgtm
5 years, 4 months ago (2015-08-18 00:06:08 UTC) #9
Harry Terkelsen
Committed patchset #5 (id:80001) manually as f65c675c16be47138f2933fb94dba5ee5b4b437b (presubmit successful).
5 years, 4 months ago (2015-08-18 00:13:24 UTC) #10
Harry Terkelsen
I had to disable the 'discovery' tests for the analyzer. The analyzer passes the test ...
5 years, 4 months ago (2015-08-18 00:14:22 UTC) #11
pquitslund
On 2015/08/18 00:14:22, Harry Terkelsen wrote: > I had to disable the 'discovery' tests for ...
5 years, 4 months ago (2015-08-18 16:12:50 UTC) #12
Harry Terkelsen
On 2015/08/18 16:12:50, pquitslund wrote: > On 2015/08/18 00:14:22, Harry Terkelsen wrote: > > I ...
5 years, 4 months ago (2015-08-18 17:17:41 UTC) #13
Ivan Posva
5 years, 4 months ago (2015-08-18 17:52:08 UTC) #14
Message was sent while issue was closed.
On 2015/08/18 17:17:41, Harry Terkelsen wrote:
> On 2015/08/18 16:12:50, pquitslund wrote:
> > On 2015/08/18 00:14:22, Harry Terkelsen wrote:
> > > I had to disable the 'discovery' tests for the analyzer. The analyzer
passes
> > the
> > > test when the --packages option is provided.
> > > 
> > 
> > And this is because the CWD is wrong for discovery I'm guessing?  What is
the
> > CWD when run on the bots?
> 
> Talking with Paul Berry last week, he said that the analyzer does not discover
> the .packages file relative to the Dart source currently being analyzed, which
> is the cause of the test failures. One option we were discussing was to start
a
> new dartanalyzer instance with CWD as the test directory when
'PackageRoot=None'
> is seen in the test.
> I'm not 100% sure what the CWD is when run on the bots, but I believe it is
the
> root of the repository.

The spec says that you need to find the .packages file relative to the main
script and it is independent of the current working directory. It would actually
be wrong to go looking in the CWD for the .packages file. In short the .packages
file needs to be found the same way a package/ directory is, starting next to
the main script.

Not having the CWD be where the main script is located is actually a feature of
the bots.

-Ivan

Powered by Google App Engine
This is Rietveld 408576698