[runmany] Delete
This is unused.
There are no owners listed.
Change-Id: Icee4eb3fbb8459db5f9d52c514781baed6ef04b9
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/693824
Fuchsia-Auto-Submit: Shai Barack <shayba@google.com>
Reviewed-by: Steve Austin <steveaustin@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/bundles/BUILD.gn b/bundles/BUILD.gn
index b299799..3ff0a34 100644
--- a/bundles/BUILD.gn
+++ b/bundles/BUILD.gn
@@ -43,7 +43,6 @@
"//src/sys/run_test_suite",
"//src/sys/tools/activity-ctl",
"//src/sys/tools/log",
- "//src/sys/tools/runmany",
"//src/ui/tools:scenic",
"//src/ui/tools/tiles_ctl",
"//third_party/boringssl:boringssl_tool",
diff --git a/sdk/bundles/BUILD.gn b/sdk/bundles/BUILD.gn
index 73d9c02..6e10191 100644
--- a/sdk/bundles/BUILD.gn
+++ b/sdk/bundles/BUILD.gn
@@ -28,7 +28,6 @@
"//src/graphics/lib/magma:magma-tools",
"//src/recovery/factory_reset:tools",
"//src/sys/pkg/bin/pm:host",
- "//src/sys/tools/runmany",
"//src/ui/tools:scenic",
"//src/ui/tools/tiles_ctl",
"//third_party/curl",
diff --git a/src/sys/tools/runmany/BUILD.gn b/src/sys/tools/runmany/BUILD.gn
deleted file mode 100644
index 1c41ee0..0000000
--- a/src/sys/tools/runmany/BUILD.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright 2018 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//build/components.gni")
-
-fuchsia_shell_package("runmany") {
- deps = [ ":runmany_bin" ]
-}
-
-executable("runmany_bin") {
- output_name = "runmany"
- sources = [ "src/runmany.c" ]
- deps = [
- "//sdk/lib/fdio",
- "//zircon/system/ulib/zx",
- ]
-}
diff --git a/src/sys/tools/runmany/src/runmany.c b/src/sys/tools/runmany/src/runmany.c
deleted file mode 100644
index 47f83d7..0000000
--- a/src/sys/tools/runmany/src/runmany.c
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2018 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <lib/fdio/io.h>
-#include <lib/fdio/spawn.h>
-#include <poll.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <zircon/process.h>
-#include <zircon/syscalls.h>
-
-#define INBUFLEN (256)
-
-zx_handle_t run_process(zx_handle_t job, int argc, const char* const* argv) {
- zx_handle_t process = ZX_HANDLE_INVALID;
-
- fdio_spawn_action_t actions[] = {
- // stdin needed to control jobs
- {.action = FDIO_SPAWN_ACTION_CLONE_FD,
- .fd = {.local_fd = STDOUT_FILENO, .target_fd = STDOUT_FILENO}},
- {.action = FDIO_SPAWN_ACTION_CLONE_FD,
- .fd = {.local_fd = STDERR_FILENO, .target_fd = STDERR_FILENO}},
- };
- size_t actions_count = sizeof(actions) / sizeof(actions[0]);
-
- char err_msg[FDIO_SPAWN_ERR_MSG_MAX_LENGTH];
- zx_status_t status =
- fdio_spawn_etc(job,
- FDIO_SPAWN_CLONE_JOB | FDIO_SPAWN_DEFAULT_LDSVC | FDIO_SPAWN_CLONE_NAMESPACE |
- FDIO_SPAWN_CLONE_ENVIRON,
- argv[0], argv, NULL, actions_count, actions, &process, err_msg);
- if (status != ZX_OK) {
- fprintf(stderr, "spawn failed: %s: %d\n", err_msg, status);
- return ZX_HANDLE_INVALID;
- }
- return process;
-}
-
-void kill_job(zx_handle_t job) {
- zx_status_t status = zx_task_kill(job);
- if (status != ZX_OK) {
- fprintf(stderr, "failed to kill job - err = %d\n", status);
- }
-}
-
-int main(int argc, const char* const* argv) {
- char inbuf[INBUFLEN];
- bool readmore = true;
- zx_status_t status;
- zx_handle_t job;
-
- int process_count;
- if (argc < 3 || (process_count = atoi(argv[1])) < 1) {
- printf("usage: %s <n> full-path-to-exec args...\n", argv[0]);
- return -1;
- }
-
- // set up jobs
- printf("starting %d processes\n", process_count);
- status = zx_job_create(zx_job_default(), 0, &job);
- if (status != ZX_OK) {
- fprintf(stderr, "zx_job_create failed - error %d\n", status);
- return -1;
- }
- for (int i = 0; i < process_count; i++) {
- zx_handle_t proc = run_process(job, argc - 2, argv + 2);
- if (!proc) {
- kill_job(job);
- printf("problem creating a process - shutting down\n");
- return -1;
- }
- }
-
- printf("enter q <return> to finish\n");
-
- while (readmore) {
- if (fgets(inbuf, INBUFLEN, stdin)) {
- if (feof(stdin) || strcmp("q\n", inbuf) == 0) {
- readmore = false;
- }
- }
- }
-
- kill_job(job);
-
- return 0;
-}
diff --git a/tools/devshell/lib/metrics.sh b/tools/devshell/lib/metrics.sh
index 75bf246..e7eeb7f 100755
--- a/tools/devshell/lib/metrics.sh
+++ b/tools/devshell/lib/metrics.sh
@@ -117,7 +117,6 @@
"shell run_yuv_to_image_pipe_benchmark.sh"
"shell run-test-component"
"shell run-test-suite"
- "shell runmany"
"shell scp"
"shell screencap"
"shell sed"