Exemple #1
0
 def test_clean(self):
     self.setupStep(vstudio.VC8(projectfile='pf', config='cfg',
                                project='pj', mode='clean'))
     self.expectCommands(
         ExpectShell(workdir='wkdir', usePTY='slave-config',
                     command=['devenv.com', 'pf', '/Clean',
                              'cfg', '/Project', 'pj'],
                     env=self.getExpectedEnv(
                         r'C:\Program Files\Microsoft Visual Studio 8'))
         + 0
     )
     self.expectOutcome(result=SUCCESS,
                        state_string="compile 0 projects 0 files")
     return self.runStep()
Exemple #2
0
 def test_args(self):
     self.setupStep(vstudio.VC8(projectfile='pf', config='cfg',
                                project='pj', arch='arch'))
     self.expectCommands(
         ExpectShell(workdir='wkdir', usePTY='slave-config',
                     command=['devenv.com', 'pf', '/Rebuild',
                              'cfg', '/Project', 'pj' ],
                     env=self.getExpectedEnv(
                         r'C:\Program Files\Microsoft Visual Studio 8'))
         + 0
     )
     self.expectOutcome(result=SUCCESS,
             status_text=["compile", "0 projects", "0 files"])
     return self.runStep()
 def test_args_x64(self):
     self.setupStep(vstudio.VC8(projectfile='pf', config='cfg',
                                project='pj', arch='x64'))
     self.expectCommands(
         ExpectShell(workdir='wkdir',
                     command=['devenv.com', 'pf', '/Rebuild',
                              'cfg', '/Project', 'pj'],
                     env=self.getExpectedEnv(
                         r'C:\Program Files\Microsoft Visual Studio 8',
                         x64=True))
         + 0
     )
     self.expectOutcome(result=SUCCESS,
                        state_string="compile 0 projects 0 files")
     return self.runStep()
Exemple #4
0
    def test_rendering(self):
        self.setupStep(
            vstudio.VC8(projectfile='pf', config='cfg', arch=Property('a')))
        self.properties.setProperty('a', 'x64', 'Test')
        self.expectCommands(
            ExpectShell(workdir='wkdir',
                        command=['devenv.com', 'pf', '/Rebuild', 'cfg'],
                        env=self.getExpectedEnv(
                            r'C:\Program Files\Microsoft Visual Studio 8',
                            x64=True))  # property has expected effect
            + 0)
        self.expectOutcome(result=SUCCESS,
                           state_string="compile 0 projects 0 files")
        yield self.runStep()

        self.assertEqual(self.step.arch, 'x64')
Exemple #5
0
 def test_rendering(self):
     self.setupStep(vstudio.VC8(projectfile='pf', config='cfg',
                                 arch=Property('a')))
     self.properties.setProperty('a', 'x64', 'Test')
     self.expectCommands(
         ExpectShell(workdir='wkdir', usePTY='slave-config',
                     command=['devenv.com', 'pf', '/Rebuild', 'cfg'],
                     env=self.getExpectedEnv(
                         r'C:\Program Files\Microsoft Visual Studio 8',
                         x64=True)) # property has expected effect
         + 0
     )
     self.expectOutcome(result=SUCCESS,
             status_text=["compile", "0 projects", "0 files"])
     d = self.runStep()
     def check_props(_):
         self.assertEqual(self.step.arch, 'x64')
     d.addCallback(check_props)
     return d