File: ppc_skip_test_ts_py.patch

package info (click to toggle)
petsc4py 3.22.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,396 kB
  • sloc: python: 12,130; ansic: 1,699; makefile: 342; f90: 313; sh: 14
file content (42 lines) | stat: -rw-r--r-- 1,451 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Author: Drew Parsons <dparsons@debian.org>
Description: skip several tests on ppc due to segfaults
Forwarded: https://gitlab.com/petsc/petsc4py/-/issues/4

Index: petsc4py/test/test_ts_py.py
===================================================================
--- petsc4py.orig/test/test_ts_py.py	2024-08-27 18:30:22.130391312 +0200
+++ petsc4py/test/test_ts_py.py	2024-08-27 18:30:22.122391241 +0200
@@ -2,6 +2,9 @@
 from petsc4py import PETSc
 from sys import getrefcount
 
+import platform
+test_machine = platform.machine()
+
 # --------------------------------------------------------------------
 
 
@@ -94,6 +97,7 @@
         pytype = f'{ctx.__module__}.{type(ctx).__name__}'
         self.assertTrue(self.ts.getPythonType() == pytype)
 
+    @unittest.skipIf('ppc' in test_machine, "testSolve segfaults on ppc arches")
     def testSolve(self):
         ts = self.ts
         ts.setProblemType(ts.ProblemType.NONLINEAR)
@@ -134,6 +138,7 @@
         self.assertTrue('__ifunction__' in dct)
         self.assertTrue('__ijacobian__' in dct)
 
+    @unittest.skipIf('ppc' in test_machine, "indirectly triggers segfault on ppc arches")
     def testFDColor(self):
         #
         ts = self.ts
@@ -165,6 +170,7 @@
         ts.solve(u)
         self.nsolve += 1
 
+    @unittest.skipIf('ppc' in test_machine, "testResetAndSolve segfaults on ppc arches")
     def testResetAndSolve(self):
         self.ts.reset()
         self.ts.setStepNumber(0)