Re: Set environment variable on remote target

2008-07-18 Thread Jie Zhang
Andreas Schwab wrote: Jie Zhang [EMAIL PROTECTED] writes: So we have to use single quotes. The updated patch is attached. This will break if the value can contain single quotes. How about using double quotes but escaping , \, $, and ` using backslash? The patch is attached. Jie diff

Re: Set environment variable on remote target

2008-07-17 Thread Andreas Schwab
Jie Zhang [EMAIL PROTECTED] writes: Andreas Schwab wrote: Jie Zhang [EMAIL PROTECTED] writes: @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } { set inp /dev/null } -set ret [local_exec $RSH $rsh_useropts $hostname sh -c '$program $pargs \\; echo

Re: Set environment variable on remote target

2008-07-17 Thread Jie Zhang
Andreas Schwab wrote: Jie Zhang [EMAIL PROTECTED] writes: Andreas Schwab wrote: Jie Zhang [EMAIL PROTECTED] writes: @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } { set inp /dev/null } -set ret [local_exec $RSH $rsh_useropts $hostname sh -c

Re: Set environment variable on remote target

2008-07-17 Thread Andreas Schwab
Jie Zhang [EMAIL PROTECTED] writes: So we have to use single quotes. The updated patch is attached. This will break if the value can contain single quotes. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key

Set environment variable on remote target

2008-07-16 Thread Jie Zhang
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

Re: Set environment variable on remote target

2008-07-16 Thread Andreas Schwab
Jie Zhang [EMAIL PROTECTED] writes: @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } { set inp /dev/null } -set ret [local_exec $RSH $rsh_useropts $hostname sh -c '$program $pargs \\; echo XYZ\\\${?}ZYX' $inp $outp $timeout] +set remote_envs +

Re: Set environment variable on remote target

2008-07-16 Thread Jie Zhang
Andreas Schwab wrote: Jie Zhang [EMAIL PROTECTED] writes: @@ -261,7 +262,11 @@ proc rsh_exec { boardname program pargs inp outp } { set inp /dev/null } -set ret [local_exec $RSH $rsh_useropts $hostname sh -c '$program $pargs \\; echo XYZ\\\${?}ZYX' $inp $outp $timeout] +