remove incomplete sharedcache processing #315
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
branches: | |
- master | |
- next | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
branches: | |
- master | |
- next | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
strategy: | |
matrix: | |
python-version: | |
- '3.6' | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
brew install ninja | |
python -m pip install --upgrade pip | |
pip install pytest poetry | |
poetry build | |
pip install $(ls dist/*.tar.gz | xargs) | |
- name: Build test images | |
run: ninja -C tests | |
- name: Test with pytest | |
run: | | |
PYTHONPATH="./src" pytest -s tests/unit.py | |
bin-tests: | |
name: Bin Tests | |
strategy: | |
matrix: | |
python-version: | |
- '3.6' | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
brew install ninja | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry build | |
pip install $(ls dist/*.tar.gz | xargs) | |
- name: Build test images | |
run: ninja -C tests | |
- name: Test insert | |
run: | | |
ktool insert --lc load --payload /your/mother.dylib --out tests/bins/testbin1.insert.test tests/bins/testbin1 | |
ktool list --linked tests/bins/testbin1.insert.test | grep your/mother | |
- name: Test edit | |
run: | | |
ktool edit --iname your/mother.framework/Mother --out tests/bins/testlib1.dylib.edit.test tests/bins/testlib1.dylib | |
ktool info tests/bins/testlib1.dylib.edit.test | grep Mother | |
- name: Test lipo | |
run: | | |
ktool lipo --extract arm64 tests/bins/testbin1.fat | |
ktool file tests/bins/testbin1.fat.arm64 | |
ktool lipo --extract x86_64 tests/bins/testbin1.fat | |
ktool lipo --create --out tests/bins/testbin1.fat.lipo.test tests/bins/testbin1.fat.arm64 tests/bins/testbin1.fat.x86_64 | |
ktool file tests/bins/testbin1.fat.lipo.test | grep "0x11000" | |
- name: Test dump | |
run: | | |
ktool dump --headers tests/bins/testbin1 | grep "char testPropertyTwo; // ivar: _testPropertyTwo" | |
- name: Test dump with mmaped-IO enabled | |
run: | | |
ktool --mmap dump --headers tests/bins/testbin1 | grep "char testPropertyTwo; // ivar: _testPropertyTwo" | |
- name: Test symbols | |
run: | | |
ktool symbols --imports tests/bins/testbin1 | grep _OBJC_CLASS_$_NSObject |