From c875ff739fd6aed8671e19e6c0a196ce973b6fee Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Mon, 28 Jul 2014 17:26:09 -0300 Subject: [PATCH] avocado.plugins.runner: Change the test lister to the new schema Now tests don't need their own directories. Signed-off-by: Lucas Meneghel Rodrigues --- avocado/plugins/runner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/avocado/plugins/runner.py b/avocado/plugins/runner.py index 8f28cefe..2b28a423 100644 --- a/avocado/plugins/runner.py +++ b/avocado/plugins/runner.py @@ -21,6 +21,7 @@ import os from avocado.plugins import plugin from avocado.core import data_dir from avocado.core import output +from avocado.utils import path from avocado import sysinfo from avocado import job @@ -53,7 +54,12 @@ class TestLister(plugin.Plugin): """ bcolors = output.colors pipe = output.get_paginator() - test_dirs = os.listdir(data_dir.get_test_dir()) + test_files = os.listdir(data_dir.get_test_dir()) + test_dirs = [] + for t in test_files: + inspector = path.PathInspector(path=t) + if inspector.is_python(): + test_dirs.append(t.split('.')[0]) pipe.write(bcolors.header_str('Tests available:')) pipe.write("\n") for test_dir in test_dirs: -- GitLab