Merge mpr-2021-11-05
Change-Id: Ib634fc76f35c202bd94c9484f1e5a838897abf8a
diff --git a/.gitignore b/.gitignore
index 42494a2..7195703 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@
*.iml
.idea/
gen/
+keystone
diff --git a/cmds/monkey/src/com/android/commands/monkey/Monkey.java b/cmds/monkey/src/com/android/commands/monkey/Monkey.java
index e76a89d..06a6249 100644
--- a/cmds/monkey/src/com/android/commands/monkey/Monkey.java
+++ b/cmds/monkey/src/com/android/commands/monkey/Monkey.java
@@ -175,6 +175,9 @@
/** Generate hprof reports before/after monkey runs */
private boolean mGenerateHprof;
+ /** Disable all the logs from monkey */
+ private boolean mDisableLogs = false;
+
/** If set, only match error if this text appears in the description text. */
private String mMatchDescription;
@@ -478,6 +481,9 @@
* @param command Command line to execute.
*/
private void commandLineReport(String reportName, String command) {
+ if (mDisableLogs) {
+ return;
+ }
Logger.err.println(reportName + ":");
Runtime rt = Runtime.getRuntime();
Writer logOutput = null;
@@ -897,6 +903,11 @@
} else if (opt.equals("-h")) {
showUsage();
return false;
+ } else if (opt.equals("--disable-logs")) {
+ Logger.err.println("** Monkey: all log disbled!");
+ mDisableLogs = true;
+ Logger.stdout = false;
+ Logger.logcat = false;
} else {
Logger.err.println("** Error: Unknown option: " + opt);
showUsage();
diff --git a/vendor_snapshot/update.py b/vendor_snapshot/update.py
index 9a4bb26..31e89cf 100644
--- a/vendor_snapshot/update.py
+++ b/vendor_snapshot/update.py
@@ -99,10 +99,14 @@
'Sanitize': 'sanitize',
'SanitizeMinimalDep': 'sanitize_minimal_dep',
'SanitizeUbsanDep': 'sanitize_ubsan_dep',
+ # TODO(b/181815415) remove is_lldnk when possible
+ 'IsLlndk': 'is_llndk',
'Symlinks': 'symlinks',
+ 'StaticExecutable': 'static_executable',
'InitRc': 'init_rc',
'VintfFragments': 'vintf_fragments',
'SharedLibs': 'shared_libs',
+ 'StaticLibs': 'static_libs',
'RuntimeLibs': 'runtime_libs',
'Required': 'required',
}
@@ -810,6 +814,7 @@
'option.')
snapshot_version = args.snapshot_version
+ raw_mode = args.image.strip().lower() == 'raw'
if os.path.exists(install_dir):
def remove_dir():
@@ -818,15 +823,16 @@
if args.overwrite:
remove_dir()
else:
- resp = input('Directory {} already exists. IT WILL BE REMOVED.\n'
- 'Are you sure? (yes/no): '.format(install_dir))
- if resp == 'yes':
- remove_dir()
- elif resp == 'no':
- logging.info('Cancelled snapshot install.')
- return
- else:
- raise ValueError('Did not understand: ' + resp)
+ if not raw_mode:
+ resp = input('Directory {} already exists. IT WILL BE REMOVED.\n'
+ 'Are you sure? (yes/no): '.format(install_dir))
+ if resp == 'yes':
+ remove_dir()
+ elif resp == 'no':
+ logging.info('Cancelled snapshot install.')
+ return
+ else:
+ raise ValueError('Did not understand: ' + resp)
check_call(['mkdir', '-p', install_dir])
if args.vndk_dir:
@@ -843,7 +849,9 @@
local_dir=local,
symlink=args.symlink,
install_dir=install_dir)
- gen_bp_files(args.image, vndk_dir, install_dir, snapshot_version)
+
+ if not raw_mode:
+ gen_bp_files(args.image, vndk_dir, install_dir, snapshot_version)
if __name__ == '__main__':
main()