From ffa5b76f6af2e27f36acee3ae3870cc9f1fa46f9 Mon Sep 17 00:00:00 2001 From: Vitaly Gavensky Date: Sun, 19 May 2024 16:04:35 +0300 Subject: [PATCH] Temp: full simulation --- .../.pytest/run_simulation_pytest.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh b/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh index ae60a5465..077b29adc 100644 --- a/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh +++ b/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh @@ -3,8 +3,7 @@ PLUGIN_DIR="plugins/pdr_deterministic_plugin" pip install -r $PLUGIN_DIR/requirements.txt -start_simulation_server_pytest() { - sudo -s +set_config_params() { cp -r utils $PLUGIN_DIR/tests CONFIG_FILE="/config/pdr_deterministic.conf" mkdir -p /config @@ -15,20 +14,21 @@ start_simulation_server_pytest() { sed -i -e 's/INTERVAL=300/INTERVAL=10/g' "$CONFIG_FILE" sed -i -e 's/CONFIGURED_TEMP_CHECK=False/CONFIGURED_TEMP_CHECK=True/g' "$CONFIG_FILE" sed -i -e 's/DEISOLATE_CONSIDER_TIME=5/DEISOLATE_CONSIDER_TIME=1/g' "$CONFIG_FILE" +} +start_simulation_server_pytest() { + sudo set_config_params echo "Starting 'isolation_algo.py'" python $PLUGIN_DIR/ufm_sim_web_service/isolation_algo.py & } start_pdr_standalone_pytest() { - sudo -s cp -r utils $PLUGIN_DIR/ufm_sim_web_service echo "Starting 'simulation_telemetry.py'" python $PLUGIN_DIR/tests/simulation_telemetry.py } kill_simulation_server_pytest() { - sudo -s echo "Terminating 'isolation_algo.py'" pkill -9 -f isolation_algo.py 2>/dev/null || true }