Closed
Bug 821425
Opened 12 years ago
Closed 12 years ago
Remote CPP unit tests: pass environment variables
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla20
People
(Reporter: gbrown, Assigned: gbrown)
References
Details
Attachments
(1 file, 4 obsolete files)
|
2.36 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
It should be possible to modify the environment variables used when running remote cpp unit tests. Some defaults are set by remotecppunittests.py and cppunittests.py, but certain tests may require special modifications.
| Assignee | ||
Comment 1•12 years ago
|
||
See https://bugzilla.mozilla.org/show_bug.cgi?id=821033#c4 for motivation.
| Assignee | ||
Comment 2•12 years ago
|
||
This adds a --addEnv option to remotecppunittests.py. --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 cppunittests.py or remotecppunittests.py may be cleared.
Assignee: nobody → gbrown
Attachment #692442 -
Flags: review?(jmaher)
Comment 3•12 years ago
|
||
Comment on attachment 692442 [details] [diff] [review]
provide --addEnv option for remotecppunittests.py
Review of attachment 692442 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/remotecppunittests.py
@@ +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+
| Assignee | ||
Comment 4•12 years ago
|
||
Added example to option help as per review comment. r=jmaher
Attachment #692442 -
Attachment is obsolete: true
Attachment #693100 -
Flags: review+
Comment 5•12 years ago
|
||
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.
Comment 6•12 years ago
|
||
| Assignee | ||
Comment 7•12 years ago
|
||
: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+
Comment 8•12 years ago
|
||
That fixed things up nicely; thanks!
| Assignee | ||
Comment 9•12 years ago
|
||
Re-based for new patch on bug 811411.
Attachment #695042 -
Attachment is obsolete: true
Attachment #695234 -
Attachment is obsolete: true
Attachment #697464 -
Flags: review+
| Assignee | ||
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•