#915 Stop ogServer service in run-test.py

Python test script launches its own ogServer to run tests. If there is
another ogServer running at the same time, it interferes with tests.

Installing ogServer in a machine results in an enabled ogServer service.

Stop ogServer service before tests just in case the user installed
ogServer in the machine.
master
Javier Sánchez Parra 2021-03-29 08:33:03 +02:00 committed by OpenGnSys Support Team
parent 49fc6c5c5c
commit 0b5c0813fa
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ if os.path.isfile('/usr/bin/valgrind') is not True:
print('You need valgrind to run these tests :-)')
exit()
print("Stopping ogServer service...")
subprocess.run(['systemctl', 'stop', 'ogserver'])
start_mysql();
subprocess.Popen(['valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=./valgrind-out.log ../ogserver -f config/ogserver.json'], shell=True)