[test]: Add return value for test

Change-Id: I4f64b3ffebda6b966cd898ba317d088be967d5d6
This commit is contained in:
Herman Chen
2016-12-01 14:17:30 +08:00
parent fb718f33fc
commit bbe38e38a7
3 changed files with 9 additions and 7 deletions

View File

@@ -631,6 +631,6 @@ int main(int argc, char **argv)
mpp_err("test failed ret %d\n", ret); mpp_err("test failed ret %d\n", ret);
mpp_env_set_u32("mpi_debug", 0x0); mpp_env_set_u32("mpi_debug", 0x0);
return 0; return ret;
} }

View File

@@ -802,9 +802,9 @@ int main(int argc, char **argv)
mpp_env_set_u32("mpi_debug", cmd->debug); mpp_env_set_u32("mpi_debug", cmd->debug);
mpi_enc_test(cmd); ret = mpi_enc_test(cmd);
mpp_env_set_u32("mpi_debug", 0x0); mpp_env_set_u32("mpi_debug", 0x0);
return 0; return ret;
} }

View File

@@ -33,7 +33,7 @@
int mpi_test() int mpi_test()
{ {
MPP_RET ret; MPP_RET ret = MPP_NOK;
MppCtx ctx = NULL; MppCtx ctx = NULL;
MppApi *mpi = NULL; MppApi *mpi = NULL;
MppEncConfig cfg; MppEncConfig cfg;
@@ -275,20 +275,22 @@ MPP_TEST_FAILED:
mpp_log("mpi_test failed\n"); mpp_log("mpi_test failed\n");
return -1; return ret;
} }
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int ret = 0;
(void)argc; (void)argc;
(void)argv; (void)argv;
mpp_env_set_u32("mpi_debug", 0x1); mpp_env_set_u32("mpi_debug", 0x1);
mpi_test(); ret = mpi_test();
mpp_env_set_u32("mpi_debug", 0x0); mpp_env_set_u32("mpi_debug", 0x0);
return 0; return ret;
} }