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) |