fix: playbook 支持 python 脚本
This commit is contained in:
@@ -22,18 +22,20 @@ public class PlaybookRunnable implements Runnable {
|
||||
private String tid;
|
||||
private File apkFile;
|
||||
private String packageName;
|
||||
private File playbookDir;
|
||||
private File scriptPath;
|
||||
private String type;
|
||||
private boolean reInstall;
|
||||
private boolean clearCache;
|
||||
private boolean unInstall;
|
||||
private boolean interrupt;
|
||||
|
||||
public PlaybookRunnable(EnvApiYml envApiYml, File apkFile, File playbookDir, String tid, String packageName, Boolean reInstall, Boolean clearCache, Boolean unInstall) {
|
||||
public PlaybookRunnable(EnvApiYml envApiYml, File apkFile, File scriptPath, String tid, String packageName, String type, Boolean reInstall, Boolean clearCache, Boolean unInstall) {
|
||||
this.envApiYml = envApiYml;
|
||||
this.tid = tid;
|
||||
this.apkFile = apkFile;
|
||||
this.packageName = packageName;
|
||||
this.playbookDir = playbookDir;
|
||||
this.scriptPath = scriptPath;
|
||||
this.type = type;
|
||||
this.reInstall = reInstall;
|
||||
this.clearCache = clearCache;
|
||||
this.unInstall = unInstall;
|
||||
@@ -118,7 +120,7 @@ public class PlaybookRunnable implements Runnable {
|
||||
|
||||
// exec playbook
|
||||
if (interrupt) return;
|
||||
AdbUtil.CommandResult airtestResult = adbUtil.execPlaybook(playbookDir.getPath(), tid, packageName, logFile);
|
||||
AdbUtil.CommandResult airtestResult = adbUtil.execPlaybook(scriptPath.getPath(), tid, packageName, type, logFile);
|
||||
if (0 != airtestResult.exitCode()) {
|
||||
T.FileUtil.appendString(String.format("ERROR: Exec playbook failed: exit code %s \n", airtestResult.exitCode()), logFile, "UTF-8");
|
||||
throw new APIException("playbook exec error");
|
||||
|
||||
Reference in New Issue
Block a user