From 8aaa79bf58ae1b52d8bf7f5b3cfaaf3f6460a04f Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:20:35 +0000 Subject: [PATCH 1/6] static tests. --- static-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 static-requirements.txt diff --git a/static-requirements.txt b/static-requirements.txt new file mode 100644 index 0000000..d31e325 --- /dev/null +++ b/static-requirements.txt @@ -0,0 +1,2 @@ +pytype==2024.4.11 +sigmf==1.2.2 From ee9893186ef4a89ca719a1b1a79366da9a784b53 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:21:21 +0000 Subject: [PATCH 2/6] nix. --- bin/build_test_nix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build_test_nix.sh b/bin/build_test_nix.sh index c1a164f..2e11295 100755 --- a/bin/build_test_nix.sh +++ b/bin/build_test_nix.sh @@ -8,4 +8,4 @@ cppcheck --verbose --language=c++ --inline-suppr --suppress=preprocessorErrorDir pip3 install --user -r codecheck-requirements.txt && \ sudo pip3 install --user -r codecheck-requirements.txt && \ ./bin/clonedeps.sh && \ - rm -rf build && mkdir build && cd build && cmake .. && make -j $(nproc) && sudo make install && sudo ldconfig && sudo PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH SIGMF_VALIDATE=/root/.local/bin/sigmf_validate make test ARGS="--verbose --timeout 180" && cd .. + rm -rf build && mkdir build && cd build && cmake .. && make -j $(nproc) && sudo make install && sudo ldconfig && sudo PYTHONPATH=$HOME/.local/lib/python3.10/site-packages:$PYTHONPATH make test ARGS="--verbose --timeout 180" && cd .. From f3b44eec1c38c2f620b201185f89697e51cb49f9 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:24:39 +0000 Subject: [PATCH 3/6] static. --- .github/workflows/test.yaml | 2 +- bin/build_test.sh | 4 +--- bin/code_check.sh | 7 +++++++ 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100755 bin/code_check.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a323954..da44ab2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: fetch-depth: 0 - name: build_test run: | - bin/apt_get.sh && TEST_VKFFT=1 bin/build_test.sh && bin/test_grc310.sh + bin/apt_get.sh && bin/codecheck.sh && SIGMF_VALIDATE=/root/.local/bin/sigmf_validate TEST_VKFFT=1 bin/build_test.sh && bin/test_grc310.sh test-2004-gnuradio39: runs-on: ubuntu-20.04 steps: diff --git a/bin/build_test.sh b/bin/build_test.sh index 988c310..1f5a121 100755 --- a/bin/build_test.sh +++ b/bin/build_test.sh @@ -6,7 +6,5 @@ bin/check_blocks.py && \ sudo pip3 install --user -U pip && \ pip3 install --user -r codecheck-requirements.txt && \ sudo pip3 install --user -r codecheck-requirements.txt && \ - black python/iqtlabs/qa_* && \ ./bin/clonedeps.sh && \ - rm -rf build && mkdir build && cd build && cmake .. && make -j $(nproc) && sudo make install && sudo ldconfig && sudo SIGMF_VALIDATE=/root/.local/bin/sigmf_validate make test ARGS="--verbose --timeout 180" && cd .. && \ - PYTHONPATH=python/iqtlabs pytype -d attribute-error python/iqtlabs/qa_* + rm -rf build && mkdir build && cd build && cmake .. && make -j $(nproc) && sudo make install && sudo ldconfig && sudo SIGMF_VALIDATE=$SIGMF_VALIDATE make test ARGS="--verbose --timeout 180" && cd .. diff --git a/bin/code_check.sh b/bin/code_check.sh new file mode 100755 index 0000000..015710f --- /dev/null +++ b/bin/code_check.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + pip3 install --user -U pip && \ + sudo pip3 install --user -U pip && \ + pip3 install --user -r static-requirements.txt && \ + sudo pip3 install --user -r static-requirements.txt && \ + black python/iqtlabs/qa_* From ce4084fa40af090a15867b17266acb5473eb9901 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:31:02 +0000 Subject: [PATCH 4/6] code --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index da44ab2..7c67e86 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,7 @@ jobs: fetch-depth: 0 - name: build_test run: | - bin/apt_get.sh && bin/codecheck.sh && SIGMF_VALIDATE=/root/.local/bin/sigmf_validate TEST_VKFFT=1 bin/build_test.sh && bin/test_grc310.sh + bin/apt_get.sh && bin/code_check.sh && SIGMF_VALIDATE=/root/.local/bin/sigmf_validate TEST_VKFFT=1 bin/build_test.sh && bin/test_grc310.sh test-2004-gnuradio39: runs-on: ubuntu-20.04 steps: From 2b5e5a0268410d322d7ec025e4d76135a9f911b5 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:35:30 +0000 Subject: [PATCH 5/6] black. --- codecheck-requirements.txt | 1 - static-requirements.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/codecheck-requirements.txt b/codecheck-requirements.txt index 9f93cdf..45f4006 100644 --- a/codecheck-requirements.txt +++ b/codecheck-requirements.txt @@ -1,4 +1,3 @@ -black==24.8.0 pytype==2024.4.11 zstandard==0.23.0 sigmf==1.2.2 diff --git a/static-requirements.txt b/static-requirements.txt index d31e325..8e21df1 100644 --- a/static-requirements.txt +++ b/static-requirements.txt @@ -1,2 +1,3 @@ +black==24.8.0 pytype==2024.4.11 sigmf==1.2.2 From bfd386d470a3e8640f8cd0166554d6e696513c29 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 19 Sep 2024 11:53:17 +0000 Subject: [PATCH 6/6] None. --- python/iqtlabs/qa_write_freq_samples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/iqtlabs/qa_write_freq_samples.py b/python/iqtlabs/qa_write_freq_samples.py index 5989476..dd2efb3 100755 --- a/python/iqtlabs/qa_write_freq_samples.py +++ b/python/iqtlabs/qa_write_freq_samples.py @@ -312,7 +312,7 @@ def write_freq_samples(self, rotate): expected_tune_freq = 0 self.assertIn(str(int(expected_tune_freq)), zst_file) sigmf_validate = os.getenv("SIGMF_VALIDATE", None) - if sigmf_validate is not None: + if sigmf_validate: subprocess.check_call( [sigmf_validate, "--skip-checksum", "--verbose", zst_file] )