Add libbuildversion in converion instead of macro
Test: bp2build.sh
Change-Id: I96fa6e4dda7d54224a20bcb35414d61c6f70cf7e
diff --git a/bp2build/cc_binary_conversion_test.go b/bp2build/cc_binary_conversion_test.go
index 67d4a1c..1c9fba2 100644
--- a/bp2build/cc_binary_conversion_test.go
+++ b/bp2build/cc_binary_conversion_test.go
@@ -45,6 +45,7 @@
type ccBinaryBp2buildTestCase struct {
description string
+ filesystem map[string]string
blueprint string
targets []testBazelTarget
}
@@ -79,6 +80,7 @@
ModuleTypeUnderTestFactory: cc.BinaryFactory,
Description: description,
Blueprint: binaryReplacer.Replace(testCase.blueprint),
+ Filesystem: testCase.filesystem,
})
})
}
@@ -94,6 +96,7 @@
ModuleTypeUnderTestFactory: cc.BinaryHostFactory,
Description: description,
Blueprint: hostBinaryReplacer.Replace(testCase.blueprint),
+ Filesystem: testCase.filesystem,
})
})
}
@@ -101,6 +104,9 @@
func TestBasicCcBinary(t *testing.T) {
runCcBinaryTests(t, ccBinaryBp2buildTestCase{
description: "basic -- properties -> attrs with little/no transformation",
+ filesystem: map[string]string{
+ soongCcVersionLibBpPath: soongCcVersionLibBp,
+ },
blueprint: `
{rule_name} {
name: "foo",
@@ -146,9 +152,10 @@
"keep_symbols_list": ["symbol"],
"none": True,
}`,
- "sdk_version": `"current"`,
- "min_sdk_version": `"29"`,
- "use_version_lib": `True`,
+ "sdk_version": `"current"`,
+ "min_sdk_version": `"29"`,
+ "use_version_lib": `True`,
+ "whole_archive_deps": `["//build/soong/cc/libbuildversion:libbuildversion"]`,
},
},
},