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 87f03eb commit ffa5b76
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

0 comments on commit ffa5b76

Please sign in to comment.