mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
selftest: Add helper function to create exports file for a testenv
This writes out the environment variables that are normally setup in the testenv xterm to a file. This allows them to be sourced later. This function is currently unused. However, it provides an alternative replacement for the selftest-vars.sh script (which is really out of date). I do plan to make use of this function in a subsequent patch-set. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
0dbb923881
commit
d192ba4e0b
@ -639,4 +639,14 @@ sub export_envvars
|
||||
}
|
||||
}
|
||||
|
||||
sub export_envvars_to_file
|
||||
{
|
||||
my ($filepath, $testenv_vars) = @_;
|
||||
my $env_str = exported_envvars_str($testenv_vars);
|
||||
|
||||
open(FILE, "> $filepath");
|
||||
print FILE "$env_str";
|
||||
close(FILE);
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user