-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source: https://github.com/rdkcentral/_archive-bluetooth_mgr-b3b1288 SHA1: 1.6.2
- Loading branch information
Stephen Barrett
committed
Feb 7, 2025
0 parents
commit d4f7830
Showing
120 changed files
with
60,058 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# These owners will be the default owners for everything in | ||
# the repo. Unless a later match takes precedence, | ||
# @global-owner1 and @global-owner2 will be requested for | ||
# review when someone opens a pull request. | ||
* @rdkcentral/bluetooth-owners |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
name: L2 Unit Test | ||
on: | ||
push: | ||
branches: [ main, develop] | ||
merge_group: | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
L2Tests: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: download btcore | ||
run: | | ||
git clone https://${{ secrets.RDKCM_RDKE }}@github.com/rdkcentral/bluetooth.git btrcore/ | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libbluetooth-dev libtool m4 automake autoconf libdbus-1-dev libudev-dev libcjson-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-tools libcurl4-openssl-dev libglib2.0-dev gobject-introspection libgirepository1.0-dev bluez libcairo2-dev pkg-config | ||
- name: download bluez | ||
run: | | ||
git clone https://github.com/bluez/bluez.git | ||
git -C bluez checkout tags/5.48 | ||
mkdir -p ${{ github.workspace }}/local/include/bluetooth/audio | ||
mv bluez/profiles/audio/a2dp-codecs.h ${{ github.workspace }}/local/include/bluetooth/audio/a2dp-codecs.h | ||
mv bluez/lib/bluetooth.h ${{ github.workspace }}/local/include/bluetooth/audio/bluetooth.h | ||
- name: compile btcore | ||
run: | | ||
cd btrcore/ | ||
pwd | ||
ls | ||
libtoolize --force | ||
aclocal | ||
autoheader | ||
automake --force-missing --add-missing | ||
autoconf | ||
autoreconf --install | ||
export CPPFLAGS='-I${{ github.workspace }}/local/include -Wno-error=unused-result -Wno-error=stringop-truncation -L${{ github.workspace }}/local/lib' | ||
export CFLAGS='-Wno-error' | ||
export CXXFLAGS='-Wno-error' | ||
./configure --prefix=${{ github.workspace }}/local/ --enable-btr-ifce=bluez5 | ||
make V=1 | ||
make install | ||
- name : compile btMgr | ||
run: | | ||
libtoolize --force | ||
aclocal | ||
automake --force-missing --add-missing | ||
autoconf | ||
PREFIX_PATH=${{ github.workspace }}/local | ||
export PREFIX_PATH | ||
export CPPFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I$PREFIX_PATH/include/ -I$PREFIX_PATH/include/cjson/ -I/usr/include/cjson" | ||
export LDFLAGS="-L$PREFIX_PATH/lib/ -lbtrCore" | ||
export LIBCJSON_LIBS=-lcjson | ||
export CFLAGS='-Wno-error' | ||
export CXXFLAGS='-Wno-error' | ||
./configure --enable-gstreamer1=yes --enable-pi-build=yes --enable-autoconnectfeature=yes --prefix=$PREFIX_PATH | ||
make | ||
make install | ||
- name: Find binaries | ||
run: find ${{ github.workspace }}/local -type f -executable | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install and launch D-Bus | ||
run: | | ||
sudo apt-get install -y dbus dbus-x11 | ||
sudo /etc/init.d/dbus start | ||
sleep 2 | ||
- name: Add org.bluez.conf | ||
run: | | ||
ls /etc/dbus-1/system.d | ||
- name: Install Python dependencies | ||
run: pip3 install dbus-python PyGObject | ||
|
||
- name: run python in background | ||
run: | | ||
sudo python3 tests/bluezMockV2.py > ./bluezMockLogs.txt & | ||
- name: run dbus monitor | ||
run: | | ||
sudo dbus-monitor --system > dbusLogs.txt & | ||
- name: Run L2 test suite | ||
run: | | ||
sleep 2 | ||
sudo ${{ github.workspace }}/local/bin/btrMgrAutoTestSuite | ||
- name: Output logs on failure | ||
if: failure() | ||
run: | | ||
cat ./bluezMockLogs.txt | ||
cat ./dbusLogs.txt |
12 changes: 12 additions & 0 deletions
12
.github/workflows/fossid_integration_stateless_diffscan_target_repo.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Fossid Stateless Diff Scan | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
call-fossid-workflow: | ||
uses: rdkcentral/build_tools_workflows/.github/workflows/fossid_integration_stateless_diffscan.yml@develop | ||
secrets: | ||
FOSSID_CONTAINER_USERNAME: ${{ secrets.FOSSID_CONTAINER_USERNAME }} | ||
FOSSID_CONTAINER_PASSWORD: ${{ secrets.FOSSID_CONTAINER_PASSWORD }} | ||
FOSSID_HOST_USERNAME: ${{ secrets.FOSSID_HOST_USERNAME }} | ||
FOSSID_HOST_TOKEN: ${{ secrets.FOSSID_HOST_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: L1 Unit Test | ||
on: | ||
push: | ||
branches: [ main, develop] | ||
merge_group: | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
L1Tests: | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' # Not needed with a `.ruby-version` or `.tool-versions` | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
- name: Setup deps | ||
run: | | ||
sudo apt-get update | ||
echo 'DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"' >> $GITHUB_ENV | ||
sudo apt-get install -y ruby-full libglib2.0-dev libcjson-dev gcovr | ||
sudo apt-get purge -y ccache | ||
- name: Install bundler | ||
run: | | ||
gem install bundler -v 2.4.22 | ||
- name: Clone and setup CMock | ||
run: | | ||
git clone https://github.com/ThrowTheSwitch/CMock.git /opt/CMock | ||
cd /opt/CMock | ||
git checkout v2.5.3 | ||
bundle install | ||
gem install ceedling -v 0.31.1 | ||
- name: download btcore | ||
run: | | ||
git clone https://${{ secrets.RDKCM_RDKE }}@github.com/rdkcentral/bluetooth.git src/btrcore/ | ||
- name: download bluez | ||
run: | | ||
git clone https://github.com/bluez/bluez.git | ||
git -C bluez checkout tags/5.48 | ||
mkdir -p unitTest/support/include/bluetooth/audio/ | ||
mv bluez/profiles/audio/a2dp-codecs.h unitTest/support/include/bluetooth/audio/a2dp-codecs.h | ||
mv bluez/lib/bluetooth.h unitTest/support/include/bluetooth/bluetooth.h | ||
- name: Run Unit Tests | ||
run: | | ||
ceedling gcov:all utils:gcov | ||
coverage=$(gcovr -r . -s 2>/dev/null | grep 'executed' | awk '{print $3}') | ||
- name: Generate HTML Report | ||
uses: threeal/gcovr-action@v1.1.0 | ||
with: | ||
excludes: | | ||
build/test/mocks | ||
build/test/runners | ||
unitTest/ | ||
html-details: true | ||
html-out: summary-coverage.html | ||
- name: Move HTML files to own directory | ||
run: | | ||
mkdir coverage-results | ||
ls | ||
pwd | ||
mv *.html coverage-results | ||
mv *.css coverage-results | ||
- name: Upload HTML Report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Unit-test-coverage-report | ||
path: ./coverage-results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Contributing | ||
============ | ||
|
||
If you would like to contribute code to this project you can do so through GitHub by forking the repository and sending a pull request. Before RDK accepts your code into the project you must sign the RDK Contributor License Agreement (CLA). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
LICENSE |
Oops, something went wrong.