tests: Use soft links for the test file staging 66/30666/3
authorNeale Ranns <neale@graphiant.com>
Fri, 8 Jan 2021 08:43:14 +0000 (08:43 +0000)
committerDave Wallace <dwallacelf@gmail.com>
Fri, 8 Jan 2021 16:18:51 +0000 (16:18 +0000)
Type: fix

with hard links this sequence doesn't work
 echo "GARBAGE" >> test/vpp_ipsec.py
 git checkout test/vpp_ipsec.py

also blow away the staging diretory with 'test-wipe' just to be thorough

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: Ic38d7ec514102759f2eafead59c7f56c5b39f33d

test/Makefile

index 9bc4275..514cb27 100644 (file)
@@ -219,7 +219,7 @@ ext-test-apps:
 
 $(BUILD_TEST_SRC): verify-env
        @mkdir -p $@
-       @for file in $(VPP_TEST_SRC); do if [ ! -L $$file ] && [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln $$file $(BUILD_TEST_SRC) ; fi ; done
+       @for file in $(VPP_TEST_SRC); do if [ ! -L $$file ] && [ ! -e $(BUILD_TEST_SRC)/$$(basename $$file) ] ; then ln -s $$file $(BUILD_TEST_SRC) ; fi ; done
 
 $(FAILED_DIR): reset
        @mkdir -p $@
@@ -267,7 +267,8 @@ reset:
 wipe: reset
        @make -C ext clean
        @rm -rf $(VENV_PATH)
-       @rm -rf $(patsubst %,%/__pycache__, $(VPP_TEST_DIRS) $(BUILD_TEST_SRC))
+       @rm -rf $(patsubst %,%/__pycache__, $(VPP_TEST_DIRS))
+       @rm -rf  $(BUILD_TEST_SRC)
 
 $(TEST_DOC_BR): $(PIP_INSTALL_DONE)
        @mkdir -p $@