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

Commit 72f812f6 authored by Jihoon Kang's avatar Jihoon Kang
Browse files

Add a diff test phony target per partition

This enables running diff test per partition indenpendently.

Test: m soong_generated_system_filesystem_test
Change-Id: Ie897b7c5bcb66a676c7fbbdb48207082213eac77
parent 991d11df
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -499,10 +499,14 @@ func (f *filesystemCreator) GenerateAndroidBuildActions(ctx android.ModuleContex

	var diffTestFiles []android.Path
	for _, partitionType := range f.properties.Generated_partition_types {
		diffTestFiles = append(diffTestFiles, f.createDiffTest(ctx, partitionType))
		diffTestFile := f.createDiffTest(ctx, partitionType)
		diffTestFiles = append(diffTestFiles, diffTestFile)
		ctx.Phony(fmt.Sprintf("soong_generated_%s_filesystem_test", partitionType), diffTestFile)
	}
	for _, partitionType := range f.properties.Unsupported_partition_types {
		diffTestFiles = append(diffTestFiles, createFailingCommand(ctx, fmt.Sprintf("Couldn't build %s partition", partitionType)))
		diffTestFile := createFailingCommand(ctx, fmt.Sprintf("Couldn't build %s partition", partitionType))
		diffTestFiles = append(diffTestFiles, diffTestFile)
		ctx.Phony(fmt.Sprintf("soong_generated_%s_filesystem_test", partitionType), diffTestFile)
	}
	ctx.Phony("soong_generated_filesystem_tests", diffTestFiles...)
}