From 95ea39766173d9ea687990912c152951b844b7d8 Mon Sep 17 00:00:00 2001 From: Ben Davis Date: Tue, 9 Jul 2024 14:18:04 -0400 Subject: [PATCH] tests: add packet.exe integration to CI --- .github/workflows/main.yml | 10 +++++++++- Dockerfile | 2 +- tests/integration/packet/packet.exp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 950a2c83..a2e1dd4a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,6 +54,10 @@ jobs: cat out.log grep -e "All .* tests passed" out.log || exit 1 + - name: Docker Integration Test + run: | + docker run --rm --entrypoint tests/integration/packet/packet.exp pate + - name: Push Docker image run: | CI_COMMIT_SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) @@ -123,7 +127,7 @@ jobs: sudo apt install -y software-properties-common apt-transport-https ca-certificates wget sudo apt install -y bsdiff curl zlibc zlib1g zlib1g-dev git zip \ libgmp3-dev build-essential libtinfo-dev autoconf automake gperf cmake locales \ - python3-distutils python-setuptools antlr3 libantlr3c-dev libtool libtool-bin libboost-all-dev python3-pip libfftw3-dev + python3-distutils python-setuptools antlr3 libantlr3c-dev libtool libtool-bin libboost-all-dev python3-pip libfftw3-dev expect-lite sudo locale-gen en_US.UTF-8 sudo pip3 install toml @@ -192,5 +196,9 @@ jobs: run: | cabal test pkg:pate --test-options="-t 2400s" + - name: Integration Test + run: | + ./tests/integration/packet/packet.exp + - name: Docs run: cabal haddock pkg:pate diff --git a/Dockerfile b/Dockerfile index 4eb346a9..b18e5503 100644 --- a/Dockerfile +++ b/Dockerfile @@ -147,7 +147,7 @@ RUN cabal v2-build pate-repl-base ENV PATH="/home/src/:/root/.ghcup/bin:${PATH}" COPY --from=gitbase /home/src/loadrepl.ghci /home/src/loadrepl.ghci -RUN apt install -y libtinfo5 libtinfo-dev +RUN apt install -y libtinfo5 libtinfo-dev expect-lite ENTRYPOINT ["/home/src/pate.sh"] diff --git a/tests/integration/packet/packet.exp b/tests/integration/packet/packet.exp index f67a5534..c1377fd2 100755 --- a/tests/integration/packet/packet.exp +++ b/tests/integration/packet/packet.exp @@ -17,7 +17,7 @@ spawn ./pate.sh --original tests/integration/packet/exe/packet.exe --patched tests/integration/packet/exe/packet.patched.exe -s parse_packet -set timeout 120 +set timeout 240 expect_before { timeout { send_user "\n\nFAILURE: timeout\n"; exit 1 }