Criteria.Tools.Executor————测试


[root@localhost lib]# pwd
/opt/cBPM-android/criteria-lin/lib
[root@localhost lib]# adb push executer /data/data
3352 KB/s (22209660 bytes in 6.469s)
[root@localhost lib]# adb root
[root@localhost lib]# adb shell
root@mb526:/ # cd data/data/
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: No such file or directory

root@mb526:/data/data # mount -o remount,rw /
root@mb526:/data/data # mkdir -p /usr/lib
root@mb526:/data/data # cp /system/lib/libc.so /system/lib/libdl.so /usr/lib/
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: No such file or directory
1|root@mb526:/data/data # ln -s /usr/lib/libc.so /usr/lib/libc.so.1
1|root@mb526:/data/data # ln -s /usr/lib/libdl.so /usr/lib/libdl.so.1
root@mb526:/data/data # ./executer
/system/bin/sh: ./executer: Permission denied
root@mb526:/data/data # ll /usr/lib/lib*
-rw-r--r-- root     root       306604 2015-09-22 08:16 libc.so
lrwxrwxrwx root     root              2015-09-22 08:17 libc.so.1 -> /usr/lib/libc.so
-rw-r--r-- root     root         9348 2015-09-22 08:16 libdl.so
lrwxrwxrwx root     root              2015-09-22 08:17 libdl.so.1 -> /usr/lib/libdl.so
root@mb526:/data/data # chmod 777 /usr/lib/lib*so


root@mb526:/data/data # ./executer TestNotePad
root@mb526:/data/data # ./executer StartEnd


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1|root@mb526:/data/data # ./executer TestNotePad                                                                                      
The program will perform the following steps:

1: Criteria session initialization (only one time)
    ----- for each process (begin) -----
2: Create process instance from template
3: Execute process instance just created
    ----- for each process (end) -----
4: Querying for activity pending
5: close criteria session

Press a Key for beginning................................................
 
Criteria session Initialization.....(look at Executor trace file)
Criteria session Initialization [KO].Error[Impossible to retrieve ${CRITERIA_HOME}]. Exit.

//手机
root@mb526:/data/data # mkdir -p criteria/database/processTemplate/                     

//宿主机
[root@localhost criteria-lin]# adb push bin/Criteria/Debug/Tools.Executor/database/processTemplate/ /data/data/database/processTemplate/
[root@localhost criteria-lin]# adb push bin/Criteria/Debug/Tools.Executor/database/Criteria.xml /data/data/criteria/database

//手机
root@mb526:/ # cd data/data/criteria
root@mb526:/data/data # ./executer TestNotePad
root@mb526:/data/data # ./executer StartEnd




++++++++++++++++++++++++++++++++++++++++下面内容说明,只需要设置  环境变量
[root@localhost criteria-lin]# grep criteria-lin -R |grep -v ".d:"|grep cpp|grep -v log.txt|grep -v .cbp|grep -v .trace
src/Criteria/Criteria.WorkflowEngine/DataBase/FileSystemDataBase.cpp:        //sFile = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor/database/Criteria.xml";
src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp:        //String sWfHome = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor";
src/Criteria/Criteria.WorkflowEngine/WAPI/WAPI.cpp~:        //String sWfHome = "/opt/cBPM/criteria-lin/bin/Criteria/Debug/Tools.Executor";
include/bOS/bOSWin32.h://ztg add   /opt/cBPM/criteria-lin/reference/cpp/include
include/cpp/windows.h:// come from /opt/cBPM/criteria-lin/src/Criteria/Criteria.Libraries.bOS/bOSWin32.h
include/cpp/windows.h://ztg add   /opt/cBPM/criteria-lin/reference/cpp/include
[root@localhost criteria-lin]#
++++++++++++++++++++++++++++++++++++++++ android 设置 环境变量
export WF_HOME=/data/data/criteria
export CRITERIA_HOME=/data/data/criteria
export CM_TRACEPATH=/data/data/criteria
export CM_ALLPATH=/data/data/criteria
 
//手机
root@mb526:/ # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria
root@mb526:/ # cd data/data/criteria
root@mb526:/data/data/criteria # ./executer TestNotePad
root@mb526:/data/data/criteria # ./executer StartEnd

放在一行:
root@mb526:/ # export WF_HOME=/data/data/criteria; export CRITERIA_HOME=/data/data/criteria; cd data/data/criteria; ./executer TestNotePad
 
CM_TRACEPATH  、CM_ALLPATH 调试 需要
linux环境变量立即生效        # .   /root/.bashrc
 
++++++++++++++++++++++++++++++++++++++++ android 通过gdbserver 调试c++
//宿主机
[root@localhost android-ndk-r8e]# pwd
/opt/android-on-linux/android-ndk-r8e

[root@localhost android-ndk-r8e]# find . -name gdbserver
./prebuilt/android-arm/gdbserver/gdbserver

[root@localhost android-ndk-r8e]# adb push ./prebuilt/android-arm/gdbserver/gdbserver /data/data/criteria
2896 KB/s (268812 bytes in 0.090s)
[root@localhost android-ndk-r8e]#


//手机
root@mb526:/data/data/criteria # ./gdbserver :1234 executer
Process executer created; pid = 7345
Listening on port 1234

//宿主机
export WF_HOME=/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
export CRITERIA_HOME=/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor

[root@localhost Tools.Executor]# pwd
/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor
[root@localhost Tools.Executor]# ls executer
executer
[root@localhost Tools.Executor]# cp database/processTemplate/TestNotePad.xml .

[root@localhost Tools.Executor]# /opt/android-on-linux/android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb

GNU gdb (GDB) 7.3.1-gg2
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>.
(gdb) shell adb forward tcp:1234 tcp:1234
(gdb) target remote localhost:1234
(gdb) file executer TestNotePad

Load new symbol table from "/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer"? (y or n) y
Reading symbols from /opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/executer...done.
`/opt/cBPM-android/criteria-lin/bin/Criteria/Debug/Tools.Executor/TestNotePad.xml': can't read symbols: File format not recognized.

(gdb)




<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(63) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
原文地址:https://www.cnblogs.com/ztguang/p/12648948.html