@@ -20,6 +20,7 @@ def setUp(self):
20
20
21
21
# 0.001 hour translates to 3.6 seconds, which will definitely cause failure.
22
22
timeout_flags = ["--timeout 0.001" , "--timeout_per_trial 0.001" ]
23
+ self .timeout_limit = 15 # 15 second upper limit
23
24
self .commands = [
24
25
"python3 distributed.py"
25
26
f" --design { self .design } "
@@ -45,9 +46,11 @@ class ASAP7TimeoutSmokeTest(BaseTimeoutSmokeTest):
45
46
46
47
def test_timeout (self ):
47
48
for command in self .commands :
48
- out = subprocess .run (command , shell = True , check = True )
49
+ out = subprocess .run (
50
+ command , shell = True , check = True , timeout = self .timeout_limit
51
+ )
49
52
successful = out .returncode == 0
50
- self .assertFalse (successful )
53
+ self .assertTrue (successful )
51
54
52
55
53
56
class SKY130HDTimeoutSmokeTest (BaseTimeoutSmokeTest ):
@@ -56,9 +59,11 @@ class SKY130HDTimeoutSmokeTest(BaseTimeoutSmokeTest):
56
59
57
60
def test_timeout (self ):
58
61
for command in self .commands :
59
- out = subprocess .run (command , shell = True , check = True )
62
+ out = subprocess .run (
63
+ command , shell = True , check = True , timeout = self .timeout_limit
64
+ )
60
65
successful = out .returncode == 0
61
- self .assertFalse (successful )
66
+ self .assertTrue (successful )
62
67
63
68
64
69
class IHPSG13G2TimeoutSmokeTest (BaseTimeoutSmokeTest ):
@@ -67,9 +72,11 @@ class IHPSG13G2TimeoutSmokeTest(BaseTimeoutSmokeTest):
67
72
68
73
def test_timeout (self ):
69
74
for command in self .commands :
70
- out = subprocess .run (command , shell = True , check = True )
75
+ out = subprocess .run (
76
+ command , shell = True , check = True , timeout = self .timeout_limit
77
+ )
71
78
successful = out .returncode == 0
72
- self .assertFalse (successful )
79
+ self .assertTrue (successful )
73
80
74
81
75
82
if __name__ == "__main__" :
0 commit comments