Skip to content

Commit

Permalink
Merge branch 'master' into test-on-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jptomoya committed Feb 19, 2024
2 parents fc9b22e + 2666e11 commit 93471d0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/test-on-pr-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application
name: Python Test (Ubuntu)

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
python -m unittest
echo '```' >> $GITHUB_STEP_SUMMARY
python -m unittest &>> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
6 changes: 3 additions & 3 deletions ptrlib/arch/arm/disassembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def disassemble_arm(code: bytes,
return

output = []
r = re.findall(rb"([0-9a-f]+):\s+[0-9a-f]+\s+(.+)",
r = re.findall(r"([0-9a-f]+):\s+[0-9a-f]+\s+(.+)",
stdout.decode())
for addr, op in r:
op = re.sub("\s+", " ", op.strip())
op = re.sub("//.+", "", op).strip()
op = re.sub(r"\s+", " ", op.strip())
op = re.sub(r"//.+", "", op).strip()
output.append((int(addr, 16), op))

os.unlink(fname_bin)
Expand Down
4 changes: 2 additions & 2 deletions ptrlib/arch/intel/disassembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def disassemble_intel(code: bytes,
return

output = []
r = re.findall(rb"([0-9a-f]+):\s+([0-9a-f]{2}\s)+\s+(.+)",
r = re.findall(r"([0-9a-f]+):\s+([0-9a-f]{2}\s)+\s+(.+)",
stdout.decode())
for addr, _, op in r:
op = re.sub("\s+", " ", op.strip())
op = re.sub(r"\s+", " ", op.strip())
output.append((int(addr, 16), op))

os.unlink(fname_bin)
Expand Down

0 comments on commit 93471d0

Please sign in to comment.