Lines Matching refs:installer
428 std::string GetDebugStr(PrepareTestApexForInstall* installer) { in GetDebugStr() argument
431 if (installer != nullptr) { in GetDebugStr()
432 log << "test_input=" << installer->test_input << " "; in GetDebugStr()
433 log << "test_file=" << installer->test_file << " "; in GetDebugStr()
434 log << "test_installed_file=" << installer->test_installed_file << " "; in GetDebugStr()
435 log << "package=" << installer->package << " "; in GetDebugStr()
436 log << "version=" << installer->version << " "; in GetDebugStr()
624 PrepareTestApexForInstall installer( in TEST_F() local
626 if (!installer.Prepare()) { in TEST_F()
630 installer.package); in TEST_F()
632 android::binder::Status st = service_->stagePackages({installer.test_file}); in TEST_F()
643 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
644 if (!installer.Prepare()) { in TEST_F()
647 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
649 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
650 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
655 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
658 if (!installer.Prepare()) { in TEST_F()
677 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
680 if (!installer.Prepare()) { in TEST_F()
693 PrepareTestApexForInstall installer( in TEST_F() local
696 if (!installer.Prepare()) { in TEST_F()
719 auto install_fn = [&](PrepareTestApexForInstall& installer) { in TEST_F() argument
720 if (!installer.Prepare()) { in TEST_F()
723 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
724 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
737 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
738 if (!installer.Prepare()) { in TEST_F()
741 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
743 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
744 ASSERT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
746 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
747 ASSERT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
751 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
754 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
757 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
758 ASSERT_EQ(installer.test_installed_file, installer2.test_installed_file); in TEST_F()
760 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
761 const auto& apex = ApexFile::Open(installer.test_installed_file); in TEST_F()
766 const auto& new_apex = ApexFile::Open(installer.test_installed_file); in TEST_F()
772 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
773 if (!installer.Prepare()) { in TEST_F()
776 ASSERT_EQ(std::string("com.android.apex.test_package"), installer.package); in TEST_F()
785 packages.push_back(installer.test_file); in TEST_F()
789 EXPECT_TRUE(RegularFileExists(installer.test_installed_file)); in TEST_F()
794 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
797 if (!installer.Prepare()) { in TEST_F()
810 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
813 if (!installer.Prepare()) { in TEST_F()
960 PrepareTestApexForInstall installer( in TEST_F() local
966 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
967 FAIL() << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
974 << GetDebugStr(&installer); in TEST_F()
1356 PrepareTestApexForInstall installer( in TEST_F() local
1359 if (!installer.Prepare()) { in TEST_F()
1385 installer.package + "@" + std::to_string(installer.version); in TEST_F()
1397 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
1655 InstallerUPtr installer( in RunPrePost() local
1657 if (!installer->Prepare()) { in RunPrePost()
1660 pkgs.push_back(installer->test_file); in RunPrePost()
1661 installers.emplace_back(std::move(installer)); in RunPrePost()
1676 for (const InstallerUPtr& installer : installers) { in RunPrePost() local
1677 Result<bool> active = IsActive(installer->package, installer->version, in RunPrePost()
1678 installer->test_file); in RunPrePost()
1682 for (const InstallerUPtr& installer : installers) { in RunPrePost() local
1683 Result<ApexFile> apex = ApexFile::Open(installer->test_input); in RunPrePost()
1735 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1738 if (!installer.Prepare()) { in TEST_F()
1739 FAIL() << GetDebugStr(&installer); in TEST_F()
1746 << GetDebugStr(&installer); in TEST_F()
1750 if (info.moduleName == installer.package) { in TEST_F()
1756 ASSERT_EQ(installer.package, match.moduleName); in TEST_F()
1757 ASSERT_EQ(installer.version, static_cast<uint64_t>(match.versionCode)); in TEST_F()
1758 ASSERT_EQ(installer.test_file, match.modulePath); in TEST_F()
1762 << GetDebugStr(&installer); in TEST_F()
1769 << GetDebugStr(&installer); in TEST_F()
1776 << GetDebugStr(&installer); in TEST_F()
1779 << GetDebugStr(&installer); in TEST_F()
1785 << GetDebugStr(&installer); in TEST_F()
1790 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1793 if (!installer.Prepare()) { in TEST_F()
1794 FAIL() << GetDebugStr(&installer); in TEST_F()
1838 PrepareTestApexForInstall installer( in TEST_F() local
1841 if (!installer.Prepare()) { in TEST_F()
1842 FAIL() << GetDebugStr(&installer); in TEST_F()
1849 << GetDebugStr(&installer); in TEST_F()
1853 << GetDebugStr(&installer); in TEST_F()
1862 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1868 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
1869 FAIL() << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1877 << GetDebugStr(&installer); in TEST_F()
1883 if (info.moduleName == installer.package) { in TEST_F()
1884 ASSERT_EQ(installer.package, info.moduleName); in TEST_F()
1885 ASSERT_EQ(installer.version, static_cast<uint64_t>(info.versionCode)); in TEST_F()
1886 ASSERT_EQ(installer.test_file, info.modulePath); in TEST_F()
1895 << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1903 << GetDebugStr(&installer); in TEST_F()
1909 << GetDebugStr(&installer); in TEST_F()
1912 << GetDebugStr(&installer); in TEST_F()
1926 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex"), in TEST_F() local
1932 if (!installer.Prepare() || !installer2.Prepare()) { in TEST_F()
1933 FAIL() << GetDebugStr(&installer) << GetDebugStr(&installer2); in TEST_F()
1940 << GetDebugStr(&installer); in TEST_F()
2178 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex"), in TEST_F() local
2182 if (!installer.Prepare()) { in TEST_F()
2204 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex"), in TEST_F() local
2208 if (!installer.Prepare()) { in TEST_F()
2289 PrepareTestApexForInstall installer(pkg); in PrepareBackup() local
2290 ASSERT_TRUE(installer.Prepare()) << " failed to prepare " << pkg; in PrepareBackup()
2291 const std::string& from = installer.test_file; in PrepareBackup()
2292 std::string to = std::string(kApexBackupDir) + "/" + installer.package + in PrepareBackup()
2293 "@" + std::to_string(installer.version) + ".apex"; in PrepareBackup()
2321 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2322 if (!installer.Prepare()) { in TEST_F()
2331 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2351 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2352 if (!installer.Prepare()) { in TEST_F()
2361 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2378 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2379 if (!installer.Prepare()) { in TEST_F()
2384 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2398 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test.apex")); in TEST_F() local
2422 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2423 if (!installer.Prepare()) { in TEST_F()
2428 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2455 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2456 if (!installer.Prepare()) { in TEST_F()
2461 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2473 UnorderedElementsAre(installer.test_installed_file)); in TEST_F()
2518 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2519 if (!installer.Prepare()) { in TEST_F()
2527 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2710 PrepareTestApexForInstall installer( in TEST_F() local
2713 if (!installer.Prepare()) { in TEST_F()
2714 FAIL() << GetDebugStr(&installer); in TEST_F()
2717 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2721 PrepareTestApexForInstall installer( in TEST_F() local
2725 if (!installer.Prepare()) { in TEST_F()
2726 FAIL() << GetDebugStr(&installer); in TEST_F()
2736 PrepareTestApexForInstall installer( in TEST_F() local
2740 if (!installer.Prepare()) { in TEST_F()
2741 FAIL() << GetDebugStr(&installer); in TEST_F()
2751 PrepareTestApexForInstall installer( in TEST_F() local
2754 if (!installer.Prepare()) { in TEST_F()
2755 FAIL() << GetDebugStr(&installer); in TEST_F()
2765 PrepareTestApexForInstall installer( in TEST_F() local
2768 if (!installer.Prepare()) { in TEST_F()
2769 FAIL() << GetDebugStr(&installer); in TEST_F()
2779 PrepareTestApexForInstall installer( in TEST_F() local
2782 if (!installer.Prepare()) { in TEST_F()
2783 FAIL() << GetDebugStr(&installer); in TEST_F()
2786 ASSERT_TRUE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2790 PrepareTestApexForInstall installer( in TEST_F() local
2793 if (!installer.Prepare()) { in TEST_F()
2794 FAIL() << GetDebugStr(&installer); in TEST_F()
2804 PrepareTestApexForInstall installer( in TEST_F() local
2808 if (!installer.Prepare()) { in TEST_F()
2809 FAIL() << GetDebugStr(&installer); in TEST_F()
2819 PrepareTestApexForInstall installer(GetTestFile("corrupted_b146895998.apex"), in TEST_F() local
2823 if (!installer.Prepare()) { in TEST_F()
2824 FAIL() << GetDebugStr(&installer); in TEST_F()
2834 PrepareTestApexForInstall installer(GetTestFile("corrupted_b146895998.apex")); in TEST_F() local
2836 if (!installer.Prepare()) { in TEST_F()
2837 FAIL() << GetDebugStr(&installer); in TEST_F()
2840 ASSERT_FALSE(IsOk(service_->stagePackages({installer.test_file}))); in TEST_F()
2876 PrepareTestApexForInstall installer(GetTestFile("apex.apexd_test_v2.apex")); in TEST_F() local
2877 if (!installer.Prepare()) { in TEST_F()
2878 FAIL() << GetDebugStr(&installer); in TEST_F()
2880 ASSERT_RESULT_OK(CopyFile(installer.test_file, kSystemPath, in TEST_F()
2921 PrepareTestApexForInstall installer( in TEST_F() local
2924 if (!installer.Prepare()) { in TEST_F()
2933 installer.package + "@" + in TEST_F()
2934 std::to_string(installer.version) + ".new"; in TEST_F()