Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Travis CI; corrections for miasm2; adding RPRC format; Mach-O non-regression #2

Open
wants to merge 283 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
030d652
pe_init: add rfind
May 16, 2013
b04bd7e
pe_init: fix dirres if dont parse resources
Jun 10, 2013
d1fca28
fix export table parsing for pe64
Feb 24, 2013
5dbde9b
pe: fix original first thunk generation
Jul 10, 2013
b221f42
pe: add raise offset exception on read bug; add parse_delay opt
Jul 10, 2013
0104d69
pe: fix all tests against None to avoid objects reconstruction
Jul 10, 2013
c8b960b
pe_init: support 64bit pe32+ generation
Aug 7, 2013
fa2fea4
elf_init: display flags
Nov 7, 2013
c398900
pe_init: round rva addresses
Jan 6, 2014
4fa6119
pe_init: test of out of pe
Jan 8, 2014
ef2f7e5
pe: fix import parsing
Feb 3, 2014
7373aff
pe_init: parse reloc opt
Mar 4, 2014
be66c65
pe_init: fix 64 bit issues
Apr 24, 2014
726034d
pe: fix dir import get_func_rva
May 5, 2014
c4f08b3
pe_init: fix load empty/truncated section
May 27, 2014
3e54b76
otool: print section of symbols
Jun 2, 2014
5516abd
macho: add 'name' attribute to Section
Jun 2, 2014
e7e6660
elf: str(e) was broken; we can use e.pack() now
Jun 25, 2014
4514e28
README.md edited online with Bitbucket
Jun 25, 2014
1d214ca
elf: error when reading core files (self.Ehdr.shstrndx == SHN_UNDEF)
Jul 2, 2014
1743f89
merge
Jul 2, 2014
909c828
More compatibility with python3
Jul 7, 2014
e8bfffc
elf_init: ELF() creates a valid ELF with default values
LRGH Jul 11, 2014
cb2f644
elf_init: the ELF to be created may have multiple .rodata or .text se…
LRGH Jul 22, 2014
4cdbf97
elf_init: SHT_GROUP sections
LRGH Jul 24, 2014
d675986
elf: symbols visibility
LRGH Jul 24, 2014
ba6f8f6
elf_init: can use section.name instead of section.sh.name
LRGH Jul 30, 2014
e36bb55
Moving readmacho.py to tests/
LRGH Sep 3, 2014
eece7fb
pe: add some constants
LRGH Sep 4, 2014
f123554
elf: compute section name with properties, as seen is asm files
LRGH Sep 12, 2014
96516ab
macho: rename getsectbyname to getsectionbyname, same name as ELF and PE
LRGH Sep 12, 2014
da17343
elf: constants for architectures having a _ in their names, e.g. X86_64
LRGH Sep 15, 2014
6aadc86
pe_init: bug when empty string table; some functions still used str()…
LRGH Sep 16, 2014
0218677
pe: fix pe with rva in header
Sep 18, 2014
db8998a
compatibility with python2.3
LRGH Nov 24, 2014
a392fc3
elf: compatibility with python3.4 needs // instead of / to output an int
LRGH Dec 1, 2014
6634212
__len__ API modification
Feb 10, 2015
847a4ee
pe: fix rebuild with no delay import
Feb 10, 2015
ad70898
elf: compute section name with properties when SHF_MERGE
LRGH Apr 4, 2015
437c44d
revert patch 3cf0113be98d, which does not belong to the core of elfes…
LRGH Jul 22, 2015
a381d18
elf: adding SHF_ORDERED and SHF_EXCLUDE (Solaris specifics)
LRGH Jul 22, 2015
3b67a35
macho: output entrypoint
LRGH Jul 24, 2015
aac21ec
macho: add filetype constants
LRGH Jul 24, 2015
cf5371f
elf: add aarch64 arch cst
Aug 7, 2015
3bc2cc7
macho: add load commands; update otool.py
LRGH Sep 23, 2015
da0c32e
macho: add LC_LINKER_OPTION and others
LRGH Sep 24, 2015
3f79722
macho: FAT files may contain ar archives
LRGH Sep 24, 2015
96ad815
macho: add armv7s and some other constants
LRGH Sep 24, 2015
4f60c7f
macho: otool.py takes the same options and generates the same output …
LRGH Sep 24, 2015
d1bc783
macho: otool.py failed on non FAT files
LRGH Oct 13, 2015
9db418f
macho: StringTable may need references to substrings
LRGH Nov 9, 2015
e2367c7
pe: fix import parsing
Nov 23, 2015
2911b4e
macho: direct access to symbols table
LRGH Dec 22, 2015
1acfb0c
macho: display dynamic symbols table with otool.py
LRGH Dec 22, 2015
284f200
macho: display relocs with otool.py
LRGH Dec 22, 2015
a177fd9
macho: constants for reloc types
LRGH Dec 19, 2015
855837c
macho: display indirect symbols with otool.py
LRGH Dec 22, 2015
7625f14
macho: some new constants
LRGH Jan 4, 2016
29eff18
macho: update the non-regression tests
LRGH Jan 5, 2016
20d1ce3
macho: compatibility with python3
LRGH Jan 5, 2016
91b8694
macho: all segments may have size 0
LRGH Jan 6, 2016
95ee67e
elf: two new relocation types, found in http://docs.oracle.com/cd/E19…
LRGH Jan 8, 2016
5c70f62
elf: some performance improvements
LRGH Feb 2, 2016
2c88e50
elf_init: some additional performance improvements
LRGH Feb 3, 2016
19711a9
pe_init: add parse_ressource opt
Feb 21, 2013
4901df4
pe: new style classes
LRGH Feb 4, 2016
dc4def9
pe_init: avoid infinite loops at end of sections
LRGH Feb 4, 2016
4bbadfb
strpatchwork: better memory efficiency
LRGH Feb 4, 2016
a1668ef
macho: __len__ API modification
LRGH Feb 4, 2016
c394cc0
pe_init: revert patch 68ac083623ff
LRGH Feb 4, 2016
e878838
cstruct/new_cstruct merge; step 1: headers
LRGH Feb 5, 2016
ce559c8
cstruct/new_cstruct merge; step 2: NT header
LRGH Feb 5, 2016
66d5ca4
cstruct/new_cstruct merge; step 3: section headers and data
LRGH Feb 5, 2016
8855e13
pe_init: bug introduced by patch 6dad82af5f19
LRGH Feb 6, 2016
299e87c
PE: compatibility with python3
LRGH Feb 5, 2016
785ffcb
pe: typo causing a bug in DirImport.build_content; there are other bu…
LRGH Feb 8, 2016
9ca639c
pe: bug in repr(DirExport), and some code prettyfying
LRGH Feb 15, 2016
2669395
macho: reloc for x86_64
LRGH Apr 5, 2016
06931f5
elf: addend are signed
LRGH Apr 8, 2016
8436780
PE: more compatibility with python3
LRGH Nov 7, 2016
5a3ec2e
elf: additions, mainly for MIPS
LRGH Nov 10, 2016
b194a18
elf: new cpu identifiers
LRGH Nov 26, 2016
e5fd2d2
elf: some more cpu identifiers
LRGH Jan 12, 2017
3263a9b
pe: COFF for TI devices
LRGH Jan 16, 2017
e30ff8d
elf: .dynamic section
LRGH Jan 19, 2017
e2bc33f
macho: better parsing of NeXT binaries
LRGH Jan 19, 2017
7a8d91e
elf: dealing with a Linux Alpha ELF having invalid content
LRGH Jan 19, 2017
877e99f
pe: more exotic COFF
LRGH Jan 19, 2017
db139d3
elf: make the difference between sections fully in PH, or not
LRGH Jan 20, 2017
46d3aa5
readelf.py output more consistent with Linux readelf
LRGH Jan 20, 2017
4c1daa4
pe: move definition of constants at the beginning of the file
LRGH Feb 5, 2016
eb1c979
Add readpe.py that shows the internal structure of COFF and PE files
LRGH Jan 27, 2017
a4ff6aa
pe: second field in section header is named 'paddr', not 'size'
LRGH Jan 24, 2017
605cf12
pe: reconstruct symbols in PE.build_content
LRGH Feb 1, 2017
3b3e3e1
cstruct/new_cstruct merge; step 4: import directory
LRGH Feb 3, 2017
cc81721
cstruct/new_cstruct merge; step 5: delay import directory
LRGH Feb 5, 2017
014a420
cstruct/new_cstruct merge; step 6: export directory
LRGH Feb 4, 2017
3a0f4be
cstruct/new_cstruct merge; step 7: resource directory
LRGH Feb 8, 2017
f9484c9
cstruct/new_cstruct merge; step 8: reloc directory
LRGH Feb 9, 2017
c3b18ae
cstruct/new_cstruct merge; step 9: symbols
LRGH Feb 9, 2017
509ef2f
pe: symbols for OSF1/Tru64 (partial implementation)
LRGH Feb 9, 2017
09a764e
readpe: flags in COFF header
LRGH Feb 11, 2017
b4f8d0c
pe: specify section in virt (for .obj)
LRGH Feb 11, 2017
c836e47
pe: COFF relocations
LRGH Feb 12, 2017
fd11464
pe: adaptation to COFF
LRGH Feb 13, 2017
72db894
cstruct: generic framework that will be used for PE too
LRGH Feb 4, 2016
0206ed5
README.md edited online with Bitbucket
LRGH Feb 13, 2017
e9a2b0d
pe: use bytelen instead of _size
LRGH Feb 13, 2017
2c7e374
cstruct: update of optional field
LRGH Feb 13, 2017
8132e18
readpe: displays RELOC layout
LRGH Feb 13, 2017
b49d973
readpe/layout: show when unknown chunk is all zeroes
LRGH Feb 13, 2017
46b7c48
pe: some valid COFF could be rejected
LRGH Feb 13, 2017
b78b906
README: add mention of the readpe.py tool
LRGH Feb 13, 2017
4703ec3
pe: typos
LRGH Feb 13, 2017
73c584d
pe: impdesc worked only when the Import had a name
LRGH Feb 20, 2017
6562354
pe: name unmangling for Visual Studio C++
LRGH Feb 24, 2017
c141b45
pe: name unmangling was not working with python3
LRGH Feb 24, 2017
afecadc
readpe: better display of COFF symbols
LRGH Feb 25, 2017
3779d97
pe: name unmangling for anonmyous namespace
LRGH Feb 25, 2017
e1e8eb6
pe: name unmangling for __eabi and __vectorcall
LRGH Feb 25, 2017
359e793
pe: name unmangling for CV:
LRGH Feb 25, 2017
17fa16e
pe: new data types in name unmangling
LRGH Feb 26, 2017
e73bb4e
pe: name unmangling for C++/CLI
LRGH Feb 26, 2017
214f481
pe: name unmangling, more template parameters
LRGH Feb 26, 2017
35628e1
pe: avoid IndexError in name unmangling
LRGH Feb 27, 2017
741dfbe
pe: name unmangling for __based
LRGH Feb 27, 2017
2ecccce
pe: name unmangling for throw, for extern "C"
LRGH Feb 27, 2017
130aa13
pe: more name unmangling decoding
LRGH Feb 27, 2017
017c8fd
pe: more robust to atypical PE files (many but not all Ange Albertini…
LRGH Feb 28, 2017
4297e8d
pe: oups, the previous patch broke COFF parsing
LRGH Feb 28, 2017
141b066
pe: some DLL have a HR magic instead of the standard MZ
LRGH Feb 28, 2017
d3808e2
pe: robust to more atypical PE files
LRGH Feb 28, 2017
e0e80fd
visual_studio_mangling: adding non-regression tests, with coverage ve…
LRGH Mar 3, 2017
c4c23f9
pe: patch d3808e2 introduced a bug
LRGH Mar 4, 2017
7bc1d1b
minidump: support implemented by commial at https://github.com/serpil…
LRGH Mar 3, 2017
d659d37
Some corrections to be useable by miasm2
LRGH Mar 4, 2017
33beb39
Move tools in 'examples'
LRGH Mar 5, 2017
f082c22
pe: display() returns a string
LRGH Mar 6, 2017
19ccf77
pe: improve DirExport.create()
LRGH Mar 6, 2017
6ba1abf
pe: bug when writing in non-mapped addresses
LRGH Mar 6, 2017
b5b44ef
More compatibility with python3
LRGH Mar 6, 2017
e482927
pe: compatibility with python2.4
LRGH Mar 6, 2017
e3519a9
pe: some values should never be None; we improve code coverage
LRGH Mar 6, 2017
04e11d3
pe: verification of space in header for adding section header
LRGH Mar 6, 2017
66fca84
pe: adding non-regression tests
LRGH Mar 6, 2017
2ecb058
pe: some binary files for non-regression tests were missing in the co…
LRGH Mar 6, 2017
b71e223
elf: move readelf-like display to elf.py and elf_init.py
LRGH Mar 7, 2017
42b6610
elf: adding non-regression tests
LRGH Mar 7, 2017
85e32f7
pe: now, miasm2 non-regression tests succeed (266/266)
LRGH Mar 7, 2017
d4af4ec
README.md edited online with Bitbucket
LRGH Mar 7, 2017
f7104a0
pe: patch 85e32f7 was not compatible with python3
LRGH Mar 7, 2017
38cc119
elf: bug when listing sections with unnamed type
LRGH Mar 8, 2017
7ac8d1c
The new binary file for non-regression tests was missing in the commit
LRGH Mar 8, 2017
a142db8
Update licensing, add LICENSE from https://www.gnu.org/licenses/lgpl-…
chriscz Mar 7, 2017
aefc249
Made elfcli work
phil777 Mar 2, 2017
1db7bc7
Replaced README
phil777 Mar 9, 2017
3ce78ee
Remove the use of ContentManager
LRGH Mar 10, 2017
4146102
Adding parser for RPRC files
LRGH Mar 11, 2017
b5b388d
Use Travis CI
LRGH Mar 11, 2017
d0bb279
pe: update empty PE creation; now 448/448 tests of miasm2 pass
LRGH Mar 12, 2017
baf91d3
macho: porting for python2.4
LRGH Mar 13, 2017
ed600bd
macho: don't parse loaders twice
LRGH Mar 13, 2017
01ab06c
macho: make otool fail nicely on non Mach-O files
LRGH Mar 13, 2017
24a9da2
macho: include one byte of padding in section data
LRGH Mar 13, 2017
6750dd0
macho: pack() should always return the input value for an unmodified …
LRGH Mar 13, 2017
01dce55
macho: porting for python3
LRGH Mar 13, 2017
f717218
macho: importing old non-regression tests
LRGH Mar 13, 2017
eb5a918
macho: forgot to commit some files
LRGH Mar 14, 2017
277465d
macho: inherit parseSymbols within fat files
LRGH Mar 14, 2017
0636da3
Use codecov
LRGH Mar 17, 2017
756f336
Add python 3.2 and 3.3 in Travis CI
LRGH Mar 17, 2017
0a4c494
pe&readpe: better compatibility with old and recent python
LRGH Mar 24, 2017
eb725d8
pe: add 32-bit eCOFF (for MIPS)
LRGH Mar 26, 2017
149c5f1
macho: add new loaders
LRGH Mar 26, 2017
08bc291
macho: otool.py output now more identical to system's otool
LRGH Mar 27, 2017
d00c9c7
macho: performance improvement
LRGH Mar 27, 2017
b205ce6
macho: big-endian file for non-regression
LRGH Mar 28, 2017
55dcbe3
macho: iOS file for non-regression
LRGH Mar 28, 2017
ed6309d
macho: new file for non-regression, not reconstructed identical
LRGH Mar 31, 2017
4da13ae
macho: almost complete rewrite
LRGH Mar 27, 2017
01d601f
macho: non-regression tests should not depend on the timezone
LRGH Mar 31, 2017
78e0329
macho: move files in a macho subdirectory
LRGH Mar 31, 2017
df9bef4
macho: new files for non-regression, with LC_SOURCE_VERSION and LC_VE…
LRGH Apr 1, 2017
ccdfeb9
macho: new files for non-regression, with section size "past end of f…
LRGH Apr 1, 2017
fb98367
macho: new non-regression tests, e.g. for LC_PREBOUND_DYLIB
LRGH Apr 3, 2017
ab84333
macho: rewrite LC_DYSYMTAB analysis
LRGH Apr 3, 2017
1087232
macho: rewrite LC_DYLD_INFO analysis; otool.py partially emulates dyl…
LRGH Apr 4, 2017
74f6637
intervals: non-regression tests
LRGH Apr 5, 2017
0cbc1cc
macho: 'intervals' is now used by default
LRGH Apr 5, 2017
5e61628
macho: avoid parsing malformed trie
LRGH Apr 5, 2017
c692f67
macho: rewrite LC_DYLD_INFO analysis, again
LRGH Apr 5, 2017
5392a5c
macho: a few bug corrections
LRGH Apr 6, 2017
ea3a224
macho: better detection of malformed load commands
LRGH Apr 5, 2017
b58b744
macho: non-regression for entrypoint computation
LRGH Apr 6, 2017
fcdb92b
adding a BINARY class with API shared with most known binary containe…
LRGH Apr 6, 2017
8ac37fb
readelf.py: use the same options as readelf
LRGH Apr 9, 2017
d64d2a3
all: better behaviour when parsing invalid files, e.g. the ones from …
LRGH Apr 10, 2017
633c2d7
elf: some more non-regression tests
LRGH Apr 10, 2017
29b6bff
minidump: some bugs
LRGH Apr 12, 2017
f26da72
minidump: extensions and non-regression tests
LRGH Apr 12, 2017
b0d460d
minidump: porting for python2.4
LRGH Apr 12, 2017
9392814
minidump: porting for python3
LRGH Apr 12, 2017
b6ddf7e
tests: factor common code
LRGH Apr 12, 2017
9290098
minidump: better parsing of Google's breakpad files
LRGH Apr 13, 2017
49bb884
macho: new non-regression tests, for better coverage
LRGH Apr 13, 2017
7b16270
macho: LC_THREAD and LC_UNIXTHREAD commands are rewritten for better …
LRGH Apr 19, 2017
516c6d4
macho: ARM_THREAD_STATE64 for LC_UNIXTHREAD
LRGH Apr 21, 2017
e62edf8
Porting for python 2.3
LRGH Apr 21, 2017
820a969
Add pypy in Travis CI
LRGH Apr 21, 2017
289936c
pe: remove unused dictionary RT, superseded by constants['RT']
LRGH Apr 21, 2017
457ea13
readpe: replace IDA's HR magic number with MZ
LRGH Apr 23, 2017
1bf5d7f
elf: parse files from http://www.muppetlabs.com/%7Ebreadbox/software/…
LRGH Apr 25, 2017
45dff9b
When using pypy3, we may need to copy globals() to generate the table…
LRGH Apr 25, 2017
2e47402
Add some documentation in README
LRGH Apr 26, 2017
962f654
elf: adding STB_GNU_UNIQUE and some others
LRGH Apr 27, 2017
6eaec1d
otool: repair option '-I'
LRGH Apr 28, 2017
3266488
macho: don't output warnings when there are more stubs than symbols
LRGH Apr 28, 2017
0292503
all: rewrite the way constants are defined
LRGH Apr 28, 2017
19eec7a
strpatchwork: avoid deprecated tostring() in python3
LRGH May 29, 2017
d724261
all: avoid deprecated log.warn in python3
LRGH May 29, 2017
9f1c30c
tests: display error messages when assertions fail
LRGH Jun 19, 2017
5ccf545
tests: compatible with pytest
LRGH Jun 20, 2017
7fac75e
elf: new relocation constants for 386 and X86_64
LRGH May 1, 2020
50e0fe6
travis: change list of python versions to be tested
LRGH May 1, 2020
a6ee7e4
macho: LC_BUILD_VERSION
LRGH May 28, 2020
e79444d
macho: list of tools in LC_BUILD_VERSION
LRGH May 28, 2020
eac97e3
Include other zerofill section types
achow101 Jan 6, 2021
e5c09b3
Add elfesteem.macho to setup.py
achow101 Jan 6, 2021
4ae51ff
exmaples: support Python 3+ in otool example
fanquake Jun 13, 2022
9b09a83
Create python-package.yml
LRGH Jun 30, 2022
3805152
otool.py output to be closer to system's otool output
LRGH Jul 3, 2022
c384078
Non-regression tests for otool.py
LRGH Jul 3, 2022
5800fcf
Automatic detection of system's otool, used for non-regression testing
LRGH Jul 5, 2022
ff2cf38
Readme explicitely says that python 2.3 upwards includes python 3.x
LRGH Jan 29, 2024
8682147
Remove python2.7 from non-regression testing, there is still pypy2.7 …
LRGH Jan 29, 2024
68c5bbe
ubuntu-18.04 is not available anymore, support for python3.4 temporar…
LRGH Jan 29, 2024
98a7036
macos-10.15 not available anymore, macos-13 is added
LRGH Jan 29, 2024
ee397ba
Readme: update unit test badge
LRGH Jan 29, 2024
1be7990
Remove warnings for recent python3
LRGH Feb 2, 2024
fb3bccb
Tests for python2.3 did not use python2.3
LRGH Mar 9, 2024
016c7af
Add CodeQL analysis
LRGH Mar 9, 2024
000d6bb
Add compatibility with python3.12
LRGH Mar 10, 2024
17e6fd7
Correct a few issues raised by CodeQL
LRGH Mar 10, 2024
97420bc
No need to support miasm2 anymore, it includes its own fork of elfest…
LRGH Mar 19, 2024
51ef559
More corrections of issues raised by CodeQL
LRGH Mar 19, 2024
6b0d083
Changes from e8patch:
CristiSima Sep 26, 2024
52ff65b
* uncomment logging and use builtin formatting
CristiSima Oct 4, 2024
1993df6
macos-11 runners are not available anymore
LRGH Oct 5, 2024
73037e9
Split one github action in two
LRGH Oct 8, 2024
7fd7077
github action to compare with the output of readelf -h -S
LRGH Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
analyze:
name: CodeQL analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
58 changes: 58 additions & 0 deletions .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This workflow will install various versions of Python and run non-regression tests.

name: Python versions

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.12", "pypy2.7", "pypy3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install coverage codecov
- name: Non-regression tests
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
coverage run ./tests/test_all.py
- name: Update codecov
run: |
codecov

python23:
name: python2.3
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python 2.3
run: |
cd ..
curl -O https://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz
tar xzf Python-2.3.7.tgz
cd Python-2.3.7
# We need to disable FORTIFY_SOURCE to compile python 2.3
# cf. https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/286334
./configure BASECFLAGS=-U_FORTIFY_SOURCE
make
sudo ln -fs $(pwd)/python /usr/local/bin/python
- name: Non-regression tests
run: |
python -c 'import sys;print(sys.version)'
export PYTHONPATH=$PYTHONPATH:$(pwd)
python ./tests/test_all.py
46 changes: 46 additions & 0 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow compares the outputs of elfesteem with native tools on the OS

name: Native tools

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-12", "macos-13"]
python-version: ["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: Comparison with otool
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
zsh ./tests/examples_macos.sh
linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04"]
python-version: ["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: Comparison with readelf
run: |
readelf --version
export PYTHONPATH=$PYTHONPATH:$(pwd)
bash ./tests/examples_linux.sh
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: python
jobs:
include:
- python: '3.7'
- python: '2.7'
- name: 'Python: 2.3'
# python 2.3 not available in travis
install:
- cd ..
- curl -O https://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz
- tar xzf Python-2.3.7.tgz
- cd Python-2.3.7
# We need to disable FORTIFY_SOURCE to compile python 2.3
# cf. https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/286334
- ./configure BASECFLAGS=-U_FORTIFY_SOURCE
- make
- export PATH=$(pwd):$PATH
- cd ../elfesteem
- python -c 'import sys;print(sys.version)'
script:
- python ./tests/test_all.py
after_success:
- true # coverage needs python >= 2.6
- python: 'pypy3'
- python: 'pypy'
- python: '3.8'
- python: '3.4'
install:
- pip install coverage codecov
before_script:
export PYTHONPATH=$PYTHONPATH:$(pwd)
script:
- coverage run ./tests/test_all.py
# We don't use e.g. tox for non-regression tests, because we want to have
# a script that works with old python too, and tox needs python2.5
# python2.4 ./tests/test_all.py will work fine :-)
# Note that coverage is incompatible with python 3.2, cf.
# https://github.com/menegazzo/travispy/issues/20
after_success:
- codecov
Loading