Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vg12345 committed May 21, 2024
1 parent 450ae9c commit aaae5b3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/pdr_plugin_ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
pip install -r $PDRPATH/requirements.txt
pip install pylint
pip install pytest-cov
- name: Run PyLint
run: pylint --rcfile=$PDRPATH/.pylintrc $PDRPATH

Expand All @@ -42,26 +42,13 @@ jobs:
sleep 10
pytest -s $PDRPATH/tests/exclude_list_rest_api_tests.py --cov=$PDRPATH
echo "Terminating standalone PDR process"
sudo ps -ef | grep isolation_algo.py | grep -v grep | awk '{print $2}' | xargs kill -9 $1 >/dev/null 2>/dev/null
#sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null
#sleep 10
#if pgrep -x isolation_algo.py> /dev/null; then
# echo "Failed to kill the process"
# exit 1
#fi
sudo bash $PDRPATH/.pytest/terminate_pdr_standalone_pytest.sh
- name: Run full simulation test
timeout-minutes: 10
run: |
sudo bash $PDRPATH/.pytest/run_pdr_standalone_pytest.sh
echo "Starting simulated test"
python $PDRPATH/tests/simulation_telemetry.py
echo "Terminating standalone PDR process"
sudo ps -ef | grep isolation_algo.py | grep -v grep | awk '{print $2}' | xargs kill -9 $1 >/dev/null 2>/dev/null
#sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null
#sleep 10
#if pgrep -x isolation_algo.py> /dev/null; then
# echo "Failed to kill the process"
# exit 1
#fi
sudo bash $PDRPATH/.pytest/terminate_pdr_standalone_pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ 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"

echo "Terminating standalone PDR process"
ps -ef | grep isolation_algo.py | grep -v grep | awk '{print $2}' | xargs kill -9 $1 >/dev/null 2>/dev/null
#sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null
#sleep 10
#if pgrep -x isolation_algo.py> /dev/null; then
# echo "Failed to kill the process"
# exit 1
#fi
#
terminate_pdr_standalone_pytest.sh
echo "Starting standalone PDR process"
python $PLUGIN_DIR/ufm_sim_web_service/isolation_algo.py >/dev/null 2>&1 &
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -x

echo "Terminating standalone PDR process"
ps -ef | grep isolation_algo.py | grep -v grep | awk '{print $2}' | xargs kill -9 $1 >/dev/null 2>/dev/null
#sudo pkill -0 isolation_algo.py && pkill -9 -f isolation_algo.py 2>/dev/null
sleep 10
if pgrep -x isolation_algo.py> /dev/null; then
echo "Failed to kill the process"
exit 1
fi

0 comments on commit aaae5b3

Please sign in to comment.