From d9d939c72d2651045f6e93592707531f5f5aa79f Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 19 Dec 2024 15:19:10 +0800 Subject: [PATCH] ci: fix testing for https://github.com/MaaXYZ/MaaFramework/pull/476 --- .github/workflows/test.yml | 12 ++++++------ test/python/binding_test.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6ea8cb94..4a8a8dd91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -123,8 +123,8 @@ jobs: - name: Run Python testing shell: bash run: | - python3 -m pip install -r ./install/binding/Python/requirements.txt - python3 ./test/python/binding_test.py ./install + python3 -m pip install -r ./source/binding/Python/requirements.txt + python3 ./test/python/binding_test.py ./source/binding/Python ./install/bin - name: Run NodeJS testing shell: bash @@ -247,8 +247,8 @@ jobs: run: | python3 -m venv .venv source .venv/bin/activate - python3 -m pip install -r ./install/binding/Python/requirements.txt - python3 ./test/python/binding_test.py ./install + python3 -m pip install -r ./source/binding/Python/requirements.txt + python3 ./test/python/binding_test.py ./source/binding/Python ./install/bin - name: Run NodeJS testing shell: bash @@ -362,8 +362,8 @@ jobs: run: | python3 -m venv .venv source .venv/bin/activate - python3 -m pip install -r ./install/binding/Python/requirements.txt - python3 ./test/python/binding_test.py ./install + python3 -m pip install -r ./source/binding/Python/requirements.txt + python3 ./test/python/binding_test.py ./source/binding/Python ./install/bin - name: Run NodeJS testing shell: bash diff --git a/test/python/binding_test.py b/test/python/binding_test.py index 8e7026fbb..5217c0cb2 100644 --- a/test/python/binding_test.py +++ b/test/python/binding_test.py @@ -4,16 +4,16 @@ import numpy -if len(sys.argv) < 2: - print("Usage: python binding_test.py ") +if len(sys.argv) < 3: + print("Usage: python binding_test.py ") sys.exit(1) -install_dir = Path(sys.argv[1]).resolve() -binding_dir = Path(install_dir, "binding", "Python") +binding_dir = Path(sys.argv[1]).resolve() +bin_dir = Path(sys.argv[2]).resolve() -os.environ["MAAFW_BINARY_PATH"] = str(f"{install_dir}/bin") -print(f"install_dir: {install_dir}") +os.environ["MAAFW_BINARY_PATH"] = str(f"bin_dir") print(f"binding_dir: {binding_dir}") +print(f"bin_dir: {bin_dir}") if str(binding_dir) not in sys.path: sys.path.insert(0, str(binding_dir))