16 Jul 18:51
Set environment variable on remote target
From: Jie Zhang <jie.zhang <at> analog.com>
Subject: Set environment variable on remote target
Newsgroups: gmane.comp.gcc.devel, gmane.comp.sysutils.dejagnu.general
Date: 2008-07-16 16:52:34 GMT
Subject: Set environment variable on remote target
Newsgroups: gmane.comp.gcc.devel, gmane.comp.sysutils.dejagnu.general
Date: 2008-07-16 16:52:34 GMT
libmudflap tests set a environment MUDFLAP_OPTIONS=-viol-segv before
testing such that violations are promoted to SIGSEGV signals in testing.
Otherwise, the exit value would be 0 even the test has violations.
libmudflap testsuite depends on the exit value of tests to decide if the
test PASS or FAIL. Setting MUDFLAP_OPTIONS is done in DejaGNU by
setenv MUDFLAP_OPTIONS "-viol-segv"
which works fine on native testing. But when doing remote cross testing,
setenv does not help. I cannot find existing mechanism in DejaGNU. So I
want to use a global array like remote_env. If remote cross testing, add
the environment variable in this array. Then set the environment
variables according to the array when remote execute test case. I wrote
a draft patch show what I means, which is attached. In mudflap
testsuite, replace each setenv with
if { ![is_remote target] } {
setenv MUDFLAP_OPTIONS "-viol-segv"
} else {
remote_setenv MUDFLAP_OPTIONS "-viol-segv"
}
Is it the right way to do this, or is there existing method I can use
but I missed?
Thanks,
Jie
(Continue reading)
RSS Feed