summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-05-09 17:30:17 +0200
committerGitHub <noreply@github.com>2023-05-09 17:30:17 +0200
commitb03eecbd2e09d7f099cba3f45e4a5829104f1a7b (patch)
tree81de15e53d858b0101b2410f51a2062db808b431
parentMerge pull request #13445 from donaldsharp/lua_scripting_mem_leak (diff)
parenttests: Fix out of tree build for lua scripting (diff)
downloadfrr-b03eecbd2e09d7f099cba3f45e4a5829104f1a7b.tar.xz
frr-b03eecbd2e09d7f099cba3f45e4a5829104f1a7b.zip
Merge pull request #13470 from crosser/fix-test-frrscript
test_frrscript: fix dep for out of tree build
-rw-r--r--tests/lib/subdir.am6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/lib/subdir.am b/tests/lib/subdir.am
index e950d0120..c3a1a3e2c 100644
--- a/tests/lib/subdir.am
+++ b/tests/lib/subdir.am
@@ -15,8 +15,14 @@ tests_lib_test_frrscript_CFLAGS = $(TESTS_CFLAGS)
tests_lib_test_frrscript_CPPFLAGS = $(TESTS_CPPFLAGS)
tests_lib_test_frrscript_LDADD = $(ALL_TESTS_LDADD)
tests_lib_test_frrscript_SOURCES = tests/lib/test_frrscript.c
+EXTRA_tests_lib_test_frrscript_DEPENDENCIES = copy_script
EXTRA_DIST += tests/lib/test_frrscript.py tests/lib/script1.lua
+# For out-of-tree build, lua script needs to be in the build dir, rather than
+# just available somewhere in the VPATH
+copy_script: tests/lib/script1.lua
+ test -e tests/lib/script1.lua || \
+ $(INSTALL_SCRIPT) $< tests/lib/script1.lua
##############################################################################
GRPC_TESTS_LDADD = staticd/libstatic.a grpc/libfrrgrpc_pb.la -lgrpc++ -lprotobuf $(ALL_TESTS_LDADD) $(LIBYANG_LIBS) -lm