From 9ec109aa6f5641b3bf10b468037bd6212d24ee3c Mon Sep 17 00:00:00 2001 From: Jayy001 Date: Sat, 7 Dec 2024 21:06:17 +0000 Subject: [PATCH] Fixed tests, v2? --- .github/workflows/main.yml | 3 +++ Makefile | 2 +- builds/github-make-executable.sh | 2 +- codexctl/__init__.py | 7 ++----- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 66b60be..d67be42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,6 +74,9 @@ jobs: cache: 'pip' cache-dependency-path: | **/requirements*.txt + - name: Test codexctl + shell: bash + run: make test - name: Build codexctl shell: bash run: ./builds/github-make-executable.sh diff --git a/Makefile b/Makefile index 69d66c6..eafc68b 100644 --- a/Makefile +++ b/Makefile @@ -108,7 +108,7 @@ executable: $(VENV_BIN_ACTIVATE) --report=compilation-report.xml \ main.py mv dist/main.bin dist/codexctl.bin - mv dist/codexctl.exe dist/codexctl.exe + mv dist/main.exe dist/codexctl.exe if [ -d dist/codexctl.build ]; then \ rm -r dist/codexctl.build; \ fi diff --git a/builds/github-make-executable.sh b/builds/github-make-executable.sh index 812e54b..8d31af8 100755 --- a/builds/github-make-executable.sh +++ b/builds/github-make-executable.sh @@ -17,5 +17,5 @@ done if ! make test-executable; then printf '::error file=codexctl.bin,title=Test Error::Sanity test failed\n' - exit 0 # TODO: Fix at a later date + exit 1 fi diff --git a/codexctl/__init__.py b/codexctl/__init__.py index 132206c..40cbd61 100644 --- a/codexctl/__init__.py +++ b/codexctl/__init__.py @@ -90,9 +90,6 @@ def call_func(self, function: str, args: dict) -> None: ) if function == "extract": - if sys.platform != "linux": - raise NotImplementedError - if not args["out"]: args["out"] = os.getcwd() + "/extracted" @@ -134,11 +131,11 @@ def call_func(self, function: str, args: dict) -> None: inode = volume.inode_at(args["target_path"]) except FileNotFoundError: - print(f"'{args["target_path"]}': No such file or directory") + print(f"{args['target_path']}: No such file or directory") raise FileNotFoundError except OSError: - print(f"'{args["target_path"]}': {os.strerror(e.errno)}") + print(f"{args['target_path']}: {os.strerror(e.errno)}") sys.exit(e.errno) if function == "cat":