Skip to content

Commit

Permalink
Merge pull request #329 from anarkiwi/cc
Browse files Browse the repository at this point in the history
codecheck
  • Loading branch information
anarkiwi committed Sep 19, 2024
2 parents 8f6d52c + bfd386d commit 7b44461
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/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:
Expand Down
4 changes: 1 addition & 3 deletions bin/build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
2 changes: 1 addition & 1 deletion bin/build_test_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..
7 changes: 7 additions & 0 deletions bin/code_check.sh
Original file line number Diff line number Diff line change
@@ -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_*
1 change: 0 additions & 1 deletion codecheck-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
black==24.8.0
pytype==2024.4.11
zstandard==0.23.0
sigmf==1.2.2
Expand Down
2 changes: 1 addition & 1 deletion python/iqtlabs/qa_write_freq_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)
Expand Down
3 changes: 3 additions & 0 deletions static-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
black==24.8.0
pytype==2024.4.11
sigmf==1.2.2

0 comments on commit 7b44461

Please sign in to comment.