diff options
author | 2024-09-12 23:56:31 +0000 | |
---|---|---|
committer | 2024-09-12 23:56:31 +0000 | |
commit | 4faab81e8eb35cccc05a4d6fbae835ef3b265f4e (patch) | |
tree | 943dc63b3597ce5d90586d645bc24289443b20f5 /cmd | |
parent | 167230037c312acbdef1994702f39091dcffbe0a (diff) |
Add a system test to check the mk and ninja files generated by incremental build.
Bug: 358428180
Test: Run the test locally.
Change-Id: If1862ee44976216f3c5a5c62d50c6d688d38023b
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/soong_build/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go index 24a44b4da..577c6cc74 100644 --- a/cmd/soong_build/main.go +++ b/cmd/soong_build/main.go @@ -212,7 +212,14 @@ func writeDepFile(outputFile string, eventHandler *metrics.EventHandler, ninjaDe } // Check if there are changes to the environment file, product variable file and -// soong_build binary, in which case no incremental will be performed. +// soong_build binary, in which case no incremental will be performed. For env +// variables we check the used env file, which will be removed in soong ui if +// there is any changes to the env variables used last time, in which case the +// check below will fail and a full build will be attempted. If any new env +// variables are added in the new run, soong ui won't be able to detect it, the +// used env file check below will pass. But unless there is a soong build code +// change, in which case the soong build binary check will fail, otherwise the +// new env variables shouldn't have any affect. func incrementalValid(config android.Config, configCacheFile string) (*ConfigCache, bool) { var newConfigCache ConfigCache data, err := os.ReadFile(shared.JoinPath(topDir, usedEnvFile)) |