Exemple #1
0
 def test_failing_test_after_recursive_bit_installation(self):
     os.chdir(self.PROJECT_DIRECTORY)
     self.add_bit('test', 'cest', '1.0')
     self.add_test('test_case.cpp', fails=True)
     install.execute(['-s', 'http://localhost:8000'])
     result = test.execute([])
     assert result.status_code == 1
Exemple #2
0
 def test_after_recursive_bit_installation(self):
     os.chdir(self.PROJECT_DIRECTORY)
     self.add_bit('test', 'cest', '1.0')
     self.set_test_cflags(['-std=c++11'])
     self.add_test('test_case.cpp')
     install.execute(['-s', 'http://localhost:8000'])
     result = test.execute([])
     assert result.status_code == 0
Exemple #3
0
 def test_failing_test_when_running_inside_docker_image(self):
     os.chdir(self.PROJECT_DIRECTORY)
     self.add_bit('test', 'cest', '1.0')
     self.add_test('test_case.cpp', fails=True)
     self.set_target_image('default', 'cpmbits/ubuntu:20.04')
     self.set_target_test_image('default', 'cpmbits/ubuntu:20.04')
     install.execute(['-s', 'http://localhost:8000'])
     result = test.execute([])
     assert result.status_code == 1
Exemple #4
0
 def test_specifying_test_directory(self):
     os.chdir(self.PROJECT_DIRECTORY)
     self.add_bit('test', 'cest', '1.0')
     self.set_test_cflags(['-std=c++11'])
     self.add_test('test_case1.cpp')
     self.add_test('test_case2.cpp')
     install.execute(['-s', 'http://localhost:8000'])
     result = test.execute(['tests'])
     assert result.status_code == 0
Exemple #5
0
 def test_run_tests_from_docker_image(self):
     os.chdir(self.PROJECT_DIRECTORY)
     self.add_bit('test', 'cest', '1.0')
     self.set_target_image('default', 'cpmbits/ubuntu:20.04')
     self.set_target_test_image('default', 'cpmbits/ubuntu:20.04')
     self.set_test_ldflags(['-Wl,-s'])
     self.add_test('test_case.cpp')
     install.execute(['-s', 'http://localhost:8000'])
     result = test.execute([])
     assert result.status_code == 0