[dart] Delete left-over scripts
This have been moved to //build/dart
Change-Id: Iccd64c2cb6a28e73e7005627981744cad6b9286c
diff --git a/runtime/dart/gen_dart_test_invocation.py b/runtime/dart/gen_dart_test_invocation.py
deleted file mode 100755
index f84b101..0000000
--- a/runtime/dart/gen_dart_test_invocation.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2019 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 argparse
-import os
-import stat
-import string
-import sys
-
-def main():
- parser = argparse.ArgumentParser(
- description='Generate a script that invokes a Dart application')
- parser.add_argument('--wd',
- help='Path to the working directory, relative to that of the script',
- required=True)
- parser.add_argument('--out',
- help='Path to the invocation file to generate',
- required=True)
- parser.add_argument('--dart',
- help='Path to the Dart binary, relative to the working directory',
- required=True)
- parser.add_argument('--snapshot',
- help='path to the binary snapshot, relative to the working directory',
- required=True)
- args = parser.parse_args()
-
- app_file = args.out
- app_path = os.path.dirname(app_file)
- if not os.path.exists(app_path):
- os.makedirs(app_path)
-
- script_template = string.Template('''#!/bin/sh
-# DO NOT EDIT
-# This script is generated by:
-# //topaz/runtime/dart/gen_dart_test_invocation.py
-
-cd "$$(dirname $$0)/$wd"
-
-$dart \\
- $snapshot \\
- "$$@"
-''')
- with open(app_file, 'w') as file:
- file.write(script_template.substitute(args.__dict__))
- permissions = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
- stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP |
- stat.S_IROTH)
- os.chmod(app_file, permissions)
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/runtime/dart/group_tests.py b/runtime/dart/group_tests.py
deleted file mode 100755
index 2dbef52..0000000
--- a/runtime/dart/group_tests.py
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2019 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 argparse
-import os
-import stat
-import string
-import sys
-
-def main():
- parser = argparse.ArgumentParser(
- description='Generates a grouped dart test file from individual tests')
- parser.add_argument('--out',
- help='Path to the invocation file to generate',
- required=True)
- parser.add_argument('--source',
- help='Path to a dart source file. Will be ignored if the file does not end in _test.dart',
- action='append',
- required=True)
- args = parser.parse_args()
-
- grouped_test = args.out
- grouped_test_dir = os.path.dirname(grouped_test)
- if not os.path.exists(grouped_test_dir):
- os.makedirs(grouped_test_dir)
-
- tests = filter(lambda src: src.endswith('_test.dart'), args.source)
- imports = ["import 'package:test/test.dart';"]
- invocations = []
- for test in tests:
- filename = os.path.splitext(os.path.basename(test))[0]
- imports.append("import '%s' as %s;" % (test, filename))
- invocations.append("group('%s', %s.main);" % (filename, filename))
-
- contents = '''// DO NOT EDIT
-// This script is generated by:
-// //topaz/runtime/dart/group_tests.py
-
-%s
-void main() {
- %s
-}''' % ('\n'.join(imports), '\n '.join(invocations))
-
- with open(grouped_test, 'w') as file:
- file.write(contents)
- permissions = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
- stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP |
- stat.S_IROTH)
- os.chmod(grouped_test, permissions)
-
-
-if __name__ == '__main__':
- sys.exit(main())