[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Setting environment variable to hold remote working dir



> 
> Maybe the test framework already passes through all environment
> variables it receives to the child?  You must have believed this to be
> true, otherwise your first attempt of setting
> 
>     environment = "FOO=BAR"
> 
> would never have achieved anything in the first place. So I'd start by
> trying that.

Yes, it does pass all environment variables. But I don't want to use those TMP or _CONDOR_* names - I want to set a specific environment variable that is already used by my application (and has a name that makes sense).

> 
> Also, maybe the test framework leaves the working directory unchanged
> when it runs the sub-process. In that case problem is solved too.

No, that's not the case - as I wrote in my first post.

> 
> If neither of those are true, then I think you'll need to run a small
> wrapper script for the job:
> 
>     #!/bin/sh
>     run_the_framework myprog --pass-some-
> args="TESTDIR=$_CONDOR_JOB_IWD"
> 
> (or equivalent .bat file if you are using Windows).
> 

I'll investigate that option. Still a little awkward - would be nicer if Condor would have the possibility of setting environment variables on the execution side..

Thanks again Brian!
/Tomas