From d9bd2df22486a3906f3dc38f0b2a42dad697fad6 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Tue, 17 Sep 2024 15:20:55 -0400 Subject: [PATCH] debug --- library_generation/generate_repo.py | 6 ++++++ library_generation/test/integration_tests.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/library_generation/generate_repo.py b/library_generation/generate_repo.py index e61d462cf4..d11a8ae9ca 100755 --- a/library_generation/generate_repo.py +++ b/library_generation/generate_repo.py @@ -12,6 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import os import shutil import library_generation.utils.utilities as util @@ -48,7 +49,12 @@ def generate_from_yaml( gen_config=config, library_config=target_libraries, repo_path=repository_path ) # copy api definition to output folder. + print( + f"Copy api definition from {api_definition_path} to {repo_config.output_folder}" + ) shutil.copytree(api_definition_path, repo_config.output_folder, dirs_exist_ok=True) + print(f"List files in {repo_config.output_folder}") + os.listdir(repo_config.output_folder) for library_path, library in repo_config.get_libraries().items(): print(f"generating library {library.get_library_name()}") diff --git a/library_generation/test/integration_tests.py b/library_generation/test/integration_tests.py index b7e37876bb..9e1c40caa8 100644 --- a/library_generation/test/integration_tests.py +++ b/library_generation/test/integration_tests.py @@ -202,6 +202,8 @@ def __copy_api_definition(cls, committish: str) -> str: shutil.copytree(f"{repo_dest}/google", api_temp_dir, dirs_exist_ok=True) shutil.copytree(f"{repo_dest}/grafeas", api_temp_dir, dirs_exist_ok=True) shutil.rmtree(repo_dest) + print(f"List files and dirs in {api_temp_dir}") + os.listdir(api_temp_dir) return api_temp_dir @classmethod