From 5af320ec4188cfa33bf9bd72a4a052cb2cc9dc5f Mon Sep 17 00:00:00 2001 From: uael Date: Mon, 16 Oct 2023 11:47:14 -0700 Subject: [PATCH] ci: upload test artifacts --- .github/workflows/avatar.yml | 23 ++++++++++++----------- avatar/runner.py | 3 +++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/avatar.yml b/.github/workflows/avatar.yml index 21945ef..97a30e7 100644 --- a/.github/workflows/avatar.yml +++ b/.github/workflows/avatar.yml @@ -58,17 +58,14 @@ jobs: - run: black --check avatar/ - run: isort --check avatar test: - name: Test Bumble vs Bumble(s) [${{ matrix.shard }}] + name: Test Bumble vs Bumble(s) [${{ matrix.shard }}/24] runs-on: ubuntu-latest strategy: matrix: shard: [ - 1/24, 2/24, 3/24, 4/24, - 5/24, 6/24, 7/24, 8/24, - 9/24, 10/24, 11/24, 12/24, - 13/24, 14/24, 15/24, 16/24, - 17/24, 18/24, 19/24, 20/24, - 21/24, 22/24, 23/24, 24/24, + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, ] steps: - uses: actions/checkout@v3 @@ -81,11 +78,15 @@ jobs: pip install --upgrade pip pip install rootcanal==1.3.0 pip install . + mkdir -p out - name: Rootcanal - run: nohup python -m rootcanal > rootcanal.log & + run: nohup python -m rootcanal > out/rootcanal.log & - name: Test run: | avatar --list | grep -Ev '^=' > test-names.txt - timeout 5m avatar --test-beds bumble.bumbles --tests $(split test-names.txt -n l/${{ matrix.shard }}) - - name: Rootcanal Logs - run: cat rootcanal.log + timeout 5m avatar --test-beds bumble.bumbles --tests $(split test-names.txt -n l/${{ matrix.shard }}/24) + - uses: actions/upload-artifact@v3 + if: success() || failure() + with: + name: artifacts_${{ matrix.shard }} + path: out/ diff --git a/avatar/runner.py b/avatar/runner.py index 8cc4a53..9419bb7 100644 --- a/avatar/runner.py +++ b/avatar/runner.py @@ -110,6 +110,9 @@ def run(self) -> bool: # Enable Bumble snoop logs. os.environ.setdefault('BUMBLE_SNOOPER', f'btsnoop:file:{self.logs_dir}/{_BUMBLE_BTSNOOP_FMT}') + # Set Mobly log path. + os.environ.setdefault('ENV_MOBLY_LOGPATH', str(self.logs_dir)) + # Execute the suite ok = True for config in self.test_run_configs: