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

Unified Diff: samples/tests/samples/testcfg.py

Issue 8274034: Make the sample tests run using the standard test configuration (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 months 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
« no previous file with comments | « samples/tests/samples/src/chat/HttpTest.dart ('k') | samples/tests/src/chat/chat_server_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/tests/samples/testcfg.py
diff --git a/samples/tests/samples/testcfg.py b/samples/tests/samples/testcfg.py
index 1c950622a0a8214785bd220466cf71a2410bdafe..b7d3e13f3c4fda7a9130ac676a6d6cbe167d9853 100644
--- a/samples/tests/samples/testcfg.py
+++ b/samples/tests/samples/testcfg.py
@@ -2,34 +2,7 @@
# 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.
-import os
-
-from testing import test_configuration, test_case
-
-class SamplesTestConfiguration(test_configuration.StandardTestConfiguration):
- def __init__(self, context, root):
- super(SamplesTestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, arch):
- tests = []
- src_dir = os.path.join(self.root[:-7], "src")
- for root, dirs, files in os.walk(src_dir):
- ignore_dirs = [d for d in dirs if d.startswith('.')]
- for d in ignore_dirs:
- dirs.remove(d)
- for f in [x for x in files if self.IsTest(x)]:
- test_path = current_path + [ f[:-5] ] # Remove .dart suffix.
- if not self.Contains(path, test_path):
- continue
- tests.append(test_case.StandardTestCase(self.context,
- test_path,
- os.path.join(root, f),
- mode,
- arch))
- return tests
-
- def IsTest(self, name):
- return name.endswith('_test.dart')
+from testing import test_configuration
def GetConfiguration(context, root):
- return SamplesTestConfiguration(context, root)
+ return test_configuration.StandardTestConfiguration(context, root)
« no previous file with comments | « samples/tests/samples/src/chat/HttpTest.dart ('k') | samples/tests/src/chat/chat_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698