From ef28d35a8bbaeef93a87604b4d77ab986bfa2e97 Mon Sep 17 00:00:00 2001 From: Vitaly Gavensky Date: Sun, 19 May 2024 16:48:05 +0300 Subject: [PATCH] Temp: full simulation --- .github/workflows/pdr_plugin_ci_workflow.yml | 2 +- .../.pytest/run_simulation_pytest.sh | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pdr_plugin_ci_workflow.yml b/.github/workflows/pdr_plugin_ci_workflow.yml index 06260d473..3df39509b 100644 --- a/.github/workflows/pdr_plugin_ci_workflow.yml +++ b/.github/workflows/pdr_plugin_ci_workflow.yml @@ -32,7 +32,7 @@ jobs: - name: Run single plugin instance on background as standalone run: | source plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh - sudo start_simulation_server_pytest + start_simulation_server_pytest start_pdr_standalone_pytest kill_simulation_server_pytest diff --git a/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh b/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh index 08a07cb15..32bfd5fe0 100644 --- a/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh +++ b/plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh @@ -4,17 +4,18 @@ PLUGIN_DIR="plugins/pdr_deterministic_plugin" pip install -r $PLUGIN_DIR/requirements.txt start_simulation_server_pytest() { - cp -r utils $PLUGIN_DIR/tests + # Init configuration file CONFIG_FILE="/config/pdr_deterministic.conf" - mkdir -p /config - cp -f $PLUGIN_DIR/build/config/pdr_deterministic.conf "$CONFIG_FILE" - sed -i -e 's/\nTEST_MODE=True\n//g' "$CONFIG_FILE" - echo -e '\n[Common]\nTEST_MODE=True\n' >> "$CONFIG_FILE" - sed -i -e 's/DRY_RUN=False/DRY_RUN=True/g' "$CONFIG_FILE" - 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" + sudo mkdir -p /config + sudo cp -f $PLUGIN_DIR/build/config/pdr_deterministic.conf "$CONFIG_FILE" + sudo sed -i -e 's/\nTEST_MODE=True\n//g' "$CONFIG_FILE" + sudo echo -e '\n[Common]\nTEST_MODE=True\n' >> "$CONFIG_FILE" + sudo sed -i -e 's/DRY_RUN=False/DRY_RUN=True/g' "$CONFIG_FILE" + sudo sed -i -e 's/INTERVAL=300/INTERVAL=10/g' "$CONFIG_FILE" + sudo sed -i -e 's/CONFIGURED_TEMP_CHECK=False/CONFIGURED_TEMP_CHECK=True/g' "$CONFIG_FILE" + sudo sed -i -e 's/DEISOLATE_CONSIDER_TIME=5/DEISOLATE_CONSIDER_TIME=1/g' "$CONFIG_FILE" + cp -r utils $PLUGIN_DIR/tests echo "Starting 'isolation_algo.py'" python $PLUGIN_DIR/ufm_sim_web_service/isolation_algo.py & }