Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4df088bd authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "Add the API stats file to the golden test" into main

parents 4cdd52df 6750f761
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

python_binary_host {
    name: "csv-flattener",
    srcs: ["csv-flattener.py"],

    visibility: ["//visibility:public"],
}
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ flatten() {

    echo "Flattening $csv to $to ..."
    # "grep -v" to remove timestamps.
    "$SCRIPT_DIR"/csv-flattener "$csv" | grep -v "^  20[0-9][0-9]-[0-9][0-9]" > "$to"
    "$SCRIPT_DIR"/csv-flattener.py "$csv" | grep -v "^  20[0-9][0-9]-[0-9][0-9]" > "$to"
}

do_diff() {
+6 −1
Original line number Diff line number Diff line
@@ -40,6 +40,11 @@ fun normalizeTextLine(s: String): String {
    return uncommented.trim()
}

// Note, Soong clears unknown env vars, so $HSG_ALWAYS_SHOW_STACKTRACE doesn't work
// if the command is executed on soong. In that case, you need to change this flag directly.
val ALWAYS_SHOW_STACKTRACE: Boolean = false ||
    "1".equals(System.getenv("HSG_ALWAYS_SHOW_STACKTRACE"))

/**
 * Concatenate list [a] and [b] and return it. As an optimization, it returns an input
 * [List] as-is if the other [List] is empty, so do not modify input [List]'s.
@@ -109,7 +114,7 @@ inline fun runMainWithBoilerplate(realMain: () -> Unit) {
        success = true
    } catch (e: Throwable) {
        log.e("$executableName: Error: ${e.message}")
        if (e !is UserErrorException) {
        if (e !is UserErrorException || ALWAYS_SHOW_STACKTRACE) {
            e.printStackTrace(PrintWriter(log.getWriter(LogLevel.Error)))
        }
    } finally {
+4 −0
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@ class FileOrResource(val path: String) {
            FileReader(path)
        }
    }

    override fun toString(): String {
        return path
    }
}

fun String.ensureFileExists(): String {
Loading