Esempio n. 1
0
    def test_no_platform(self):
        self.setupStep(
            vstudio.MsBuild(projectfile='pf',
                            config='cfg',
                            platform=None,
                            project='pj'))

        self.expectOutcome(result=results.EXCEPTION,
                           state_string="built pj for cfg|None")
        yield self.runStep()
        self.assertEqual(len(self.flushLoggedErrors(config.ConfigErrors)), 1)
Esempio n. 2
0
    def test_build_solution(self):
        self.setupStep(
            vstudio.MsBuild(projectfile='pf', config='cfg', platform='x64'))

        self.expectCommands(
            ExpectShell(workdir='wkdir', usePTY='slave-config',
                        command='"%VCENV_BAT%" x86 && msbuild "pf" /p:Configuration="cfg" /p:Platform="x64" /t:Rebuild',
                        env={'VCENV_BAT': r'${VS110COMNTOOLS}..\..\VC\vcvarsall.bat'})
            + 0
        )
        self.expectOutcome(result=SUCCESS,
                           state_string="built solution for cfg|x64")
        return self.runStep()
Esempio n. 3
0
    def test_build_solution(self):
        self.setupStep(vstudio.MsBuild(projectfile='pf', config='cfg', platform='x64'))

        self.expectCommands(
            ExpectShell(workdir='wkdir', usePTY='slave-config',
                        command=['%VCENV_BAT%', 'x86', '&&',
                                 'msbuild', 'pf', '/p:Configuration=cfg', '/p:Platform=x64'],
                        env={'VCENV_BAT': '"${VS110COMNTOOLS}..\\..\\VC\\vcvarsall.bat"'})
            + 0
        )
        self.expectOutcome(result=SUCCESS,
                           status_text=["built", "solution for", 'cfg|x64'])
        return self.runStep()
Esempio n. 4
0
    def test_build_project(self):
        self.setupStep(vstudio.MsBuild(
            projectfile='pf', config='cfg', platform='Win32', project='pj'))

        self.expectCommands(
            ExpectShell(workdir='wkdir',
                        command='"%VCENV_BAT%" x86 && msbuild "pf" /p:Configuration="cfg" /p:Platform="Win32" /maxcpucount /t:"pj"',
                        env={'VCENV_BAT': r'${VS110COMNTOOLS}..\..\VC\vcvarsall.bat'})
            + 0
        )
        self.expectOutcome(result=SUCCESS,
                           state_string="built pj for cfg|Win32")
        return self.runStep()
Esempio n. 5
0
    def test_build_project(self):
        self.setupStep(vstudio.MsBuild(projectfile='pf', config='cfg', platform='Win32', project='pj'))

        self.expectCommands(
            ExpectShell(workdir='wkdir', usePTY='slave-config',
                        command=['%VCENV_BAT%', 'x86', '&&',
                                 'msbuild', 'pf', '/p:Configuration=cfg', '/p:Platform=Win32',
                                 '/t:pj'],
                        env={'VCENV_BAT': '"${VS110COMNTOOLS}..\\..\\VC\\vcvarsall.bat"'})
            + 0
        )
        self.expectOutcome(result=SUCCESS,
                           state_string="built pj for cfg|Win32")
        return self.runStep()
Esempio n. 6
0
    def test_rebuild_solution(self):
        self.setup_step(
            vstudio.MsBuild(projectfile='pf', config='cfg', platform='x64'))

        self.expect_commands(
            ExpectShell(
                workdir='wkdir',
                command=
                '"%VCENV_BAT%" x86 && msbuild "pf" /p:Configuration="cfg" /p:Platform="x64" /maxcpucount /t:Rebuild',  # noqa pylint: disable=line-too-long
                env={
                    'VCENV_BAT': r'${VS110COMNTOOLS}..\..\VC\vcvarsall.bat'
                }).exit(0))
        self.expect_outcome(result=SUCCESS,
                            state_string="built solution for cfg|x64")
        return self.run_step()
Esempio n. 7
0
    def test_rebuild_project_with_defines(self):
        self.setup_step(
            vstudio.MsBuild(projectfile='pf',
                            config='cfg',
                            platform='Win32',
                            project='pj',
                            defines=['Define1', 'Define2=42']))

        self.expect_commands(
            ExpectShell(
                workdir='wkdir',
                command=
                '"%VCENV_BAT%" x86 && msbuild "pf" /p:Configuration="cfg" /p:Platform="Win32" /maxcpucount /t:"pj" /p:DefineConstants="Define1;Define2=42"',  # noqa pylint: disable=line-too-long
                env={
                    'VCENV_BAT': r'${VS110COMNTOOLS}..\..\VC\vcvarsall.bat'
                }).exit(0))
        self.expect_outcome(result=SUCCESS,
                            state_string="built pj for cfg|Win32")
        return self.run_step()