From 49b41267bd5f173571993f006cb60f1bf6a60851 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Thu, 2 Jun 2016 14:58:32 +0200 Subject: [PATCH] STEP_NAME marco Adding marco to print name of step that failed in AppInstaller class Following must be submitted together: - https://review.tizen.org/gerrit/72827 - https://review.tizen.org/gerrit/72828 - https://review.tizen.org/gerrit/72829 Change-Id: I88056f428cc88ceb1a0c375103f4acc410314abe --- src/hybrid/step/configuration/step_merge_tpk_config.h | 2 +- src/hybrid/step/configuration/step_stash_tpk_config.h | 2 +- src/hybrid/step/encryption/step_encrypt_resources.h | 2 +- src/unit_tests/smoke_test_helper.cc | 2 ++ src/wgt/step/configuration/step_parse.h | 2 +- src/wgt/step/configuration/step_parse_recovery.h | 2 +- src/wgt/step/encryption/step_encrypt_resources.h | 2 +- src/wgt/step/encryption/step_remove_encryption_data.h | 2 +- src/wgt/step/filesystem/step_copy_preview_icons.h | 2 +- src/wgt/step/filesystem/step_create_symbolic_link.h | 2 +- src/wgt/step/filesystem/step_wgt_patch_icons.h | 2 +- src/wgt/step/filesystem/step_wgt_patch_storage_directories.h | 2 +- src/wgt/step/filesystem/step_wgt_prepare_package_directory.h | 2 +- src/wgt/step/filesystem/step_wgt_resource_directory.h | 2 +- src/wgt/step/filesystem/step_wgt_update_package_directory.h | 2 +- src/wgt/step/pkgmgr/step_generate_xml.h | 2 +- src/wgt/step/rds/step_wgt_rds_modify.h | 2 ++ src/wgt/step/security/step_add_default_privileges.h | 2 +- src/wgt/step/security/step_check_settings_level.h | 2 +- src/wgt/step/security/step_check_wgt_ime_privilege.h | 2 +- src/wgt/step/security/step_check_wgt_notification_category.h | 2 ++ src/wgt/step/security/step_direct_manifest_check_signature.h | 2 +- 22 files changed, 25 insertions(+), 19 deletions(-) diff --git a/src/hybrid/step/configuration/step_merge_tpk_config.h b/src/hybrid/step/configuration/step_merge_tpk_config.h index 0414abe..2171d59 100644 --- a/src/hybrid/step/configuration/step_merge_tpk_config.h +++ b/src/hybrid/step/configuration/step_merge_tpk_config.h @@ -25,7 +25,7 @@ class StepMergeTpkConfig : public common_installer::Step { Status undo() override { return Status::OK; } Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(MergeTpkConfig) + STEP_NAME(MergeTpkConfig) }; } // namespace configuration diff --git a/src/hybrid/step/configuration/step_stash_tpk_config.h b/src/hybrid/step/configuration/step_stash_tpk_config.h index 7cc889c..2ac4716 100644 --- a/src/hybrid/step/configuration/step_stash_tpk_config.h +++ b/src/hybrid/step/configuration/step_stash_tpk_config.h @@ -25,7 +25,7 @@ class StepStashTpkConfig : public common_installer::Step { Status undo() override { return Status::OK; } Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(StashTpkConfig) + STEP_NAME(StashTpkConfig) }; } // namespace configuration diff --git a/src/hybrid/step/encryption/step_encrypt_resources.h b/src/hybrid/step/encryption/step_encrypt_resources.h index ec66852..88b0f5b 100644 --- a/src/hybrid/step/encryption/step_encrypt_resources.h +++ b/src/hybrid/step/encryption/step_encrypt_resources.h @@ -24,7 +24,7 @@ class StepEncryptResources : public wgt::encryption::StepEncryptResources { private: void SetEncryptionRoot() override; - SCOPE_LOG_TAG(EncryptResources) + STEP_NAME(EncryptResources) }; } // namespace encryption diff --git a/src/unit_tests/smoke_test_helper.cc b/src/unit_tests/smoke_test_helper.cc index c3988d6..0d37d1c 100644 --- a/src/unit_tests/smoke_test_helper.cc +++ b/src/unit_tests/smoke_test_helper.cc @@ -23,6 +23,8 @@ class StepCrash : public ci::Step { ci::Step::Status clean() override { return ci::Step::Status::OK; } ci::Step::Status undo() override { return ci::Step::Status::OK; } ci::Step::Status precheck() override { return ci::Step::Status::OK; } + + STEP_NAME(Crash) }; } // namespace diff --git a/src/wgt/step/configuration/step_parse.h b/src/wgt/step/configuration/step_parse.h index 4a41978..eb7e7fa 100644 --- a/src/wgt/step/configuration/step_parse.h +++ b/src/wgt/step/configuration/step_parse.h @@ -74,7 +74,7 @@ class StepParse : public common_installer::Step { ConfigLocation config_location_; bool check_start_file_; - SCOPE_LOG_TAG(Parse) + STEP_NAME(Parse) }; } // namespace configuration diff --git a/src/wgt/step/configuration/step_parse_recovery.h b/src/wgt/step/configuration/step_parse_recovery.h index bc30019..5af4ce3 100644 --- a/src/wgt/step/configuration/step_parse_recovery.h +++ b/src/wgt/step/configuration/step_parse_recovery.h @@ -47,7 +47,7 @@ class StepParseRecovery : public StepParse { */ Status precheck() override; - SCOPE_LOG_TAG(ParseRecovery) + STEP_NAME(ParseRecovery) }; } // namespace configuration diff --git a/src/wgt/step/encryption/step_encrypt_resources.h b/src/wgt/step/encryption/step_encrypt_resources.h index 628b0e9..27e4d02 100644 --- a/src/wgt/step/encryption/step_encrypt_resources.h +++ b/src/wgt/step/encryption/step_encrypt_resources.h @@ -63,7 +63,7 @@ class StepEncryptResources : public common_installer::Step { bool EncryptFile(const boost::filesystem::path &src); bool ToBeEncrypted(const boost::filesystem::path &file); WgtBackendData* backend_data_; - SCOPE_LOG_TAG(EncryptResources) + STEP_NAME(EncryptResources) }; } // namespace encryption diff --git a/src/wgt/step/encryption/step_remove_encryption_data.h b/src/wgt/step/encryption/step_remove_encryption_data.h index f372e39..0fe8d67 100644 --- a/src/wgt/step/encryption/step_remove_encryption_data.h +++ b/src/wgt/step/encryption/step_remove_encryption_data.h @@ -31,7 +31,7 @@ class StepRemoveEncryptionData : public common_installer::Step { Status undo() override { return Status::OK; } Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(RemoveEncryptionData) + STEP_NAME(RemoveEncryptionData) }; } // namespace encryption } // namespace wgt diff --git a/src/wgt/step/filesystem/step_copy_preview_icons.h b/src/wgt/step/filesystem/step_copy_preview_icons.h index ee9c525..5a51d83 100644 --- a/src/wgt/step/filesystem/step_copy_preview_icons.h +++ b/src/wgt/step/filesystem/step_copy_preview_icons.h @@ -26,7 +26,7 @@ class StepCopyPreviewIcons : public common_installer::Step { Status undo() override { return Status::OK; } Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(CopyPreviewIcons) + STEP_NAME(CopyPreviewIcons) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_create_symbolic_link.h b/src/wgt/step/filesystem/step_create_symbolic_link.h index dbe650b..43b3ddb 100644 --- a/src/wgt/step/filesystem/step_create_symbolic_link.h +++ b/src/wgt/step/filesystem/step_create_symbolic_link.h @@ -56,7 +56,7 @@ class StepCreateSymbolicLink : public common_installer::Step { bool CreateSymlinksForApps(); bool CreateSymlinksForAppWidgets(); - SCOPE_LOG_TAG(SymbolicLink) + STEP_NAME(SymbolicLink) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_patch_icons.h b/src/wgt/step/filesystem/step_wgt_patch_icons.h index d4ff8fb..1f478a5 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_icons.h +++ b/src/wgt/step/filesystem/step_wgt_patch_icons.h @@ -28,7 +28,7 @@ class StepWgtPatchIcons : public common_installer::Step { Status clean() override { return Status::OK; } Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(WgtPatchIcons) + STEP_NAME(WgtPatchIcons) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h index c3a61e9..f4ab56f 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h +++ b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.h @@ -30,7 +30,7 @@ class StepWgtPatchStorageDirectories : bool ShareDirFor3x(); bool CreatePrivateTmpDir(); - SCOPE_LOG_TAG(PatchWgtStorageDirectories) + STEP_NAME(PatchWgtStorageDirectories) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.h b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.h index 6d35f30..dd98d4c 100644 --- a/src/wgt/step/filesystem/step_wgt_prepare_package_directory.h +++ b/src/wgt/step/filesystem/step_wgt_prepare_package_directory.h @@ -36,7 +36,7 @@ class StepWgtPreparePackageDirectory : public common_installer::Step { private: Status CreateSymlinkToMountPoint(); - SCOPE_LOG_TAG(WgtPreparePackageDirectory) + STEP_NAME(WgtPreparePackageDirectory) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_resource_directory.h b/src/wgt/step/filesystem/step_wgt_resource_directory.h index 7fa9a4c..f5437fd 100644 --- a/src/wgt/step/filesystem/step_wgt_resource_directory.h +++ b/src/wgt/step/filesystem/step_wgt_resource_directory.h @@ -53,7 +53,7 @@ class StepWgtResourceDirectory : public common_installer::Step { */ Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(CreateWgtResourceDirectory) + STEP_NAME(CreateWgtResourceDirectory) }; } // namespace filesystem diff --git a/src/wgt/step/filesystem/step_wgt_update_package_directory.h b/src/wgt/step/filesystem/step_wgt_update_package_directory.h index aa15c02..b8aefbb 100644 --- a/src/wgt/step/filesystem/step_wgt_update_package_directory.h +++ b/src/wgt/step/filesystem/step_wgt_update_package_directory.h @@ -24,7 +24,7 @@ class StepWgtUpdatePackageDirectory : public StepWgtPreparePackageDirectory { Status CreateBackupOfDirectories(); Status RecoverBackupOfDirectories(); - SCOPE_LOG_TAG(WgtUpdatePackageDirectory) + STEP_NAME(WgtUpdatePackageDirectory) }; } // namespace filesystem diff --git a/src/wgt/step/pkgmgr/step_generate_xml.h b/src/wgt/step/pkgmgr/step_generate_xml.h index 00b82e6..a00b9d3 100644 --- a/src/wgt/step/pkgmgr/step_generate_xml.h +++ b/src/wgt/step/pkgmgr/step_generate_xml.h @@ -37,7 +37,7 @@ class StepGenerateXml : public common_installer::Step { xmlTextWriterPtr writer, AppCompType type); - SCOPE_LOG_TAG(GenerateXML) + STEP_NAME(GenerateXML) }; } // namespace pkgmgr diff --git a/src/wgt/step/rds/step_wgt_rds_modify.h b/src/wgt/step/rds/step_wgt_rds_modify.h index 67f9d28..2812b5a 100644 --- a/src/wgt/step/rds/step_wgt_rds_modify.h +++ b/src/wgt/step/rds/step_wgt_rds_modify.h @@ -31,6 +31,8 @@ class StepWgtRDSModify : public common_installer::rds::StepRDSModify { * \return std::string */ std::string GetAppPath() override; + + STEP_NAME(WgtRDSModify) }; } // namespace rds diff --git a/src/wgt/step/security/step_add_default_privileges.h b/src/wgt/step/security/step_add_default_privileges.h index b7759a9..84c7bca 100644 --- a/src/wgt/step/security/step_add_default_privileges.h +++ b/src/wgt/step/security/step_add_default_privileges.h @@ -50,7 +50,7 @@ class StepAddDefaultPrivileges : public common_installer::Step { */ Status precheck() override; - SCOPE_LOG_TAG(AddDefaultPrivileges) + STEP_NAME(AddDefaultPrivileges) }; } // namespace security diff --git a/src/wgt/step/security/step_check_settings_level.h b/src/wgt/step/security/step_check_settings_level.h index 3dfd8ac..adc7337 100644 --- a/src/wgt/step/security/step_check_settings_level.h +++ b/src/wgt/step/security/step_check_settings_level.h @@ -50,7 +50,7 @@ class StepCheckSettingsLevel : public common_installer::Step { */ Status precheck() override { return Status::OK; } - SCOPE_LOG_TAG(CheckSettingsLevel) + STEP_NAME(CheckSettingsLevel) }; } // namespace security diff --git a/src/wgt/step/security/step_check_wgt_ime_privilege.h b/src/wgt/step/security/step_check_wgt_ime_privilege.h index d5595db..04f49c8 100644 --- a/src/wgt/step/security/step_check_wgt_ime_privilege.h +++ b/src/wgt/step/security/step_check_wgt_ime_privilege.h @@ -31,7 +31,7 @@ class StepCheckWgtImePrivilege : Status CheckImePrivilege() const; - SCOPE_LOG_TAG(CheckWgtImePrivilege) + STEP_NAME(CheckWgtImePrivilege) }; } // namespace security } // namespace wgt diff --git a/src/wgt/step/security/step_check_wgt_notification_category.h b/src/wgt/step/security/step_check_wgt_notification_category.h index 738a6ea..842b531 100644 --- a/src/wgt/step/security/step_check_wgt_notification_category.h +++ b/src/wgt/step/security/step_check_wgt_notification_category.h @@ -24,6 +24,8 @@ class StepCheckWgtNotificationCategory : Status clean() override { return Status::OK; } Status undo() override { return Status::OK; } Status precheck() override { return Status::OK; } + + STEP_NAME(CheckWgtNotificationCategory) }; } // namespace security } // namespace wgt diff --git a/src/wgt/step/security/step_direct_manifest_check_signature.h b/src/wgt/step/security/step_direct_manifest_check_signature.h index a24d910..a56a998 100644 --- a/src/wgt/step/security/step_direct_manifest_check_signature.h +++ b/src/wgt/step/security/step_direct_manifest_check_signature.h @@ -19,7 +19,7 @@ class StepDirectManifestCheckSignature private: boost::filesystem::path GetSignatureRoot() const override; - SCOPE_LOG_TAG(StepDirectManifestCheckSignature) + STEP_NAME(StepDirectManifestCheckSignature) }; } // namespace security -- 2.7.4