lizh06 / fabricate

Automatically exported from code.google.com/p/fabricate
0 stars 0 forks source link

TrackerRunner in parallel runs further commands even after error in previous group #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using the new (and pretty cool) TrackerRunner to compile and link a 
project. It works fine, even with parallel building turned on.

However, if there's an error with one of the files in the compile stage, 
fabricate will continue and run the link stage anyway.

See the attached zip file with tiny build script for repro.

For example, here's what the attached build script shows with parallel building 
turned off (or with AtimesRunner):

-----
gcc -c main.c -o main.o
main.c: In function 'main':
main.c:7:30: error: expected ')' before ';' token
main.c:9:1: error: expected ';' before '}' token
fabricate: 'gcc' exited with status 1
-----

Note that it stops immediately, and doesn't go on to the after() link stage.

But here's what it shows with TrackerRunner and parallel building turned on:

-----
gcc -c main.c -o main.o
gcc -c one.c -o one.o
gcc -c two.c -o two.o
main.c: In function 'main':
main.c:7:30: error: expected ')' before ';' token
main.c:9:1: error: expected ';' before '}' token
gcc -o main main.o one.o two.o
-----

There's the same error in the compile stage, but fabricate runs the link stage 
anyway.

Note that multiprocessing.cpu_count() returns 4 on my machine.

Original issue reported on code.google.com by benh...@gmail.com on 10 May 2013 at 11:19

GoogleCodeExporter commented 9 years ago
Oops, I'd better attach the demo.

Original comment by benh...@gmail.com on 10 May 2013 at 11:19

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was not specific to the Tracker branch. Has been fixed on master and 
will be merged to Tracker branch.

Fixed in version 1.26 (soon to be pushed)

Prevents any after() returning if a command fails.
Prevents any after('group-id') or after(['group1', 'group2']) returning if a 
command in any of the required groups fails
Prevents any run(command, after='group-id') or run(command, after=['group1', 
'group2']) running if a command in any of the required groups fails.

Original comment by simon.al...@gmail.com on 22 Jul 2013 at 10:23