diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 948acebc9..a31127458 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,130 +98,3 @@ jobs: with: name: integration_tests_${{ matrix.device }}.json path: ./integration_tests.json - - generate_samples_unit_tests: - needs: [build_docker_tezos_ocaml] - runs-on: ubuntu-latest - container: - image: ${{ needs.build_docker_tezos_ocaml.outputs.image }} - credentials: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - options: -u root --entrypoint /bin/bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Create dirs - run: | - mkdir -p tests/samples/micheline/nanos - mkdir -p tests/samples/operations/nanos - - mkdir -p tests/samples/micheline/nanosp - mkdir -p tests/samples/operations/nanosp - - mkdir -p tests/samples/micheline/nanox - mkdir -p tests/samples/operations/nanox - - - name: Generate - run: | - export PATH=/home/opam/.opam/4.14/bin:$PATH - - dune exec ./tests/generate/generate.exe micheline 500 \ - nanos tests/samples/micheline - dune exec ./tests/generate/generate.exe operations 500 \ - nanos tests/samples/operations - - dune exec ./tests/generate/generate.exe micheline 500 \ - nanosp tests/samples/micheline - dune exec ./tests/generate/generate.exe operations 500 \ - nanosp tests/samples/operations \ - - dune exec ./tests/generate/generate.exe micheline 500 \ - nanox tests/samples/micheline - dune exec ./tests/generate/generate.exe operations 500 \ - nanox tests/samples/operations - - - name: Unit tests - run: | - export PATH=/home/opam/.opam/4.14/bin:$PATH - - make -C tests/unit - - - name: Upload results (nanos, micheline) - uses: actions/upload-artifact@v3 - with: - name: nanos_samples_micheline - path: tests/samples/micheline/nanos - - name: Upload results (nanos, operations) - uses: actions/upload-artifact@v3 - with: - name: nanos_samples_operations - path: tests/samples/operations/nanos - - - name: Upload results (nanosp, micheline) - uses: actions/upload-artifact@v3 - with: - name: nanosp_samples_micheline - path: tests/samples/micheline/nanosp - - - name: Upload results (nanosp, operations) - uses: actions/upload-artifact@v3 - with: - name: nanosp_samples_operations - path: tests/samples/operations/nanosp - - - name: Upload results (nanox, micheline) - uses: actions/upload-artifact@v3 - with: - name: nanox_samples_micheline - path: tests/samples/micheline/nanox - - - name: Upload results (nanox, operations) - uses: actions/upload-artifact@v3 - with: - name: nanox_samples_operations - path: tests/samples/operations/nanox - - integration_tests_samples: - needs: [build_app, generate_samples_unit_tests, build_docker_integration_tests] - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - device: [nanos, nanosp, nanox] - type: [micheline, operations] - container: - image: ${{ needs.build_docker_integration_tests.outputs.image }} - credentials: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Download app - uses: actions/download-artifact@v3 - with: - name: app_${{ matrix.device }}.tgz - - - name: Download app (dbg) - uses: actions/download-artifact@v3 - with: - name: app_${{ matrix.device }}_dbg.tgz - - - name: Download samples - uses: actions/download-artifact@v3 - with: - name: ${{ matrix.device }}_samples_${{ matrix.type }} - path: tests - - - name: Test - run: ./tests/integration/run_test_local.sh -T100 -F -m ${{ matrix.device }} tests - - - name: Upload results - uses: actions/upload-artifact@v3 - if: always() - with: - name: integration_tests_${{ matrix.type}}_${{ matrix.device }}.json - path: ./integration_tests.json diff --git a/tests/integration/test_runtime.sh b/tests/integration/test_runtime.sh index 86f2c06a0..609191e27 100644 --- a/tests/integration/test_runtime.sh +++ b/tests/integration/test_runtime.sh @@ -229,10 +229,15 @@ check_tlv_signature() { fi } +kill_speculos_runner2() { + echo "kill_speculos_runner2" + kill_speculos_runner +} + start_speculos() { start_speculos_runner $DBG "$1" set -e - trap kill_speculos_runner EXIT + trap kill_speculos_runner2 EXIT } run_a_test() { @@ -261,6 +266,7 @@ run_a_test() { case $CMD in *.sh) . $CMD + echo "End of the command" ;; *.py) start_speculos "$seed" @@ -315,7 +321,7 @@ run_both_tests() { PORT=$1 CMD="$2" - run_a_test NORMAL $PORT "$CMD" || run_a_test DEBUG $PORT "$CMD" + run_a_test DEBUG $PORT "$CMD" } MAX_DOTS=40 @@ -398,6 +404,7 @@ cleanup() { if [ -z "$FINISHED_TESTING" -a "$retcode" != 0 ]; then # XXXrcd: BROKEN! + echo "Cleanup" kill_speculos_runner echo $OUTPUT_BARS echo Something went wrong in the test framework.