diff options
author | Thomas Arts <[email protected]> | 2014-09-11 10:12:11 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2014-09-18 10:09:28 +0200 |
commit | f536f86ebe3face7164c63d7455389968be94203 (patch) | |
tree | cf3ff9e4c53dc7b805e62f7dd5b6a59aa371c112 /lib/ssh/src/ssh_shell.erl | |
parent | 743ed31108ee555db18d9833186865e85e34333e (diff) | |
download | otp-f536f86ebe3face7164c63d7455389968be94203.tar.gz otp-f536f86ebe3face7164c63d7455389968be94203.tar.bz2 otp-f536f86ebe3face7164c63d7455389968be94203.zip |
Passing global var to QuickCheck statemachine
The data_dir used by the tests is given at runtime. This has as a
disadvantage that the generate test has a hardcoded data_dir in it
(ssh_eqc_client_server_dirs below):
[{set,{var,1},
{call,ssh_eqc_client_server,initial_state,
[{state,false,[],[],[],[],"ssh_eqc_client_server_dirs"}]}},
{set,{var,2},
{call,ssh_eqc_client_server,ssh_server,
[{{127,1,1,1},
{call,ssh_eqc_client_server,inet_port,[{127,1,1,1}]}},
"ssh_eqc_client_server_dirs",
[{parallel_login,true}]]}},
Re-running this tests on another machine works, since the path is
relative, but if it were absolute, it would have been hard.
Instead, we may use a symbolic representation of the data_dir and fill
it in each time one runs the property, thus even when one does a check
or recheck.
The key to this is to use a variable in the test and bind the variable
in the place where one runs the commands by using the environment
variable feature of run_commands.
Conflicts:
lib/ssh/test/property_test/ssh_eqc_client_server.erl
Diffstat (limited to 'lib/ssh/src/ssh_shell.erl')
0 files changed, 0 insertions, 0 deletions