Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Unified Diff: pkg/checked_mirrors/test/copy_tests.sh

Issue 111643015: Preliminary checked mirrors (not ready for review yet) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/checked_mirrors/test/copy_tests.sh
diff --git a/pkg/checked_mirrors/test/copy_tests.sh b/pkg/checked_mirrors/test/copy_tests.sh
new file mode 100644
index 0000000000000000000000000000000000000000..6b0d99230db5bfb602272dfc3ec47b75facac3de
--- /dev/null
+++ b/pkg/checked_mirrors/test/copy_tests.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# This script generates all tests under pkg/checked_mirrors/test/from_sdk/ by
+# coping the tests from tests/lib/mirrors/ and replacing the imports to use this
+# package instead.
+#
+# The pkg.status file contains the same status exclusions as dart:mirrors for
+# the vm and dartium. Tests are skipped in dart2js as this package is inteded to
+# be used only during development.
+#
+# TODO(sigmund): can we do this without copying?
+set -e
+
+echo "cp tests/lib/mirrors/* pkg/checked_mirrors/test/from_sdk"
+rm pkg/checked_mirrors/test/from_sdk/*
+cp tests/lib/mirrors/* pkg/checked_mirrors/test/from_sdk
+
+files=`find pkg/checked_mirrors/test/from_sdk/ -name "*.dart"`
+
+echo "replace 'dart:mirrors' with 'package:checked_mirrors/checked_mirrors.dart'"
+sed -i "s/import 'dart:mirrors/import 'package:checked_mirrors\/checked_mirrors.dart/" $files
+
+# some tests use unittest or a "light" unittest and they use a relative path to
+# include it.
+# TODO(sigmund): find out if that should be fixed directly in the tests.
+echo "replace references to unittest"
+sed -i "s/import '..\/..\/..\/pkg\/unittest\/lib/import 'package:unittest/" $files
+sed -i "s/import '..\/..\/light_unittest.dart/import 'package:unittest\/unittest.dart/" $files
« no previous file with comments | « pkg/checked_mirrors/test/checked_mirrors_test.dart ('k') | pkg/checked_mirrors/test/from_sdk/abstract_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698