Skip to content

Commit

Permalink
Fixed tests, v2?
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayy001 committed Dec 7, 2024
1 parent de008da commit 9ec109a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builds/github-make-executable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 2 additions & 5 deletions codexctl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 9ec109a

Please sign in to comment.