Discussion:
[boost] [build] No output until an action completes?
Tom Westerhout via Boost
2017-07-06 13:40:36 UTC
Permalink
Greetings!


I've run into a problem that a Boost.Build action produces no output until
the command returns. For example, in my Jamfile I have

rule do-measure ( test-name : sources * : requirements * )
{
... some preparation work ...
}

actions do-measure
{
$(COMMAND) $(ARGS)
}

notfile ha : @do-measure : ... : ... ;

COMMAND is a Python script that runs for a long time and produces some
debug information. But b2 does not print this output until COMMAND
returns. This is really unfortunate because Travis requires a command to
produce output at least once per 10 mins or something. Otherwise it thinks
the command has stalled and terminates it.

Is there some configuration parameter or a trick to make b2 print the
debug info COMMAND produces? or maybe some dummy output so that Travis
allows it to run longer than 10 mins?

Any help is highly appreciated!


Tom

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Vladimir Prus via Boost
2017-07-06 14:46:06 UTC
Permalink
Post by Tom Westerhout via Boost
Greetings!
I've run into a problem that a Boost.Build action produces no output until
the command returns.
Hi Tom,

that is correct. The motivation is that with parallel builds, producing
output while a command is running results in interleaved output that
is quite impossible to understand. Therefore, the output is buffered,
and then written together when the action is finished.
Post by Tom Westerhout via Boost
For example, in my Jamfile I have
actions do-measure
{
$(COMMAND) $(ARGS)
}
COMMAND is a Python script that runs for a long time and produces some
debug information. But b2 does not print this output until COMMAND
returns. This is really unfortunate because Travis requires a command to
produce output at least once per 10 mins or something. Otherwise it thinks
the command has stalled and terminates it.
This is a valid use case for long running tasks. Could you file an issue?

- Volodya
Post by Tom Westerhout via Boost
Is there some configuration parameter or a trick to make b2 print the
debug info COMMAND produces? or maybe some dummy output so that Travis
allows it to run longer than 10 mins?
Any help is highly appreciated!
Tom
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Tom Westerhout via Boost
2017-07-07 08:26:47 UTC
Permalink
Post by Vladimir Prus via Boost
that is correct. The motivation is that with parallel builds, producing
output while a command is running results in interleaved output that
is quite impossible to understand. Therefore, the output is buffered,
and then written together when the action is finished.
This makes sense.
Post by Vladimir Prus via Boost
This is a valid use case for long running tasks. Could you file an issue?
Submitted an issue: https://github.com/boostorg/build/issues/210


Tom

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Loading...