Tests: fix OPC-UA test when run from repo. wxPython4
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 11 Oct 2022 15:07:14 +0200
branchwxPython4
changeset 3634 db3ea47b0d0b
parent 3633 837e7782d83e
child 3635 5107a2712b17
Tests: fix OPC-UA test when run from repo.

project_files directory isn't commited because empty,
test fails if project_files is missing.
tests/cli_tests/opcua_test_encrypted.bash
--- a/tests/cli_tests/opcua_test_encrypted.bash	Tue Oct 11 15:02:07 2022 +0200
+++ b/tests/cli_tests/opcua_test_encrypted.bash	Tue Oct 11 15:07:14 2022 +0200
@@ -55,8 +55,9 @@
 EOF
 SERVER_PID=$!
 
-cp my_cert.der my_private_key.pem \
-   $BEREMIZPATH/tests/projects/opcua_client_encrypted/project_files
+PROJECT_FILES_DIR=$BEREMIZPATH/tests/projects/opcua_client_encrypted/project_files
+mkdir $PROJECT_FILES_DIR
+cp my_cert.der my_private_key.pem $PROJECT_FILES_DIR
 
 # Start PLC with opcua test
 setsid $BEREMIZPYTHONPATH $BEREMIZPATH/Beremiz_cli.py -k \