Exemplo n.º 1
0
 def test_ClangAnalyzer(self):
     self.helper.add_input_file('script/build.py',
             """\
             build_options = ['clang-3.8', 'clang-static-analyzer-3.8']
             def do_build(context):
                 pass
             """)
     BuildContext._read_build_script_config(self.helper.factory,
             'script/build.py', 'config.json')
     self.helper.assertOutputJsonFile('/ws/build/config.json', {
             'opts': ['clang-3.8', 'clang-static-analyzer-3.8'],
             'host': 'bs_nix-static_analyzer',
             'labels': 'clang-3.8 && clang-static-analyzer-3.8'
         })
Exemplo n.º 2
0
 def test_CudaGpuBuild(self):
     self.helper.add_input_file('script/build.py',
             """\
             build_options = [ 'gcc-4.9', 'cuda-9.0', 'gpuhw=nvidia' ]
             def do_build(context):
                 pass
             """)
     result = BuildContext._read_build_script_config(self.helper.factory,
             'script/build.py')
     self.assertEqual(result, {
             'opts': [ 'gcc-4.9', 'cuda-9.0', 'gpuhw=nvidia' ],
             'host': 'bs_nix1310',
             'labels': 'cuda-9.0 && gcc-4.9 && nvidia'
         })
Exemplo n.º 3
0
 def test_CudaGpuBuild(self):
     self.helper.add_input_file(
         'script/build.py', """\
             build_options = [ 'gcc-4.9', 'cuda-9.0', 'gpuhw=nvidia' ]
             def do_build(context):
                 pass
             """)
     result = BuildContext._read_build_script_config(
         self.helper.factory, 'script/build.py')
     self.assertEqual(
         result, {
             'opts': ['gcc-4.9', 'cuda-9.0', 'gpuhw=nvidia'],
             'host': 'bs_nix1310',
             'labels': 'cuda-9.0 && gcc-4.9 && nvidia'
         })
Exemplo n.º 4
0
 def test_ClangAnalyzer(self):
     self.helper.add_input_file(
         'script/build.py', """\
             build_options = ['clang-3.8', 'clang-static-analyzer-3.8']
             def do_build(context):
                 pass
             """)
     result = BuildContext._read_build_script_config(
         self.helper.factory, 'script/build.py')
     self.assertEqual(
         result, {
             'opts': ['clang-3.8', 'clang-static-analyzer-3.8'],
             'host': 'bs_nix-static_analyzer',
             'labels': 'clang-3.8 && clang-static-analyzer-3.8'
         })