|
- import subprocess
-
- import pytest
- import time
-
- from dds_ci.testing import Project
-
-
- def test_simple_compile_file(tmp_project: Project) -> None:
- """
- Check that changing a source file will update the resulting application.
- """
- with pytest.raises(subprocess.CalledProcessError):
- tmp_project.compile_file('src/answer.cpp')
- tmp_project.write('src/answer.cpp', 'int get_answer() { return 42; }')
-
- tmp_project.compile_file('src/answer.cpp')
-
- time.sleep(1)
- tmp_project.write('src/answer.cpp', 'int get_answer() { return "How many roads must a man walk down?"; }')
- with pytest.raises(subprocess.CalledProcessError):
- tmp_project.compile_file('src/answer.cpp')
|