tests: fix gathering of test src files 24/30524/2
authorDave Wallace <dwallacelf@gmail.com>
Mon, 21 Dec 2020 20:15:16 +0000 (15:15 -0500)
committerPaul Vinciguerra <pvinci@vinciconsulting.com>
Tue, 22 Dec 2020 00:04:14 +0000 (00:04 +0000)
- Use hard links instead of soft links so
  that python module import works correctly
  for relocated test/vpp_*.py modules.

Type: fix

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: If9c031bf0918344dedd4dee5f9336e869590b0ae

test/Makefile

index aa229e9..9bc4275 100644 (file)
@@ -219,7 +219,7 @@ ext-test-apps:
 
 $(BUILD_TEST_SRC): verify-env
        @mkdir -p $@
-       @for file in $(VPP_TEST_SRC); do if [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln -s $$file $(BUILD_TEST_SRC) ; fi ; done
+       @for file in $(VPP_TEST_SRC); do if [ ! -L $$file ] && [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln $$file $(BUILD_TEST_SRC) ; fi ; done
 
 $(FAILED_DIR): reset
        @mkdir -p $@