Skip to content

Commit 8bf3cf1

Browse files
authored
Fix pipeline (#454)
1 parent b42aa68 commit 8bf3cf1

File tree

11 files changed

+18
-12
lines changed

11 files changed

+18
-12
lines changed

.github/workflows/extended-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
echo "${{ secrets.BINJA_LICENSE }}" | base64 --decode > license.txt
1818
- name: Download BinayNinja.zip
1919
run: |
20-
curl -v --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_BINJA_TOKEN }}" https://gitlab.fkie.fraunhofer.de/api/v4/projects/1250/repository/files/BinaryNinja.zip/raw?ref=main --output BinaryNinja.zip
20+
curl -L --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_BINJA_TOKEN }}" "https://gitlab.fkie.fraunhofer.de/api/v4/projects/1250/repository/archive.zip?sha=Binja5" -o complete_repo.zip
2121
- name: Build Docker Image
2222
run: |
2323
docker build -t dewolf .

.github/workflows/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
echo "${{ secrets.BINJA_LICENSE }}" | base64 --decode > license.txt
1919
- name: Download BinayNinja.zip
2020
run: |
21-
curl -v --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_BINJA_TOKEN }}" https://gitlab.fkie.fraunhofer.de/api/v4/projects/1250/repository/files/BinaryNinja.zip/raw?ref=main --output BinaryNinja.zip
21+
curl -L --header "PRIVATE-TOKEN: ${{ secrets.GITLAB_BINJA_TOKEN }}" "https://gitlab.fkie.fraunhofer.de/api/v4/projects/1250/repository/archive.zip?sha=Binja5" -o complete_repo.zip
2222
- name: Build Docker Image
2323
run: |
2424
docker build -t dewolf .

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ RUN apt -y update && apt -y upgrade && apt install -y --no-install-recommends \
2828
z3
2929

3030
# set up binaryninja
31-
COPY BinaryNinja.zip /tmp/BinaryNinja.zip
31+
COPY complete_repo.zip /tmp/complete_repo.zip
32+
RUN unzip /tmp/complete_repo.zip -d /tmp/repo/ && rm /tmp/complete_repo.zip
33+
RUN cp /tmp/repo/`ls /tmp/repo/ | grep dewolf-binja`/BinaryNinja.zip /tmp/BinaryNinja.zip
3234
RUN unzip /tmp/BinaryNinja.zip -d /opt/ && rm /tmp/BinaryNinja.zip && mkdir -p /root/.binaryninja/
3335
# set up binaryninja license
3436
COPY license.txt /root/.binaryninja/license.dat

decompiler/pipeline/expressions/bitfieldcomparisonunrolling.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,17 @@ def _get_switch_var_and_bitfield(self, subexpr: Expression) -> Optional[Tuple[Ex
139139
right=Constant(),
140140
),
141141
right=Constant() as bit_field,
142-
) if bit_field.value != 0xFFFFFFFF:
142+
) if (
143+
bit_field.value != 0xFFFFFFFF
144+
):
143145
return switch_var, bit_field
144146
case BinaryOperation(
145147
operation=OperationType.bitwise_and,
146148
left=BinaryOperation(operation=OperationType.left_shift, left=Constant(value=1), right=switch_var),
147149
right=Constant() as bit_field,
148-
) if bit_field.value != 0xFFFFFFFF:
150+
) if (
151+
bit_field.value != 0xFFFFFFFF
152+
):
149153
return switch_var, bit_field
150154
case _:
151155
debug(f"no match for {subexpr}")

tests/pipeline/controlflowanalysis/restructuring_commons/test_condition_aware_refinement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the PatternIndependentRestructuring pipeline stage condition aware refinement."""
1+
"""Tests for the PatternIndependentRestructuring pipeline stage condition aware refinement."""
22

33
from itertools import combinations
44
from typing import List, Tuple, Union

tests/pipeline/controlflowanalysis/test_pattern_independent_restructuring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the PatternIndependentRestructuring pipeline stage"""
1+
"""Tests for the PatternIndependentRestructuring pipeline stage"""
22

33
import pytest
44
from decompiler.pipeline.controlflowanalysis.restructuring import PatternIndependentRestructuring

tests/pipeline/controlflowanalysis/test_pattern_independent_restructuring_blackbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the PatternIndependentRestructuring pipeline stage"""
1+
"""Tests for the PatternIndependentRestructuring pipeline stage"""
22

33
import pytest
44
from decompiler.pipeline.controlflowanalysis.restructuring import PatternIndependentRestructuring

tests/pipeline/dataflowanalysis/test_dead-code-elimination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the DeadCodeElimination pipeline stage"""
1+
"""Tests for the DeadCodeElimination pipeline stage"""
22

33
from abc import ABC, abstractmethod
44

tests/structures/ast/test_syntaxforest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the AbstractSyntaxTree base class."""
1+
"""Tests for the AbstractSyntaxTree base class."""
22

33
from itertools import combinations
44

tests/structures/ast/test_syntaxgraph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" Tests for the AbstractSyntaxTree base class."""
1+
"""Tests for the AbstractSyntaxTree base class."""
22

33
from itertools import combinations
44

0 commit comments

Comments
 (0)