Skip to content

Commit fc57eef

Browse files
committed
Add django integration test again.
1 parent d57683d commit fc57eef

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

source/scripts/python/frontend/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ set(target python-frontend-migrate)
4141

4242
# Build frontend
4343
add_custom_target(${target} ALL
44-
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH="${CMAKE_CURRENT_BINARY_DIR};$ENV{PYTHONPATH}" ${PYTHON_EXECUTABLE} ${LOADER_SCRIPT_PATH}/manage.py migrate
44+
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH="${CMAKE_CURRENT_BINARY_DIR};$ENV{PYTHONPATH}" ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/source/manage.py migrate
45+
WORKING_DIRECTORY ${LOADER_SCRIPT_PATH}
4546
DEPENDS python-frontend
4647
)
4748

source/scripts/python/frontend/source/manage.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ def frontend_execute(args):
2424
execute_from_command_line(sys.argv)
2525

2626
def frontend_initialize(port: int) -> int:
27-
frontend_execute([os.path.abspath(__file__), 'runserver', str(port), '--noreload'])
27+
try:
28+
frontend_execute([os.path.abspath(__file__), 'runserver', str(port), '--noreload'])
29+
except SystemExit as e:
30+
print('Exit code:', e.code)
31+
return e.code
2832
return 0
2933

3034
if __name__ == "__main__":

source/tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ add_subdirectory(detour_test)
107107
add_subdirectory(serial_test)
108108
add_subdirectory(configuration_test)
109109
add_subdirectory(py_loader_test)
110-
#add_subdirectory(py_django_integration_test) # TODO: Solve deadlock
110+
add_subdirectory(py_django_integration_test)
111111
add_subdirectory(py_loader_port_test)
112112
add_subdirectory(rb_loader_test)
113113
add_subdirectory(rb_loader_parser_test)

source/tests/py_django_integration_test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ execute_process(
2222
)
2323

2424
if("${PYTHON_DJANGO_FOUND}" EQUAL "1")
25-
message(WARNING "Python Django not found, skipping the python djangi integration test project")
25+
message(WARNING "Python Django not found, skipping the python django integration test")
2626
return()
2727
endif()
2828

source/tests/py_django_integration_test/data/test.py.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import subprocess
1616
def sigint_handler(signal, frame):
1717
print('Server: SIGINT signal from client to server (Ctrl-C)');
1818

19-
2019
class py_django_integration_test(unittest.TestCase):
2120

2221
def test_py_django_server(self):

0 commit comments

Comments
 (0)