diff options
author | Lance Richardson <lrichard@redhat.com> | 2016-03-02 16:40:46 -0500 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-03-18 16:55:57 -0700 |
commit | 5074bfc4f42d7ffa3f09e0ceeef3f2f10dd97384 (patch) | |
tree | fd699c14cc0a34ef332573185a36db3b37d4e027 /tests | |
parent | f9b11f2a09b45c87995d69588fc0a9f03661725e (diff) | |
download | openvswitch-5074bfc4f42d7ffa3f09e0ceeef3f2f10dd97384.tar.gz |
tests: make as() function as documented
As documented, the as() function should only create a subshell
to execute the provided command when a command is present. Correct
the implementation to check for the presence of the command parameter
instead of the sandbox name (which is always present in current
usage).
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ofproto-macros.at | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ofproto-macros.at b/tests/ofproto-macros.at index 18114d95f..d475b9f38 100644 --- a/tests/ofproto-macros.at +++ b/tests/ofproto-macros.at @@ -104,7 +104,7 @@ sim_add () { # "as $1 COMMAND..." sets those variables in a subshell and invokes COMMAND # there. as() { - if test "X$1" != X; then + if test "X$2" != X; then (ovs_setenv $1; shift; $@) else ovs_setenv $1 |