Пример #1
0
 def test_sourcesdir_none_compile_only(self):
     test = rfm.CompileOnlyRegressionTest()
     test._prefix = 'unittests/resources/checks'
     test.sourcesdir = None
     test.valid_prog_environs = ['*']
     test.valid_systems = ['*']
     self.assertRaises(BuildError, self._run_test, test)
Пример #2
0
 def test_sourcepath_upref(self):
     test = rfm.CompileOnlyRegressionTest()
     test._prefix = 'unittests/resources/checks'
     test.valid_prog_environs = ['*']
     test.valid_systems = ['*']
     test.setup(self.partition, self.prgenv)
     test.sourcepath = '../hellosrc'
     self.assertRaises(PipelineError, test.compile)
Пример #3
0
 def test_compile_only_failure(self):
     test = rfm.CompileOnlyRegressionTest()
     test._prefix = 'unittests/resources/checks'
     test.sourcepath = 'compiler_failure.c'
     test.valid_prog_environs = ['*']
     test.valid_systems = ['*']
     test.setup(self.partition, self.prgenv)
     test.compile()
     self.assertRaises(BuildError, test.compile_wait)
Пример #4
0
 def test_compile_only_warning(self):
     test = rfm.CompileOnlyRegressionTest()
     test._prefix = 'unittests/resources/checks'
     test.build_system = 'SingleSource'
     test.build_system.srcfile = 'compiler_warning.c'
     test.build_system.cflags = ['-Wall']
     test.valid_prog_environs = ['*']
     test.valid_systems = ['*']
     test.sanity_patterns = sn.assert_found(r'warning', test.stderr)
     self._run_test(test, compile_only=True)