Closed Bug 821425 Opened 10 years ago Closed 10 years ago

Remote CPP unit tests: pass environment variables


(Testing :: General, defect)

Not set


(Not tracked)



(Reporter: gbrown, Assigned: gbrown)




(1 file, 4 obsolete files)

It should be possible to modify the environment variables used when running remote cpp unit tests. Some defaults are set by and, but certain tests may require special modifications.
Depends on: 811411
This adds a --addEnv option to --addEnv takes a string argument that should be of the form "envvar=value". The option may be repeated.

This way you can do something like:

export EXTRA_TEST_ARGS="--addEnv myvar1=myval1 --addEnv myvar2=myval2"
make cppunittests-remote

Each specified environment variable is passed to the remote execution environment. A variable specified with --addEnv using the same variable name as a well-known variable (like TMPDIR) over-writes the well-known default. "--addEnv myvar=" (or "--addEnv myvar") is allowed so that well-known env variables defined by or may be cleared.
Assignee: nobody → gbrown
Attachment #692442 - Flags: review?(jmaher)
Comment on attachment 692442 [details] [diff] [review]
provide --addEnv option for

Review of attachment 692442 [details] [diff] [review]:

::: testing/
@@ +165,5 @@
>          defaults["remoteTestRoot"] = "/data/local/tests"
> +        self.add_option("--addEnv", action = "append",
> +                    type = "string", dest = "addEnv",
> +                    help = "additional remote environment variable definitions")

can you put an example of what this would look like?  --addEnv="myenvvar=true" or something like that.
Attachment #692442 - Flags: review?(jmaher) → review+
Added example to option help as per review comment. r=jmaher
Attachment #692442 - Attachment is obsolete: true
Attachment #693100 - Flags: review+
The patch here seems to be against a previous patch or script that contains a "remoteTestRoot" clause.  None of the patches that I can find in other bugs have that, so I had to massage this by hand to make it apply.
:dmose -- sorry about that! You need a patch queue like this:

bug 811411
bug 821033
bug 821590
bug 824274
bug 821425
bug 821424

...even so, this patch had bitrotted -- updated now.
Attachment #693100 - Attachment is obsolete: true
Attachment #695234 - Flags: review+
That fixed things up nicely; thanks!
Re-based for new patch on bug 811411.
Attachment #695042 - Attachment is obsolete: true
Attachment #695234 - Attachment is obsolete: true
Attachment #697464 - Flags: review+
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.