Rake: race condition between task prerequisites

T

Tobie Langel

Hi,

I'm having a strange race condition between task prerequisites in the
following rakefile:

http://github.com/tobie/prototype/tree/master/Rakefile#L49

At line #49, the :test rake tasks has the following prerequisites:
:build_tests, :dist and :test_units.

:build_tests is correctly executed, as the files are generated, but
:test_units doesn't wait for the files to be generated before running.

So the first time you run :test, no tests are called. (Subsequent calls
do work, though).

I'm really not sure what I should be looking at to solve this problem.

Any pointers are welcomed.

Thanks,

Tobie
 
S

Simon Krahnke

* Tobie Langel said:
I'm having a strange race condition between task prerequisites in the
following rakefile:

http://github.com/tobie/prototype/tree/master/Rakefile#L49

At line #49, the :test rake tasks has the following prerequisites:
:build_tests, :dist and :test_units.

:build_tests is correctly executed, as the files are generated, but
:test_units doesn't wait for the files to be generated before running.

If :test_units needs the result of :build_tests, the latter should be a
prerequisite of the first.

mfg, simon .... l
 
T

Tobie Langel

Hi again,

I ended up solving the issue. Turns out what I though was a block for
the task was actually the block defining the task.

Sorry for the hassle.

Best,

Tobie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top