How to indicate which CTS module will be effect for our modification on AOSP? - cts

I'm interesting about the relationship between AOSP sourcecode and CTS test case.
If made some modification on AOSP framework code, How can we know which CTS module will effect.

Related

Issue running BLE sniffer on ESP32 complied with platform IO

here is the problem I'm searching for help for: I've created an example program for testing BLE advertisement using exactly the source found in:
https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/SampleServer.cpp
with a tiny addition of prints to make program progress visual.
When running the single file in Arduino it works perfectly as expected.
However, building it with vscode & platformio with the right setup, the program waits forever.
The right setup means correct board & Arduino platform selections which work perfectly for me for lots of other functionalities (BLE, WiFi, etc).
Following is the line where the program is waiting forever:
Thank you.
The code to run when compiled with VScode PlatfromIO

Flutter: Running integration tests breaks unit tests

Recently, I ran into an issue at work. To summarize it, I am currently working on writing test cases for an internal Flutter project. This had been working fine for a while, but after my summer vacation, it started breaking. It took me a while to figure out what roughly was going on, but I hen discovered that running integration tests generated a file named generated_main.dart under .dart_tool/flutter_build/. This was working just fine when using integration tests, however, it caused unit tests to fail due to not even loading.
I managed to identify the relevant line of code in the generated file as line eight: import 'file:///tmp/flutter_tools.WJSDQT/flutter_test_listener.YHXZLS/listener.dart' as entrypoint;. The capitalized strings of random characters are indeed random, apparently referring to a temporary path that only exists for the unit test's duration. Unit tests throw (even though not always reliably): .dart_tool/flutter_build/generated_main.dart:8:8: Error: Error when reading '/tmp/flutter_tools.WJSDQT/flutter_test_listener.YHXZLS/listener.dart': No such file or directory.
Surprisingly, there seem to be no issues when deleting the generated file. I have now added a print statement to the integration tests that tells whoever ran them that they need to delete the generated file. But this is obviously not a good solution long-term. Is there a way to disable this behavior so that testing does not become unnecessarily more complicated?
My environment is Ubuntu 20.04 LTS with Flutter 2.5.0-5.1.pre on channel beta, using Android Studio 2020.3.1. I am not currently able to test for this behavior on other platforms. The program needs to run on Linux. The test package version is 1.17.10, the newest one compatible with other dependencies.
Thank you in advance for your time.

An issue with postinst-intercept scripts

I trying to integrate Yocto 2.6.2 due to higher version packages requests from Software team. Except regular oe bitbake, in our company we have another build system which is based on python also. I am not familiar too much with it but it invokes bitbake too. Just it fetches the layers from company servers because it is not able to do it from the net and put some additional data. The issue is following. With regular bitbake everything is fine and the build goes smoothly. When I run our proprietary build system it fails on do_rootfs with the following reason copied from the log:
**NOTE: Running intercept scripts:**
**NOTE: > Executing update_icon_cache intercept ...**
**NOTE: Exit code 127. Output:**
**/home/w23698/projects/btstmp/builds/home/w23698/projects/proj_csc5_clean/proj_csc5/srcMirror/build/tmp/work/csc5-poky-linux-gnueabi/ww-image/1.0-r0/intercept_scripts-12c5ef04e386052464955905a231f7ec3a3eb8c0452bbf7c1cd0f436ca99cbf7/update_icon_cache: 6: /home/w23698/projects/btstmp/builds/home/w23698/projects/proj_csc5_clean/proj_csc5/srcMirror/build/tmp/work/csc5-poky-linux-gnueabi/ww-image/1.0-r0/intercept_scripts-12c5ef04e386052464955905a231f7ec3a3eb8c0452bbf7c1cd0f436ca99cbf7/update_icon_cache: /home/w23698/projects/btstmp/builds/home/w23698/projects/proj_csc5_clean/proj_csc5/srcMirror/build/tmp/work/csc5-poky-linux-gnueabi/ww-image/1.0-r0/recipe-sysroot-native//gdk-pixbuf-2.0/gdk-pixbuf-query-loaders: not found**
**ERROR: The postinstall intercept hook 'update_icon_cache' failed, details in /home/w23698/projects/btstmp/builds/home/w23698/projects/proj_csc5_clean/proj_csc5/srcMirror/build/tmp/work/csc5-poky-linux-gnueabi/ww-image/1.0-r0/temp/log.do_rootfs**
**DEBUG: Python function do_rootfs finished**
**ERROR: Function failed: do_rootfs**
In the normal bitbake the invoked intercept (update_gio_module_cache intercept) script is very different and it passes.
Where the decision which intercept script to call is made?
I notified that all the intercept scripts in the proprietary build system are chmoded to x. I made one very simple try to match the access flags as per original yocto poky layer. It didn't help.

How to fix "Either assembly contains no tests or proper test driver has not been found."

I am getting error as mentioned Either assembly contains no tests or proper test driver has not been found.
When i enter "nunit3-console.exe project.dll".
I tried few solutions but it doesn't help me.
Assumming you have not found a new bug in the NUnit engine, then one of the two things in the message is probably true...
You are running an assembly that has no tests
You are running an assembly with tests for which there is no driver installed, IOW tests that the engine does not know how to run.
These two things are combined in one message because it's really all one thing to the engine, which is basically telling you "I can't find anything that looks like a test to me."
Most likely, you do not have any NUnit3 tests, because knowledge of those is built into the engine itself. So, I would guess you are either running NUnit V2 tests or tests from some foreign framework, like xunit or microsoft test.
For more of an answer, please tell us what kind of tests you are running. What testing framework (and version) do your tests reference? If you are running NUnit V2 tests, do you have the V2 Framework Driver extension installed?
So... maybe there is a bug in the NUnit engine.
I had this exact same error message on my build server. At the same time the tests were running fine in Visual Studio (2015 with Resharper).
This happened when I started converting existing xunit to nunit tests in an assembly. As soon as I removed the last xunit test, the error went away.
Try to comment out everything except NUnit tests to see if this fixes the problem for you.

Anyone successful in debugging unit tests for iPhone?

I found examples on how to debug your unit test in Cocoa or the ADC page here.
But I can't get the debugging to work for an iPhone app target. I can get the tests up and running and they are run during the build, but what I need is to debug the tests for some of the more complex failures.
You might consider moving your tests to GHUnit, where they run in a normal application target, so debugging is straightforward.
This can be done by setting up a separate Executable for the project that uses the otest tool to run the unit tests, after setting a bunch of relevant environment variables for the executable. I have used this method to successfully debug SenTestKit logic unit tests.
I found the following links helpful:
http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html (also contains help to fix common errors encountered setting up the project).
http://cocoawithlove.com/2009/12/sample-iphone-application-with-complete.html (covers both logic tests and application tests)
http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/otest.1.html (Man Page for otest XCode tool)
The NSLog messages show up in Console.app
Should give you a starting point.
In Xcode 4, you can set breakpoints in your unit tests.
Create a new project with "include unit tests" checked.
Put a breakpoint in the failing unit test.
Press Command-U to test.
If you do Build & Go instead of just build, then you can set breakpoints in your unit tests and debug them traditionally. This is if you are using the google toolbox for iphone unit testing; i don't know how you are doing it and if the process is different.