From 1c0f25138501813923dea0af4282275d5f3e2541 Mon Sep 17 00:00:00 2001 From: "Charles K. Neimog" Date: Sun, 10 Dec 2023 14:09:00 -0800 Subject: [PATCH] fix tests for MacOS --- .github/workflows/Builder.yml | 14 ++++++++++---- .gitignore | 2 ++ test/runTests.py | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Builder.yml b/.github/workflows/Builder.yml index 6238301b..c93fb331 100644 --- a/.github/workflows/Builder.yml +++ b/.github/workflows/Builder.yml @@ -122,17 +122,24 @@ jobs: - name: set Enviroment run: | brew install --cask pd - python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))' python3.11 -m pip install numpy - mkdir py4pd + - name: Build run: make PYTHON_VERSION=python3.11 extension=d_amd64 + - name: Copy Files and Set for Tests + run: | + mkdir py4pd + mv py4pd.d_amd64 py4pd + cp -r py4pd test + cp -r resources test/py4pd + - name: Run Tests continue-on-error: true run: | - python3.11 ./test/runTests.py + cd test + python3.11 ./runTests.py - name: Upload Object uses: actions/upload-artifact@v3 @@ -161,7 +168,6 @@ jobs: - name: set Enviroment run: | brew install --cask pd - python3.11 -c 'import sysconfig;print(sysconfig.get_config_var("LINKFORSHARED"))' python3.11 -m pip install numpy mkdir py4pd diff --git a/.gitignore b/.gitignore index 87d84a0a..27ad88ff 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ Python bin pd/ +py4pd/ +test/py4pd/ py4pd.zip DLLs/* Lib/* diff --git a/test/runTests.py b/test/runTests.py index 5801ed23..990185da 100755 --- a/test/runTests.py +++ b/test/runTests.py @@ -72,11 +72,11 @@ def runTest(pdpatch): py4pdPath = os.path.abspath(scriptfolder) cmd = ( - f'/Applications/Pd-*.app/Contents/Resources/bin/pd -stderr -path {py4pdPath} -send "start-test bang" ' + f'/Applications/Pd-*.app/Contents/Resources/bin/pd -stderr -nogui -noaudio -path {py4pdPath} -send "start-test bang" ' + pathfile ) try: - output = subprocess.run(cmd, capture_output=True, text=True, shell=True) + output = subprocess.run(cmd, capture_output=True, text=True, shell=True, timeout=45) outputLines = str(output).split("\\n") except subprocess.TimeoutExpired: print("\033[K", end="\r")