forked from cory/tildefriends
		
	Some workarounds for Haiku. uv_fs_scandir can't tell if a dirent is a file. setrlimit doesn't do anything productive for us.
This commit is contained in:
		| @@ -128,7 +128,11 @@ static void _tf_ssb_import_recursive_add_files(tf_ssb_t* ssb, uv_loop_t* loop, J | |||||||
| 		uv_dirent_t ent; | 		uv_dirent_t ent; | ||||||
| 		while (uv_fs_scandir_next(&req, &ent) == 0) | 		while (uv_fs_scandir_next(&req, &ent) == 0) | ||||||
| 		{ | 		{ | ||||||
| 			if (ent.type == UV_DIRENT_FILE) | 			if (ent.type == UV_DIRENT_FILE | ||||||
|  | #if defined(__HAIKU__) | ||||||
|  | 			|| ent.type == UV_DIRENT_UNKNOWN | ||||||
|  | #endif | ||||||
|  | 			) | ||||||
| 			{ | 			{ | ||||||
| 				size_t len = strlen(path) + strlen(ent.name) + 2; | 				size_t len = strlen(path) + strlen(ent.name) + 2; | ||||||
| 				char* full_path = tf_malloc(len); | 				char* full_path = tf_malloc(len); | ||||||
|   | |||||||
| @@ -58,6 +58,7 @@ static void _test_nop(const tf_test_options_t* options) | |||||||
| 	assert(WEXITSTATUS(result) == 0); | 	assert(WEXITSTATUS(result) == 0); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #if !defined(__HAIKU__) | ||||||
| static void _test_sandbox(const tf_test_options_t* options) | static void _test_sandbox(const tf_test_options_t* options) | ||||||
| { | { | ||||||
| 	_write_file("out/test.js", | 	_write_file("out/test.js", | ||||||
| @@ -91,6 +92,7 @@ static void _test_sandbox(const tf_test_options_t* options) | |||||||
| 	unlink("out/test.js"); | 	unlink("out/test.js"); | ||||||
| 	unlink("out/child.js"); | 	unlink("out/child.js"); | ||||||
| } | } | ||||||
|  | #endif | ||||||
|  |  | ||||||
| static void _test_child(const tf_test_options_t* options) | static void _test_child(const tf_test_options_t* options) | ||||||
| { | { | ||||||
| @@ -881,7 +883,9 @@ void tf_tests(const tf_test_options_t* options) | |||||||
| 	_tf_test_run(options, "ssb_id", tf_ssb_test_id_conversion, false); | 	_tf_test_run(options, "ssb_id", tf_ssb_test_id_conversion, false); | ||||||
| 	_tf_test_run(options, "ssb_following", tf_ssb_test_following, false); | 	_tf_test_run(options, "ssb_following", tf_ssb_test_following, false); | ||||||
| 	_tf_test_run(options, "nop", _test_nop, false); | 	_tf_test_run(options, "nop", _test_nop, false); | ||||||
|  | #if !defined(__HAIKU__) | ||||||
| 	_tf_test_run(options, "sandbox", _test_sandbox, false); | 	_tf_test_run(options, "sandbox", _test_sandbox, false); | ||||||
|  | #endif | ||||||
| 	_tf_test_run(options, "child", _test_child, false); | 	_tf_test_run(options, "child", _test_child, false); | ||||||
| 	_tf_test_run(options, "promise", _test_promise, false); | 	_tf_test_run(options, "promise", _test_promise, false); | ||||||
| 	_tf_test_run(options, "promise_remote_throw", _test_promise_remote_throw, false); | 	_tf_test_run(options, "promise_remote_throw", _test_promise_remote_throw, false); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user