On 05/04/2011 11:21 AM, Nenad Vukicevic wrote:
> It seems that I fixed my problem by defining remote_spawn
> procedure (and fixing the order of loading libraries :) ) in my
> own upc-dg.exp file and adding a line to it that append
> additional arguments to the command line: "append commandline 
> $upc_run_arguments".
> 
> global $upc_run_arguments is getting set before dg-test is being
> called. I used a simple string compare to see if dynamic
> threads are required. So far it works as expected.

Working "so far" shouldn't be good enough, especially if your test will
be run for a variety of targets.

Presumably you don't really need the number of threads to be specified
on the command line, you just need for it to look as if it were
specified at run time.  You could, for example, define it in a second
source file included in the test via dg-additional-sources and use it
from a global variable or call a function to get it.

Janis

Reply via email to