Lines Matching refs:installer

425   std::string GetDebugStr(PrepareTestApexForInstall* installer) {  in GetDebugStr()  argument
428 if (installer != nullptr) { in GetDebugStr()
429 log << "test_input=" << installer->test_input << " "; in GetDebugStr()
430 log << "test_file=" << installer->test_file << " "; in GetDebugStr()
431 log << "test_installed_file=" << installer->test_installed_file << " "; in GetDebugStr()
432 log << "package=" << installer->package << " "; in GetDebugStr()
433 log << "version=" << installer->version << " "; in GetDebugStr()
632 PrepareTestApexForInstall installer( in TEST_F() local
634 if (!installer.Prepare()) { in TEST_F()
638 installer.package); in TEST_F()
640 android::binder::Status st = service_->stagePackages({installer.test_file}); in TEST_F()
651 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
652 if (!installer.Prepare()) { in TEST_F()
655 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
657 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
658 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
663 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
666 if (!installer.Prepare()) { in TEST_F()
685 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
688 if (!installer.Prepare()) { in TEST_F()
701 PrepareTestApexForInstall installer( in TEST_F() local
704 if (!installer.Prepare()) { in TEST_F()
727 auto install_fn = [&](PrepareTestApexForInstall& installer) { in TEST_F() argument
728 if (!installer.Prepare()) { in TEST_F()
731 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
732 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
745 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
746 if (!installer.Prepare()) { in TEST_F()
749 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
751 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
752 ASSERT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
754 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
755 ASSERT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
759 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
762 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
765 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
766 ASSERT_EQ(installer.test_installed_file, installer2.test_installed_file); in TEST_F()
768 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
769 const auto& apex = ApexFile::Open(installer.test_installed_file); in TEST_F()
774 const auto& new_apex = ApexFile::Open(installer.test_installed_file); in TEST_F()
780 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
781 if (!installer.Prepare()) { in TEST_F()
784 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
793 packages.push_back(installer.test_file); in TEST_F()
797 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
802 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
805 if (!installer.Prepare()) { in TEST_F()
818 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
821 if (!installer.Prepare()) { in TEST_F()
1320 PrepareTestApexForInstall installer( in TEST_F() local
1323 if (!installer.Prepare()) { in TEST_F()
1349 installer.package + "@" + std::to_string(installer.version); in TEST_F()
1361 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
1594 InstallerUPtr installer( in RunPrePost() local
1596 if (!installer->Prepare()) { in RunPrePost()
1599 pkgs.push_back(installer->test_file); in RunPrePost()
1600 installers.emplace_back(std::move(installer)); in RunPrePost()
1615 for (const InstallerUPtr& installer : installers) { in RunPrePost() local
1616 Result<bool> active = IsActive(installer->package, installer->version, in RunPrePost()
1617 installer->test_file); in RunPrePost()
1621 for (const InstallerUPtr& installer : installers) { in RunPrePost() local
1622 Result<ApexFile> apex = ApexFile::Open(installer->test_input); in RunPrePost()
1674 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1677 if (!installer.Prepare()) { in TEST_F()
1678 FAIL() << GetDebugStr(&installer); in TEST_F()
1685 << GetDebugStr(&installer); in TEST_F()
1689 if (info.moduleName == installer.package) { in TEST_F()
1695 ASSERT_EQ(installer.package, match.moduleName); in TEST_F()
1696 ASSERT_EQ(installer.version, static_cast<uint64_t>(match.versionCode)); in TEST_F()
1697 ASSERT_EQ(installer.test_file, match.modulePath); in TEST_F()
1701 << GetDebugStr(&installer); in TEST_F()
1708 << GetDebugStr(&installer); in TEST_F()
1715 << GetDebugStr(&installer); in TEST_F()
1718 << GetDebugStr(&installer); in TEST_F()
1724 << GetDebugStr(&installer); in TEST_F()
1729 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1732 if (!installer.Prepare()) { in TEST_F()
1733 FAIL() << GetDebugStr(&installer); in TEST_F()
1777 PrepareTestApexForInstall installer( in TEST_F() local
1780 if (!installer.Prepare()) { in TEST_F()
1781 FAIL() << GetDebugStr(&installer); in TEST_F()
1788 << GetDebugStr(&installer); in TEST_F()
1792 << GetDebugStr(&installer); in TEST_F()
1801 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1807 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
1808 FAIL() << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1816 << GetDebugStr(&installer); in TEST_F()
1822 if (info.moduleName == installer.package) { in TEST_F()
1823 ASSERT_EQ(installer.package, info.moduleName); in TEST_F()
1824 ASSERT_EQ(installer.version, static_cast<uint64_t>(info.versionCode)); in TEST_F()
1825 ASSERT_EQ(installer.test_file, info.modulePath); in TEST_F()
1834 << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1842 << GetDebugStr(&installer); in TEST_F()
1848 << GetDebugStr(&installer); in TEST_F()
1851 << GetDebugStr(&installer); in TEST_F()
1860 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1866 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
1867 FAIL() << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1874 << GetDebugStr(&installer); in TEST_F()
2112 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex"), in TEST_F() local
2116 if (!installer.Prepare()) { in TEST_F()
2138 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex"), in TEST_F() local
2142 if (!installer.Prepare()) { in TEST_F()
2225 PrepareTestApexForInstall installer(pkg); in PrepareBackup() local
2226 ASSERT_TRUE(installer.Prepare()) << " failed to prepare " << pkg; in PrepareBackup()
2227 const std::string& from = installer.test_file; in PrepareBackup()
2228 std::string to = std::string(kApexBackupDir) + "/" + installer.package + in PrepareBackup()
2229 "@" + std::to_string(installer.version) + ".apex"; in PrepareBackup()
2257 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2258 if (!installer.Prepare()) { in TEST_F()
2267 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2283 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2284 if (!installer.Prepare()) { in TEST_F()
2289 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2303 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
2327 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2328 if (!installer.Prepare()) { in TEST_F()
2333 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2360 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2361 if (!installer.Prepare()) { in TEST_F()
2366 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2378 UnorderedElementsAre(installer.test_installed_file)); in TEST_F()
2427 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2428 if (!installer.Prepare()) { in TEST_F()
2436 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2616 PrepareTestApexForInstall installer( in TEST_F() local
2619 if (!installer.Prepare()) { in TEST_F()
2620 FAIL() << GetDebugStr(&installer); in TEST_F()
2623 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2627 PrepareTestApexForInstall installer( in TEST_F() local
2630 if (!installer.Prepare()) { in TEST_F()
2631 FAIL() << GetDebugStr(&installer); in TEST_F()
2634 const auto& status = service_->stagePackages({installer.test_file}); in TEST_F()
2642 PrepareTestApexForInstall installer( in TEST_F() local
2646 if (!installer.Prepare()) { in TEST_F()
2647 FAIL() << GetDebugStr(&installer); in TEST_F()
2657 PrepareTestApexForInstall installer( in TEST_F() local
2661 if (!installer.Prepare()) { in TEST_F()
2662 FAIL() << GetDebugStr(&installer); in TEST_F()
2672 PrepareTestApexForInstall installer( in TEST_F() local
2675 if (!installer.Prepare()) { in TEST_F()
2676 FAIL() << GetDebugStr(&installer); in TEST_F()
2686 PrepareTestApexForInstall installer( in TEST_F() local
2689 if (!installer.Prepare()) { in TEST_F()
2690 FAIL() << GetDebugStr(&installer); in TEST_F()
2700 PrepareTestApexForInstall installer( in TEST_F() local
2703 if (!installer.Prepare()) { in TEST_F()
2704 FAIL() << GetDebugStr(&installer); in TEST_F()
2707 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2711 PrepareTestApexForInstall installer( in TEST_F() local
2714 if (!installer.Prepare()) { in TEST_F()
2715 FAIL() << GetDebugStr(&installer); in TEST_F()
2725 PrepareTestApexForInstall installer( in TEST_F() local
2729 if (!installer.Prepare()) { in TEST_F()
2730 FAIL() << GetDebugStr(&installer); in TEST_F()
2772 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2773 if (!installer.Prepare()) { in TEST_F()
2774 FAIL() << GetDebugStr(&installer); in TEST_F()
2776 ASSERT_RESULT_OK(CopyFile(installer.test_file, kSystemPath, in TEST_F()
2815 PrepareTestApexForInstall installer( in TEST_F() local
2818 if (!installer.Prepare()) { in TEST_F()
2827 installer.package + "@" + in TEST_F()
2828 std::to_string(installer.version) + ".new"; in TEST_F()