@@ -79,23 +79,23 @@ function run_data_compression_infer_client() {
79
79
local python_or_cpp=` echo -n " $client_path " | tail -c 3`
80
80
if [ " $python_or_cpp " == " .py" ]; then
81
81
local infer_client=" python $client_path "
82
- local request_algorithm_parameter =" --request-compression-algorithm $request_algorithm "
83
- local response_algorithm_parameter =" --response-compression-algorithm $response_algorithm "
84
- else # C++
82
+ local request_cmd_option =" --request-compression-algorithm $request_algorithm "
83
+ local response_cmd_option =" --response-compression-algorithm $response_algorithm "
84
+ else # C++ if not end with ".py"
85
85
local infer_client=$client_path
86
- local request_algorithm_parameter =" -i $request_algorithm "
87
- local response_algorithm_parameter =" -o $response_algorithm "
86
+ local request_cmd_option =" -i $request_algorithm "
87
+ local response_cmd_option =" -o $response_algorithm "
88
88
fi
89
89
90
- if [ " $request_algorithm " != " " ] && [ " $response_algorithm " == " " ] ; then
91
- $infer_client -v $request_algorithm_parameter >> $log_path 2>&1
92
- return $?
90
+ local cmd_options= " -v "
91
+ if [ " $request_algorithm " != " " ] ; then
92
+ cmd_options+= " $request_cmd_option "
93
93
fi
94
- if [ " $request_algorithm " == " " ] && [ " $response_algorithm " != " " ]; then
95
- $infer_client -v $response_algorithm_parameter >> $log_path 2>&1
96
- return $?
94
+ if [ " $response_algorithm " != " " ]; then
95
+ cmd_options+=" $response_cmd_option "
97
96
fi
98
- $infer_client -v $request_algorithm_parameter $response_algorithm_parameter >> $log_path 2>&1
97
+
98
+ $infer_client $cmd_options >> $log_path 2>&1
99
99
return $?
100
100
}
101
101
0 commit comments