File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535import unittest
3636import subprocess
3737import os
38- from .autotuner_test_utils import AutoTunerTestUtils
38+ from .autotuner_test_utils import AutoTunerTestUtils , accepted_rc
3939
4040cur_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
8989if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments