mirror of
https://gitee.com/openharmony/third_party_libuv
synced 2025-02-11 06:56:20 +00:00
编译test目录下unittest的文件,修改一些在ohos上编译不过的问题
Signed-off-by: wangshi <wangshi@kaihong.com>
This commit is contained in:
parent
63928d97b7
commit
5cf27a9253
@ -65,13 +65,6 @@ typedef BOOL (WINAPI *sCompareObjectHandles)(_In_ HANDLE, _In_ HANDLE);
|
|||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
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);
|
platform_init(argc, argv);
|
||||||
argv = uv_setup_args(argc, argv);
|
argv = uv_setup_args(argc, argv);
|
||||||
|
|
||||||
|
@ -109,7 +109,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
|
|||||||
args[n++] = NULL;
|
args[n++] = NULL;
|
||||||
|
|
||||||
stdout_file = fopen("/data/local/tmp/test.txt", "w+");
|
stdout_file = fopen("/data/local/tmp/test.txt", "w+");
|
||||||
//stdout_file = tmpfile();
|
|
||||||
stdout_fd = fileno(stdout_file);
|
stdout_fd = fileno(stdout_file);
|
||||||
if (!stdout_file) {
|
if (!stdout_file) {
|
||||||
perror("tmpfile");
|
perror("tmpfile");
|
||||||
@ -143,8 +142,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) {
|
|||||||
/* child */
|
/* child */
|
||||||
if (is_helper)
|
if (is_helper)
|
||||||
closefd(pipefd[0]);
|
closefd(pipefd[0]);
|
||||||
//dup2(stdout_fd, STDOUT_FILENO);
|
|
||||||
//dup2(stdout_fd, STDERR_FILENO);
|
|
||||||
execve(args[0], args, environ);
|
execve(args[0], args, environ);
|
||||||
perror("execve()");
|
perror("execve()");
|
||||||
_exit(127);
|
_exit(127);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
#include "../src/idna.h"
|
#include "../src/idna.h"
|
||||||
//#include "../src/idna.c"
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
TEST_IMPL(utf8_decode1) {
|
TEST_IMPL(utf8_decode1) {
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../src/strscpy.h"
|
#include "../src/strscpy.h"
|
||||||
//#include "../src/strscpy.c"
|
|
||||||
|
|
||||||
TEST_IMPL(strscpy) {
|
TEST_IMPL(strscpy) {
|
||||||
char d[4];
|
char d[4];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user