diff --git a/test/mpi_dec_test.c b/test/mpi_dec_test.c index 961edc9c..31869180 100644 --- a/test/mpi_dec_test.c +++ b/test/mpi_dec_test.c @@ -631,6 +631,6 @@ int main(int argc, char **argv) mpp_err("test failed ret %d\n", ret); mpp_env_set_u32("mpi_debug", 0x0); - return 0; + return ret; } diff --git a/test/mpi_enc_test.c b/test/mpi_enc_test.c index 0d188c19..bb5ab435 100644 --- a/test/mpi_enc_test.c +++ b/test/mpi_enc_test.c @@ -802,9 +802,9 @@ int main(int argc, char **argv) mpp_env_set_u32("mpi_debug", cmd->debug); - mpi_enc_test(cmd); + ret = mpi_enc_test(cmd); mpp_env_set_u32("mpi_debug", 0x0); - return 0; + return ret; } diff --git a/test/mpi_test.c b/test/mpi_test.c index 7b950063..ba538ac5 100644 --- a/test/mpi_test.c +++ b/test/mpi_test.c @@ -33,7 +33,7 @@ int mpi_test() { - MPP_RET ret; + MPP_RET ret = MPP_NOK; MppCtx ctx = NULL; MppApi *mpi = NULL; MppEncConfig cfg; @@ -275,20 +275,22 @@ MPP_TEST_FAILED: mpp_log("mpi_test failed\n"); - return -1; + return ret; } int main(int argc, char **argv) { + int ret = 0; + (void)argc; (void)argv; mpp_env_set_u32("mpi_debug", 0x1); - mpi_test(); + ret = mpi_test(); mpp_env_set_u32("mpi_debug", 0x0); - return 0; + return ret; }