Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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")
Esempio n. 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