make test: Fix too wide subprocess exceptions
When a command fails, CalledProcessError is raised. testing with except: masks other failures. Change-Id: I7e3a6739411cb6a4c13e96dd123aff9159213fea Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
This commit is contained in:

committed by
Ole Trøan

parent
c2b4dc5981
commit
61e63bf4e1
@ -251,7 +251,7 @@ class VCLCutThruTestCase(VCLTestCase):
|
||||
|
||||
try:
|
||||
subprocess.check_output(['iperf3', '-v'])
|
||||
except:
|
||||
except subprocess.CalledProcessError:
|
||||
self.logger.error("WARNING: 'iperf3' is not installed,")
|
||||
self.logger.error(" 'test_ldp_cut_thru_iperf3' not run!")
|
||||
return
|
||||
@ -496,7 +496,7 @@ class VCLThruHostStackIperfTestCase(VCLTestCase):
|
||||
|
||||
try:
|
||||
subprocess.check_output(['iperf3', '-v'])
|
||||
except:
|
||||
except subprocess.CalledProcessError:
|
||||
self.logger.error("WARNING: 'iperf3' is not installed,")
|
||||
self.logger.error(
|
||||
" 'test_ldp_thru_host_stack_iperf3' not run!")
|
||||
@ -811,7 +811,7 @@ class VCLIpv6ThruHostStackIperfTestCase(VCLTestCase):
|
||||
|
||||
try:
|
||||
subprocess.check_output(['iperf3', '-v'])
|
||||
except:
|
||||
except subprocess.CalledProcessError:
|
||||
self.logger.error("WARNING: 'iperf3' is not installed,")
|
||||
self.logger.error(
|
||||
" 'test_ldp_thru_host_stack_iperf3' not run!")
|
||||
|
Reference in New Issue
Block a user