Skip to content

Commit

Permalink
selftests: forwarding: Allow importing dependent libraries
Browse files Browse the repository at this point in the history
The next patch introduces a new mlxsw-specific test that uses
mirror_gre_lib.sh and mirror_gre_topo_lib.sh.

However when sourcing their own deps, these libraries assume that the
test that's running is in the same directory. That's not the case for
driver-specific tests.

So change the libraries to source their deps through $relative_path.
That variable is set up by lib.sh, which should be imported by the test
in question in any case.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Petr Machata authored and David S. Miller committed Jul 7, 2018
1 parent a2f1483 commit e88bc0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/forwarding/mirror_gre_lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0

source mirror_lib.sh
source "$relative_path/mirror_lib.sh"

quick_test_span_gre_dir_ips()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# | |
# +-------------------------------------------------------------------------+

source mirror_topo_lib.sh
source "$relative_path/mirror_topo_lib.sh"

mirror_gre_topo_h3_create()
{
Expand Down

0 comments on commit e88bc0f

Please sign in to comment.