Browse Source

Fix broken "run_tests.py" script

Yentl Van Tendeloo 6 years ago
parent
commit
0d7e5b2eb4
2 changed files with 7 additions and 4 deletions
  1. 4 1
      scripts/flush_compiler_caches.py
  2. 3 3
      scripts/run_tests.py

+ 4 - 1
scripts/flush_compiler_caches.py

@@ -6,7 +6,10 @@ def flush(pattern):
             print("Remove: %s" % os.path.join(root, file))
             print("Remove: %s" % os.path.join(root, file))
             os.remove(os.path.join(root, file))
             os.remove(os.path.join(root, file))
 
 
-if __name__ == "__main__":
+def flush_all():
     flush("^.*\.pickle$")
     flush("^.*\.pickle$")
     flush("^.*\.pyc$")
     flush("^.*\.pyc$")
     flush("^.*\.pyo$")
     flush("^.*\.pyo$")
+
+if __name__ == "__main__":
+    flush_all()

+ 3 - 3
scripts/run_tests.py

@@ -1,9 +1,9 @@
-from flush_compiler_caches import flush
+from flush_compiler_caches import flush_all
 from generate_bootstrap import bootstrap
 from generate_bootstrap import bootstrap
 import subprocess
 import subprocess
 import sys
 import sys
 
 
-flush()
+flush_all()
 
 
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="state")
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="state")
 
 
@@ -11,7 +11,7 @@ bootstrap()
 
 
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="kernel")
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="kernel")
 
 
-flush()
+flush_all()
 
 
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="interface/HUTN")
 subprocess.check_call([sys.executable, "-m", "pytest"], cwd="interface/HUTN")