mirror of
https://gitee.com/openharmony/ability_ability_runtime
synced 2024-12-04 05:22:25 +00:00
!9472 为 cj ability delegator 添加 finishtest
Merge pull request !9472 from Luckyoranges/feature_cj_ability_delegator_finishtest
This commit is contained in:
commit
2ad5c0af8a
@ -63,6 +63,11 @@ std::string CJShellCmdResult::Dump()
|
||||
{
|
||||
return shellCmdResultr_->Dump();
|
||||
}
|
||||
|
||||
void CJAbilityDelegator::FinishTest(const char* msg, int64_t code)
|
||||
{
|
||||
delegator_->FinishUserTest(msg, code);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
int64_t FFIAbilityDelegatorRegistryGetAbilityDelegator()
|
||||
@ -144,6 +149,15 @@ int32_t FFIAbilityDelegatorApplicationContext(int64_t id)
|
||||
}
|
||||
return appContext->GetID();
|
||||
}
|
||||
|
||||
void FFIAbilityDelegatorFinishTest(int64_t id, const char* msg, int64_t code)
|
||||
{
|
||||
auto cjDelegator = FFI::FFIData::GetData<CJAbilityDelegator>(id);
|
||||
if (cjDelegator == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::CONTEXT, "cj delegator is null.");
|
||||
}
|
||||
cjDelegator->FinishTest(msg, code);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -34,6 +34,7 @@ public:
|
||||
int32_t StartAbility(const AAFwk::Want& want);
|
||||
std::shared_ptr<AppExecFwk::ShellCmdResult> ExecuteShellCommand(const char* cmd, int64_t timeoutSec);
|
||||
std::shared_ptr<AbilityRuntime::ApplicationContext> GetAppContext();
|
||||
void FinishTest(const char* msg, int64_t code);
|
||||
|
||||
private:
|
||||
std::shared_ptr<AppExecFwk::AbilityDelegator> delegator_;
|
||||
@ -58,6 +59,7 @@ CJ_EXPORT int32_t FFIGetExitCode(int64_t id);
|
||||
CJ_EXPORT const char* FFIGetStdResult(int64_t id);
|
||||
CJ_EXPORT const char* FFIDump(int64_t id);
|
||||
CJ_EXPORT int32_t FFIAbilityDelegatorApplicationContext(int64_t id);
|
||||
CJ_EXPORT void FFIAbilityDelegatorFinishTest(int64_t id, const char* msg, int64_t code);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ int FFIGetExitCode();
|
||||
int FFIGetStdResult();
|
||||
int FFIDump();
|
||||
int FFIAbilityDelegatorApplicationContext();
|
||||
int FFIAbilityDelegatorFinishTest();
|
||||
|
||||
struct AbilityContextBroker {
|
||||
int64_t isAbilityContextExisted = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user