示例#1
0
 def main(self):
   """
   Run the application.
   """
   from pylith.utils.PetscManager import PetscManager
   manager = PetscManager()
   manager.initialize()
   unittest.TextTestRunner(verbosity=2).run(self._suite())
   manager.finalize()
   return
示例#2
0
  def main(self, *args, **kwds):
    """
    Run the application.
    """
    from pylith.utils.PetscManager import PetscManager
    manager = PetscManager()
    manager.initialize()

    self._runTest()

    manager.finalize()
    return
示例#3
0
 def test_initfinal(self):
     """
 Test initialize/finalize.
 """
     from pylith.utils.PetscManager import PetscManager
     from pylith.utils.petsc import optionsSetValue
     manager = PetscManager()
     manager.options = [("vec_type", "seq")]
     manager.initialize()
     manager.finalize()
     return
示例#4
0
    def main(self):
        """
    Run the application.
    """
        from pylith.utils.PetscManager import PetscManager
        petsc = PetscManager()
        petsc.options = [("malloc_dump", "true")]
        petsc.initialize()

        unittest.TextTestRunner(verbosity=2).run(self._suite())

        petsc.finalize()
        return
示例#5
0
 def test_initfinal(self):
   """
   Test initialize/finalize.
   """
   from pylith.utils.PetscManager import PetscManager
   from pylith.utils.petsc import optionsSetValue
   manager = PetscManager()
   manager.options = [("vec_type", "seq")]
   manager.initialize()
   manager.finalize()
   return
示例#6
0
  def main(self):
    """
    Run the application.
    """
    from pylith.utils.PetscManager import PetscManager
    petsc = PetscManager()
    petsc.options = [("malloc_dump", "true")]
    petsc.initialize()

    unittest.TextTestRunner(verbosity=2).run(self._suite())

    petsc.finalize()
    return
示例#7
0
    def main(self):
        """
    Run the application.
    """
        from pylith.utils.PetscManager import PetscManager
        petsc = PetscManager()
        petsc.options = self.petscOptions
        petsc.initialize()

        success = unittest.TextTestRunner(verbosity=2).run(
            self._suite()).wasSuccessful()

        petsc.finalize()

        if not success:
            import sys
            sys.exit(1)
        return
示例#8
0
  def main(self):
    """
    Run the application.
    """
    from pylith.utils.PetscManager import PetscManager
    petsc = PetscManager()
    petsc.options = self.petscOptions
    petsc.initialize()

    success = unittest.TextTestRunner(verbosity=2).run(self._suite()).wasSuccessful()
    
    petsc.finalize()

    if not success:
      import sys
      sys.exit(1)
    return
示例#9
0
    def main(self):
        """Run the application.
        """
        if self.cov:
            self.cov.start()

        from pylith.utils.PetscManager import PetscManager
        petsc = PetscManager()
        petsc.initialize()

        success = unittest.TextTestRunner(verbosity=2).run(
            self._suite()).wasSuccessful()

        petsc.finalize()

        if not success:
            sys.exit(1)

        if self.cov:
            self.cov.stop()
            self.cov.save()
            self.cov.report()
            self.cov.xml_report(outfile="coverage.xml")
示例#10
0
        if PetscVersion.isRelease():
            pass
        else:
            self.assertFalse(len(branch) == 0)
        return

    def test_petscDir(self):
        dir = PetscVersion.petscDir()
        self.assertFalse(len(dir) == 0)
        return

    def test_petscArch(self):
        arch = PetscVersion.petscArch()
        # Prefix builds set PETSC_ARCH to empty string, so no verification of string length.
        return


if __name__ == "__main__":
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestPetscVersion))

    from pylith.utils.PetscManager import PetscManager
    petsc = PetscManager()
    petsc.initialize()

    success = unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful()

    petsc.finalize()

# End of file