1# Copyright 2023 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15mkdir -p /tmp/logs/scripted_beacon_test/
16chmod 200 scripts/scripted_beacon_test/no_permission.pb
17chmod 200 scripts/scripted_beacon_test/grant_permission.pb
18# ls -l scripts/scripted_beacon_test/*.pb
19$ANDROID_BUILD_TOP/out/host/linux-x86/bin/root-canal 2> /tmp/logs/scripted_beacon_test/root_canal.log &
20sleep 1
21python3 scripts/test_channel.py 6401 < scripts/scripted_beacon_test/add_beacons > /tmp/logs/scripted_beacon_test/test_channel.log &
22python3 scripts/hci_socket.py 6402 < scripts/scripted_beacon_test/start_scan > /tmp/logs/scripted_beacon_test/hci_device.log &
23sleep 5
24chmod 640 scripts/scripted_beacon_test/grant_permission.pb
25# ls -l scripts/scripted_beacon_test/*.pb
26sleep 15
27echo "Done"
28chmod 640 scripts/scripted_beacon_test/no_permission.pb
29# ls -l scripts/scripted_beacon_test/*.pb
30gqui /tmp/logs/scripted_beacon_test/*.pb
31