commit | fe071f52061196a79841d097fefb53468990e2bc | [log] [tgz] |
---|---|---|
author | Zach Johnson <zachoverflow@google.com> | Wed Apr 08 18:28:08 2020 -0700 |
committer | Zach Johnson <zachoverflow@google.com> | Wed Apr 08 18:47:16 2020 -0700 |
tree | bfe04ceb4f7d7e3d1342807e9bd1591852881ddd | |
parent | 99c567d61846ec540efde1dc32edcfc7f7033e08 [diff] |
add beginings of behavior.py, a fluent behavior composer Has getting the right cert behavior ever left you frustrated? Is it too hard to know what a test is exactly doing? Does creating the right responses ever feel like a game of telephone? Introducing behavior.py - now you can write tests more naturally and get context locally in the test on what will happen, instead of opaque behavior in CertXYZ. Now basically, the only new principal involved is that instead of power being generated by the relative motion of conductors and fluxes it’s produced by the modial interaction of magneto-reluctance and capacitive diractance. The original behaviors had a base plate of prefabulated amulite, surmounted by a malleable logarithmic casing in such a way that the two spurving bearings were in a direct line with the panametric fan. behavior.py has now reached a high level of development, and it’s being successfully used in the operation of milford trenions. It’s available soon; wherever Rockwell Automation products are sold. e.g. self.cert_l2cap.reply_with_unacceptable_parameters() (when is it going to?, is it always going to? can I make it do it 2 times and then reply with something else?) now becomes when(self.cert_l2cap).config_request(anything()) .then().reply_with_unacceptable_parameters() yes, it's longer, but now the exact behavior is clear. or you could imagine something like: when(self.cert_l2cap).config_request(L2capMatchers.ConfigRequest(mode=BASIC)) .then().reply_with_ertm() Test: cert/run --host Change-Id: I81133db3174446c0b9380da795dbb0e9f9bcf2a3
Just build AOSP - Fluoride is there by default.
Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang 3.8.0
mkdir ~/fluoride cd ~/fluoride git clone https://android.googlesource.com/platform/packages/modules/Bluetooth/system
Install dependencies (require sudo access):
cd ~/fluoride/bt build/install_deps.sh
Then fetch third party dependencies:
cd ~/fluoride/bt mkdir third_party cd third_party git clone https://github.com/google/googletest.git git clone https://android.googlesource.com/platform/external/aac git clone https://android.googlesource.com/platform/external/libchrome git clone https://android.googlesource.com/platform/external/libldac git clone https://android.googlesource.com/platform/external/modp_b64 git clone https://android.googlesource.com/platform/external/tinyxml2
And third party dependencies of third party dependencies:
cd fluoride/bt/third_party/libchrome/base/third_party mkdir valgrind cd valgrind curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
NOTE: If packages/modules/Bluetooth/system is checked out under AOSP, then create symbolic links instead of downloading sources
cd packages/modules/Bluetooth/system mkdir third_party cd third_party ln -s ../../../external/aac aac ln -s ../../../external/libchrome libchrome ln -s ../../../external/libldac libldac ln -s ../../../external/modp_b64 modp_b64 ln -s ../../../external/tinyxml2 tinyxml2 ln -s ../../../external/googletest googletest
cd ~/fluoride/bt gn gen out/Default
cd ~/fluoride/bt ninja -C out/Default all
This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace "all" with the target of your choice, e.g. ninja -C out/Default net_test_osi
.
cd ~/fluoride/bt/out/Default LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
Follows the Chromium project Eclipse Setup Instructions until "Optional: Building inside Eclipse" section (don't do that section, we will set it up differently)
Generate Eclipse settings:
cd packages/modules/Bluetooth/system gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML location under packages/modules/Bluetooth/system/out/Default
Right click on the project. Go to Preferences->C/C++ Build->Builder Settings. Uncheck "Use default build command", but instead using "ninja -C out/Default"
Goto Behaviour tab, change clean command to "-t clean"