def test_build_from_docker_image_with_non_default_target(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_image('ubuntu', 'cpmbits/ubuntu:20.04') self.set_target_main('ubuntu', 'main.cpp') install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_from_docker_image_with_toolchain_prefix(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_dockerfile('default', f'../environment/Dockerfile') self.set_toolchain_prefix('default', 'arm-linux-gnueabihf-') install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_after_recursive_bit_installation(self): os.chdir(self.PROJECT_DIRECTORY) self.add_bit('build', 'test', '1.0') self.set_libraries(['pthread', 'dl']) install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_from_docker_image_with_ldflags(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_image('default', 'cpmbits/ubuntu:20.04') self.set_ldflags(['-Wl,--allow-multiple-definition']) self.set_target_ldflags('default', ['-Wl,-s']) install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_after_recursive_bit_installation_for_target_not_described_by_bit( self): os.chdir(self.PROJECT_DIRECTORY) self.add_bit('build', 'test', '1.0') self.set_libraries(['pthread', 'dl']) self.set_target_main('rpi4', 'main.cpp') install.execute(['-s', 'http://localhost:8000']) result = build.execute(['rpi4']) assert result == Result(0, 'Build finished')
def test_build_from_docker_image_with_post_build(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_image('default', 'cpmbits/ubuntu:20.04') self.set_post_build('default', [f'ls', f'rm build/{self.PROJECT_NAME}']) install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished') assert not filesystem.file_exists(f'build/{self.PROJECT_NAME}')
def test_build_when_declared_bit_is_not_installed(self): os.chdir(self.PROJECT_DIRECTORY) self.add_bit('build', 'test', '1.0') result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_with_user_defined_include(self): os.chdir(self.PROJECT_DIRECTORY) self.set_includes(['../environment']) self.add_main_with_user_include() result = build.execute([]) assert result.status_code == 0
def test_build(self): os.chdir(self.PROJECT_DIRECTORY) result = build.execute([]) assert result.status_code == 0
def test_build_from_dockerfile(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_dockerfile('default', f'../environment/Dockerfile') install.execute(['-s', 'http://localhost:8000']) result = build.execute([]) assert result == Result(0, 'Build finished')
def test_build_from_dockerfile(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_dockerfile('default', f'../environment') install.execute(['-s', 'http://localhost:8000']) build.execute([])
def test_build_from_docker_image(self): os.chdir(self.PROJECT_DIRECTORY) self.set_target_image('default', 'cpmbits/ubuntu:20.04') install.execute(['-s', 'http://localhost:8000']) build.execute([])
def test_build_after_recursive_bit_installation(self): os.chdir(self.PROJECT_DIRECTORY) self.add_bit('build', 'test', '1.0') install.execute(['-s', 'http://localhost:8000']) build.execute([])