Skip to content

Commit

Permalink
Temp: full simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
vg12345 committed May 19, 2024
1 parent 8d9ce72 commit 031da81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pdr_plugin_ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:

- name: Run single plugin instance on background as standalone
run: |
python plugins/pdr_deterministic_plugin/ufm_sim_web_service/isolation_algo.py
bash plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh
# cp -f plugins/pdr_deterministic_plugin/build/config/pdr_deterministic.conf /config/
# python plugins/pdr_deterministic_plugin/ufm_sim_web_service/isolation_algo.py
# pkill -9 -f isolation_algo.py
# sleep 10
# cp -r ./utils plugins/pdr_deterministic_plugin/ufm_sim_web_service
Expand Down
12 changes: 12 additions & 0 deletions plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -x

CONFIG_FILE="/config/pdr_deterministic.conf"
cp -f plugins/pdr_deterministic_plugin/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"

python plugins/pdr_deterministic_plugin/ufm_sim_web_service/isolation_algo.py

0 comments on commit 031da81

Please sign in to comment.