编译test目录下unittest的文件,修改一些在ohos上编译不过的问题

Signed-off-by: wangshi <wangshi@kaihong.com>
This commit is contained in:
wangshi 2022-11-11 09:11:30 +08:00
parent 63928d97b7
commit 5cf27a9253
4 changed files with 0 additions and 12 deletions

View File

@ -65,13 +65,6 @@ typedef BOOL (WINAPI *sCompareObjectHandles)(_In_ HANDLE, _In_ HANDLE);
int main(int argc, char **argv) {
#ifndef _WIN32
// if (0 == geteuid() && NULL == getenv("UV_RUN_AS_ROOT")) {
// fprintf(stderr, "The libuv test suite cannot be run as root.\n");
// return EXIT_FAILURE;
// }
#endif
platform_init(argc, argv);
argv = uv_setup_args(argc, argv);

View File

@ -109,7 +109,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
args[n++] = NULL;
stdout_file = fopen("/data/local/tmp/test.txt", "w+");
//stdout_file = tmpfile();
stdout_fd = fileno(stdout_file);
if (!stdout_file) {
perror("tmpfile");
@ -143,8 +142,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
/* child */
if (is_helper)
closefd(pipefd[0]);
//dup2(stdout_fd, STDOUT_FILENO);
//dup2(stdout_fd, STDERR_FILENO);
execve(args[0], args, environ);
perror("execve()");
_exit(127);

View File

@ -21,7 +21,6 @@
#include "task.h"
#include "../src/idna.h"
//#include "../src/idna.c"
#include <string.h>
TEST_IMPL(utf8_decode1) {

View File

@ -24,7 +24,6 @@
#include <string.h>
#include "../src/strscpy.h"
//#include "../src/strscpy.c"
TEST_IMPL(strscpy) {
char d[4];