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 8dd54e1 commit ef28d35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pdr_plugin_ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 10 additions & 9 deletions plugins/pdr_deterministic_plugin/.pytest/run_simulation_pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
}
Expand Down

0 comments on commit ef28d35

Please sign in to comment.