File tree Expand file tree Collapse file tree
test/unit/external_repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ def setUpClass(cls):
3939 Copy bazelversion from main, otherwise bazelisk will download the latest
4040 bazel version.
4141 """
42+ # The folder bazel-external_repository contains this script
43+ # and the unittest test discovery finds it.
44+ # This is why, it is imperative that these directories get cleared
45+ cls .run_command ("bazel clean" )
4246 super ().setUpClass ()
4347 try :
4448 shutil .copy ("../../../.bazelversion" , ".bazelversion" )
@@ -49,12 +53,17 @@ def setUpClass(cls):
4953 logging .debug ("No bazel version set, using system default" )
5054 _ , stdout , _ = cls .run_command ("bazel --version" )
5155 cls .BAZEL_VERSION = stdout .split (' ' )[2 ].strip ()
56+ logging .debug (cls .BAZEL_VERSION )
5257
5358 @final
5459 @classmethod
5560 def tearDownClass (cls ):
5661 """Remove bazelversion from this test"""
5762 super ().tearDownClass ()
63+ # The folder bazel-external_repository contains this script
64+ # and the unittest test discovery finds it.
65+ # This is why, it is imperative that these directories get cleared
66+ cls .run_command ("bazel clean" )
5867 try :
5968 os .remove (".bazelversion" )
6069 except :
You can’t perform that action at this time.
0 commit comments