| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <fcntl.h> | 5 #include <fcntl.h> |
| 6 #include <launchpad/launchpad.h> | 6 #include <launchpad/launchpad.h> |
| 7 #include <magenta/syscalls.h> | 7 #include <magenta/syscalls.h> |
| 8 #include <mxio/util.h> | 8 #include <mxio/util.h> |
| 9 #include <pthread.h> | 9 #include <pthread.h> |
| 10 #include <runtime/sysinfo.h> | 10 #include <runtime/sysinfo.h> |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 const char* argv[kArgc]; | 149 const char* argv[kArgc]; |
| 150 | 150 |
| 151 char old_gen_arg[64]; | 151 char old_gen_arg[64]; |
| 152 snprintf(old_gen_arg, sizeof(old_gen_arg), "--old_gen_heap_size=%ld", | 152 snprintf(old_gen_arg, sizeof(old_gen_arg), "--old_gen_heap_size=%ld", |
| 153 kOldGenHeapSizeMB); | 153 kOldGenHeapSizeMB); |
| 154 | 154 |
| 155 argv[0] = kRunVmTestsPath; | 155 argv[0] = kRunVmTestsPath; |
| 156 argv[1] = old_gen_arg; | 156 argv[1] = old_gen_arg; |
| 157 argv[2] = test_name; | 157 argv[2] = test_name; |
| 158 | 158 |
| 159 mx_handle_t p = launchpad_launch(argv[0], kArgc, argv); | 159 mx_handle_t p = launchpad_launch_mxio(argv[0], kArgc, argv); |
| 160 if (p < 0) { | 160 if (p < 0) { |
| 161 fprintf(stderr, "process failed to start\n"); | 161 fprintf(stderr, "process failed to start\n"); |
| 162 return -1; | 162 return -1; |
| 163 } | 163 } |
| 164 | 164 |
| 165 mx_signals_state_t state; | 165 mx_signals_state_t state; |
| 166 mx_status_t r = mx_handle_wait_one( | 166 mx_status_t r = mx_handle_wait_one( |
| 167 p, MX_SIGNAL_SIGNALED, MX_TIME_INFINITE, &state); | 167 p, MX_SIGNAL_SIGNALED, MX_TIME_INFINITE, &state); |
| 168 if (r != NO_ERROR) { | 168 if (r != NO_ERROR) { |
| 169 fprintf(stderr, "[process(%x): wait failed? %d]\n", p, r); | 169 fprintf(stderr, "[process(%x): wait failed? %d]\n", p, r); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 free(test_list); | 323 free(test_list); |
| 324 pthread_mutex_destroy(&args_mutex); | 324 pthread_mutex_destroy(&args_mutex); |
| 325 | 325 |
| 326 if (test_list_index != lines_count) { | 326 if (test_list_index != lines_count) { |
| 327 fprintf(stderr, "Failed to attempt all the tests!\n"); | 327 fprintf(stderr, "Failed to attempt all the tests!\n"); |
| 328 return -1; | 328 return -1; |
| 329 } | 329 } |
| 330 | 330 |
| 331 return 0; | 331 return 0; |
| 332 } | 332 } |
| OLD | NEW |