]> git.puffer.fish Git - mirror/frr.git/commit
tests: Fix out of tree build for lua scripting 13470/head
authorEugene Crosser <crosser@average.org>
Mon, 8 May 2023 16:38:40 +0000 (18:38 +0200)
committerEugene Crosser <crosser@average.org>
Tue, 9 May 2023 00:05:44 +0000 (02:05 +0200)
commit5b2ee104c2c660f29d5e59097ebce9fe95529b14
treeb56219f70138c1739e2d461d79685b15abcfd05b
parentcf0d1e8c257a6cd73e16a7cbabc88e2e9ce330d4
tests: Fix out of tree build for lua scripting

test_frrscript is run from the `tests` directory and expects the sample
lua script `script1.lua` to be present in the `lib` directory. When the
package is built out of tree (which always happens when a debian
package is built), and scripting is enabled, test fails because the lua
file is not present in the `tests/lib/` subdir of the _build_ directory.

Fix this by adding `script1.lua` as an extra dependency for
`test_frrscript`, and a recipe that copies the file from the source tree
to the build tree (note: it needs to be marked ".PHONY" because
otherwise `make` thinks that it already exists, in the source tree).

After this commit, the following command starts to work:

    dpkg-buildpackage --build-profiles=pkg.frr.lua -b -uc

Signed-off-by: Eugene Crosser <crosser@average.org>
tests/lib/subdir.am