test_runner does not seem to accept task parameters
antonialvarez opened this issue · 10 comments
Given this sample task:
test_runner :unit_tests, :path do |nunit, args|
#args is nil in here
end
then calling rake unit_tests[custompath]
does not populate the args
variable in the block above. The root of the issue seems to be in dsl.rb
in the definition of test_runner
:
Albacore.define_task *args do
c = Albacore::TestRunner::Config.new
yield c
Albacore::TestRunner::Task.new(c.opts).execute
end
the following implementation solves the issue
Albacore.define_task *args do |task_name, args|
c = Albacore::TestRunner::Config.new
yield c, args
Albacore::TestRunner::Task.new(c.opts).execute
end
I see. Perhaps you'd PR that change? THanks.
Since many methods in dsl.rb
use the same task creation pattern, should they all be fixed in the same way?
And yes, I can create a pull request.
Yes, that's the way to go! =)
Deal! :)
@haf, I also need this fix, noticed @antonialvarez's build failed, forked, and attempted to make the same fix. However, the travis build also failed for me. I made another branch with just a change to allow branch builds (and removing your email)--it, too, fails in travis. Can you rerun master in travis to make sure it still works? Otherwise, any help would be appreciated.
Restarted!
@haf, thank you! The build worked fine. The main difference I see is that the Albacore repo runs on travis' legacy infrastructure while mine runs on their "new platform for Precise builds." I will try to see if their support can help.
Strange. But when I test locally it's also passing. Also, there are no sudo
calls or other strange things going on, so I can't spot why it would fail off the bat.
Released v2.5.13 that would seem to be able to do this.