Giacomo Travaglini has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/30236 )

Change subject: ext: Remove dead code in loader.py
......................................................................

ext: Remove dead code in loader.py

This has been tested with vulture:
https://pypi.org/project/vulture

JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-533

Change-Id: I4193eff3ea4194f793547767a47c3ac5a64813fd
Signed-off-by: Giacomo Travaglini <[email protected]>
---
M ext/testlib/loader.py
1 file changed, 0 insertions(+), 14 deletions(-)



diff --git a/ext/testlib/loader.py b/ext/testlib/loader.py
index bb2fe4e..2d76996 100644
--- a/ext/testlib/loader.py
+++ b/ext/testlib/loader.py
@@ -71,7 +71,6 @@
 import sys
 import traceback

-import testlib.configuration as configuration
 import testlib.log as log
 import testlib.suite as suite_mod
 import testlib.test_util as test_mod
@@ -183,9 +182,6 @@
         Load files from the given root directory which match
         `self.filepath_filter`.
         '''
-        if __debug__:
-            self._loaded_a_file = True
-
         for directory in self._discover_files(root):
             directory = list(directory)
             if directory:
@@ -193,13 +189,6 @@
                 for f in directory:
                     self.load_file(f)

-    def load_dir(self, directory):
-        for dir_ in self._discover_files(directory):
-            directory = list(directory)
-            _assert_files_in_same_dir(dir_)
-            for f in dir_:
-                self.load_file(f)
-
     def load_file(self, path):
         path = os.path.abspath(path)

@@ -224,7 +213,6 @@
         sys.path.insert(0, os.path.dirname(path))
         cwd = os.getcwd()
         os.chdir(os.path.dirname(path))
-        configuration.config.file_under_load = path

         new_tests = test_mod.TestCase.collector.create()
         new_suites = suite_mod.TestSuite.collector.create()
@@ -239,7 +227,6 @@
                               'Ignoring all tests in this file.'
                                % (path))
             # Clean up
-            configuration.config.file_under_load = None
             sys.path[:] = old_path
             os.chdir(cwd)
             test_mod.TestCase.collector.remove(new_tests)
@@ -283,7 +270,6 @@
             self.suite_uids.update({suite.uid: suite
                     for suite in loaded_suites})
         # Clean up
-        configuration.config.file_under_load = None
         sys.path[:] = old_path
         os.chdir(cwd)
         test_mod.TestCase.collector.remove(new_tests)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/30236
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4193eff3ea4194f793547767a47c3ac5a64813fd
Gerrit-Change-Number: 30236
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to