summaryrefslogtreecommitdiff
path: root/generate-status-object.php
diff options
context:
space:
mode:
Diffstat (limited to 'generate-status-object.php')
-rw-r--r--generate-status-object.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/generate-status-object.php b/generate-status-object.php
deleted file mode 100644
index 9d19070..0000000
--- a/generate-status-object.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-
-if (empty($argv[1])) {
- file_put_contents("php://stderr", "No runner ID specified");
- exit(1);
-}
-
-define("WORK_DIR", __DIR__ . "/_runners/" . $argv[1] . "/results");
-
-function get(string $name): ?string {
- $file = WORK_DIR . "/" . $name;
- if (!is_file($file))
- return null;
- return file_get_contents($file);
-}
-
-$data = [
- "compile" => [
- "status" => get("c.s"),
- "stdout" => get("c.0"),
- "stderr" => get("c.1"),
- ],
- "run" => [
- "status" => get("r.s"),
- "stdout" => get("r.0"),
- "stderr" => get("r.1"),
- ],
-];
-
-echo json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT) . PHP_EOL;