Skip to content

Commit

Permalink
Non-regression tests for otool.py
Browse files Browse the repository at this point in the history
  • Loading branch information
LRGH committed Jul 3, 2022
1 parent 3805152 commit c384078
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package
name: Unit tests

on:
push:
Expand Down Expand Up @@ -89,3 +89,21 @@ jobs:
pwd
ls -l
python ./tests/test_all.py
examples:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-10.15", "macos-11", "macos-12"]
python-version: ["2.7", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Non-regression tests
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
zsh ./tests/examples_macos.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ When modifications are made, then (depending on the details of the file format)
## Development status

[![codecov](https://codecov.io/gh/LRGH/elfesteem/branch/master/graph/badge.svg)](https://codecov.io/gh/LRGH/elfesteem)
[![Build Status](https://github.com/LRGH/elfesteem/workflows/Python%20package/badge.svg?event=push)](https://github.com/LRGH/elfesteem/actions?query=workflow%3A%22Python+package%22+branch%3Amaster+event%3Apush) <!-- ignore_ppi -->
[![Build Status](https://github.com/LRGH/elfesteem/workflows/Unit%20tests/badge.svg?event=push)](https://github.com/LRGH/elfesteem/actions?query=workflow%3A%22Unit+tests%22+branch%3Amaster+event%3Apush)
[![Build Status](https://travis-ci.org/LRGH/elfesteem.svg?branch=master)](https://travis-ci.org/LRGH/elfesteem)
9 changes: 9 additions & 0 deletions tests/examples_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/zsh

# Note that we don't test all files, because some are not well parsed by the
# system's otool.

for file in tests/binary_input/macho/{[DLST],lib[AScde],macho_}*; do
echo "=== $file ==="
diff -c =(otool -l $file) =(python ./examples/otool.py -l $file 2>/dev/null)
done

0 comments on commit c384078

Please sign in to comment.