Ran
|
Jobs
7
|
Files
0
|
Run time
–
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
[engine] Raise exception when command line spec is an invalid dir To get Addresses for DescendantAddresses, we create a PathGlobs that matches all directories corresponding to the DescendantAddresses. But it is not currently an error for PathGlobs to not match anything. This change does 1. raises an error any time a command line spec doesn't match any addresses. 2. add a new test case in test_list_integration 3. refactor generalize a do_command method in pants_run_integration_test from test_filemap_integration and test_list_integration Testing Done: ci green: https://travis-ci.org/pantsbuild/pants/builds/133418393 \\\[tw-mbp-yujiec pants\\\]$ ./pants run src/python/pants/engine/legacy:filemap -- dwejdiweof/:: ...... Traceback (most recent call last): File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/<a class=hub.com/pantsbuild/pants/commit/<a class="double-link" href="https://git"><a class=hub.com/pantsbuild/pants/commit/<a class="double-link" href="https://git"><a class=hub.com/pantsbuild/pants/commit/<a class="double-link" href="https://git"><a class=hub.com/pantsbuild/pants/commit/<a class="double-link" href="https://git"><a class=hub.com/pantsbuild/pants/commit/299c768004c7cc343de6dcadbd242169fa2a80f1">299c76800/.bootstrap/_pex/pex.py", line 328, in execute self._wrap_coverage(self._wrap_profiling, self._execute) File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/299c768004c7cc343de6dcadbd242169fa2a80f1/.bootstrap/_pex/pex.py", line 260, in _wrap_coverage runner(*args) File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/299c768004c7cc343de6dcadbd242169fa2a80f1/.bootstrap/_pex/pex.py", line 292, in _wrap_profiling runner(*args) File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/299c768004c7cc343de6dcadbd242169fa2a80f1/.bootstrap/_pex/pex.py", line 371, in _execute return self.execute_entry(self._pex_info.entry_point) File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/299c768004c7cc343de6dcadbd242169fa2a80f1/.bootstrap/_pex/pex.py", line 429, in execute_entry runner(entry_point) File "/Users/yujiec/workdir/opensource/pants/.pants.d/python-setup/chroots/299c768004c7cc343de6dcadbd242169fa2a80f1/.bootstrap/_pex/pex.py", line 447, in execute_pkg_resources runner() File "/Users/yujiec/workdir/opensource/pants/src/python/pants/engine/legacy/commands.py", line 21, in filemap with EngineInitializer.open_legacy_graph() as (graph, addresses, _): File "/opt/twitter_mde/package/python2.7/current/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/Users/yujiec/workdir/opensource/pants/src/python/pants/bin/engine_initializer.py", line 128, in open_legacy_graph addresses = tuple(graph.inject_specs_closure(spec_roots)) File "/Users/yujiec/workdir/opensource/pants/src/python/pants/engine/legacy/graph.py", line 166, in inject_specs_closure for address in self._inject(specs): File "/Users/yujiec/workdir/opensource/pants/src/python/pants/engine/legacy/graph.py", line 195, in _inject 'Spec {} does not match any targets.'.format(address_root.subject)) pants.engine.legacy.graph.InvalidCommandLineSpecError: Spec DescendantAddresses(directory='dwejdiweof') does not match any targets. FAILURE: /Users/yujiec/workdir/opensource/pants/build-support/pants_dev_deps.venv/bin/python pants.engine.legacy.commands:filemap dwejdiweof/:: ... exited non-zero (1) 18:04:04 00:08 [complete] FAILURE Bugs closed: 3419, 3494 Reviewed at https://rbcommons.com/s/twitter/r/3930/
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|