Support passthru args in tasks.

Review Request #1320 — Created Nov. 11, 2014 and submitted

benjyw
pants
105fcd5...
pants-reviews
jinfeng, jsirois, patricklaw, zundel

Tasks must declare that they take them.

The last task explicitly mentioned on the cmd-line gets them.

Implemented this for pytest.

Verified that this does what you expect:

./pants goal test.pytest compile tests/python/pants_test/option/ -- -s

CI passes.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
PA
  1. Ship It!

  2. 
      
NH
  1. 
      
  2. src/python/pants/option/options.py (Diff revision 1)
     
     

    Maybe I'm wrong, but I think this doesn't enforce that the args are added to the last scope referred to as a scope argument

    If you run this

    ./pants goal test --resolve-ivy-some-ivy-flag awesome/target:: -- --junit-rocking-flag

    the last scope in _scope_to_flags will be resolve.ivy not test. So, the test task won't get the passthru flags.

    1. Rats, you are correct. Great catch! Will fix and find a way to test.

  3. 
      
BE
BE
ZU
  1. Ship It!

  2. 
      
BE
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as 380eaaf0c07d316699e92adf43bd2a88667d8681.
Loading...