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
task collectResults() { | |
doLast { | |
def ownerTable = new XmlSlurper().parse(file("owners.xml")) | |
def output = file("summary.csv") | |
output.text = '"Owner","Result","Test","Duration","Command"\r\n' | |
allprojects.each { project_x -> | |
println "Processing project ${project_x.name}" | |
def resultFiles = project_x.fileTree("build") { include '**/TEST-*.xml' } | |
resultFiles.each { file -> | |
println "Processing report ${file}" |
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
all: | |
ifeq "$(PARSE_FILE)" "true" | |
@while read crc sym module export; do \ | |
#echo "=> '{$$sym,$$crc}' <="; \ | |
done < Module.symvers | |
endif |
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
am start -a android.intent.action.VIEW -d https://www.youtube.com/watch?v=iu10TkjDFxA | |
am force-stop com.google.android.youtube.tv |
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
adb shell am instrument -w -r -e debug true com.your.package_name.test/android.support.test.runner.AndroidJUnitRunner | |
gradlew.bat connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.debug=true --continue |
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
LOCAL_PATH := $(call my-dir) | |
# ============================================================ | |
# Build the library | |
# ============================================================ | |
include $(CLEAR_VARS) | |
LOCAL_SRC_FILES := \ | |
$(call all-java-files-under,src) \ | |
$(call all-subdir-Iaidl-files) | |
LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/src/ |
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
# Execute tar_gcda_results.sh | |
sh tar_gcda_results.sh | |
# Untar gcda results | |
tar zxvf kernel_part_gcda.tar.gz -C / | |
tar zxvf non_kernel_part_gcda.tar.gz -C / | |
# Process coverage info | |
lcov --capture --rc lcov_branch_coverage=1 --directory $OBJ_PATH --output-file coverage.info | |
genhtml coverage.info --rc lcov_branch_coverage=1 --output-directory out_html |
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
* HeidiSQL: database viewer | |
https://www.heidisql.com/ | |
* DevManView: detail properties of all devices | |
https://www.nirsoft.net/utils/device_manager_view.html | |
* Online Json Viewer | |
http://jsonviewer.stack.hu | |
* Online XPath Generator | |
https://xmltoolbox.appspot.com/xpath_generator.html | |
* Online Hex editor tool | |
https://hex-works.com/eng |
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
REM Gradle 5.1.1 https:/services.gradle.org/distributions/gradle-5.1.1-all.zip | |
REM Android Gradle Plugin 'com.android.tools.build:gradle:3.4.1' | |
REM 1. Gradle 5.1.1 change project property command options | |
REM need to use '-P KEY=VALUE' or '--project-prop KEY=VALUE' instead of '-PKEY=VALUE' | |
REM Android Gradle Plugin DSL: https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ProductFlavor.html#com.android.build.gradle.internal.dsl.ProductFlavor:testInstrumentationRunnerArguments | |
REM 2. Use 'notClass' to skip test cases OR use 'class' to run specific test cases | |
REM 3. The 'tee' command exist in Windows PowerShell | |
powershell ".\gradlew.bat --info --continue \ | |
--project-prop android.testInstrumentationRunnerArguments.notClass=com.example.myapplication#useAppContext \ | |
connectedAndroidTest 2>&1 | tee log.txt" |
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
https://blog.darkthread.net/blog/powershell-learning-notes/ | |
*Important!! First time to run powershell, you need to Set-ExecutionPolicy if .ps1 is not signed | |
On a 64-bit OS you need to run Set-ExecutionPolicy for 32-bit and 64-bit PowerShell separately | |
Set-ExecutionPolicy RemoteSigned | |
Get-ExecutionPolicy | |
Set-ExecutionPolicy Unrestricted -Scope CurrentUser | |
This will set the execution policy for the current user (stored in HKEY_CURRENT_USER) rather than the local machine (HKEY_LOCAL_MACHINE). | |
This is useful if you don't have administrative control over the computer. | |
*Create full path to ".\dummyfile" and overwrite it if exist | |
New-Item -Path ".\dummyfile" -ItemType File -ErrorAction Ignore -Force |
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
# From: https://www.geeksforgeeks.org/median-two-sorted-arrays-different-sizes-ologminn-m/ | |
# def to find median of two sorted arrays | |
def findMedianSortedArrays(A, len_A, B, len_B): | |
median = 0 | |
index_in_A = 0 | |
index_in_B = 0 | |
min_index = 0 | |
max_index = len_A | |
half_length = (len_A + len_B + 1) // 2 |
OlderNewer