Skip to content

Commit 755d29c

Browse files
committed
make test sequential
Signed-off-by: Jack Luar <[email protected]>
1 parent 89b320e commit 755d29c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tools/AutoTuner/test/fast_smoke_test.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import unittest
3636
import subprocess
3737
import os
38-
from .autotuner_test_utils import AutoTunerTestUtils
38+
from .autotuner_test_utils import AutoTunerTestUtils, accepted_rc
3939

4040
cur_dir = os.path.dirname(os.path.abspath(__file__))
4141

@@ -75,15 +75,15 @@ def test(self):
7575
if not (self.platform and self.design):
7676
raise unittest.SkipTest("Platform and design have to be defined")
7777

78-
tune_process = subprocess.Popen(self.tune_command, shell=True)
79-
sweep_process = subprocess.Popen(self.sweep_command, shell=True)
80-
81-
tune_returncode = tune_process.wait()
82-
sweep_returncode = sweep_process.wait()
83-
84-
self.assertEqual(tune_returncode, 0, "Tune command failed")
85-
self.assertEqual(sweep_returncode, 0, "Sweep command failed")
78+
# Run tune command
79+
tune_result = subprocess.run(self.tune_command, shell=True)
80+
tune_successful = tune_result.returncode in accepted_rc
81+
self.assertTrue(tune_successful)
8682

83+
# Run sweep command
84+
sweep_result = subprocess.run(self.sweep_command, shell=True)
85+
sweep_successful = sweep_result.returncode in accepted_rc
86+
self.assertTrue(sweep_successful)
8787

8888

8989
if __name__ == "__main__":

0 commit comments

Comments
 (0)