debug of ipdl demo(2)

2017.9.27 wednesday

afternoon


the problems now are:

1.don't know how to generate a whole directory file of executable binary with cmake?

2.don't know how these header and cpp worked together  to work things out.

some other question:

is it possible to use cmake to fix the first problem?

if not ,what would be okay?


so ,what is the best thing i should do to solve this problem of demo working.


all day learn about makefile and try to use it to compile my project.



--------------------------------------------------------------------------------------------------------------------

2017.9.28 Thursday


morning,

learn about makefile,

now try to use it in project of ipdl compile .


--------------------------------------------------------------------------------------------------------------------

2017.9.29 friday


the headers can't be found in directory as a link.



then ,use ln -s source dist

to link them .


change the headers like a fool.


but ,i get tired to debug this by change their header or its directory.

plan to change a method to build it in build .while the document is too little to make a demo.



--------------------------------------------------------------------------------------------------------------------

2017.9.30 Saturday


what should be done now to finish this demo?

another method to build in system ,read the low level document and try the build .use make ipc/ipdl get the files .maybe they should live in the object directory.


i find a useful file in /B2G-5.1.1/gecko/ipc/ipdl/test/cxx:README.TXT


  1  To add a new IPDL C++ unit test, you need to create (at least) the
  2 following files (for a test "TestFoo"):
  3 
  4   - PTestFoo.ipdl, specifying the top-level protocol used for the test
  5 
  6   - TestFoo.h, declaring the top-level parent/child actors used for
  7     the test
  8 
  9   - TestFoo.cpp, defining the top-level actors
 10 
 11   - (make sure all are in the namespace mozilla::_ipdltest)
 12 
 13 Next
 14 
 15   - add PTestFoo.ipdl to ipdl.mk
 16 
 17   - append TestFoo to the variable IPDLTESTS in Makefile.in
 18 
 19 You must define three methods in your |TestFooParent| class:
 20 
 21   - static methods |bool RunTestInProcesses()| and
 22     |bool RunTestInThreads()|.  These methods control whether
 23     to execute the test using actors in separate processes and
 24     threads respectively.  Generally, both should return true.
 25 
 26   - an instance method |void Main()|.  The test harness wil first
 27     initialize the processes or threads, create and open both actors,
 28     and then kick off the test using |Main()|.  Make sure you define
 29     it.
 30 
 31 If your test passes its criteria, please call
 32 |MOZ_IPDL_TESTPASS("msg")| and "exit gracefully".
 33 
 34 If your tests fails, please call |MOZ_IPDL_TESTFAIL("msg")| and "exit
 35 ungracefully", preferably by abort()ing.
 36 
 37 
 38 If all goes well, running
 39 
 40   make -C $OBJDIR/ipc/ipdl/test/cxx
 41 
 42 will update the file IPDLUnitTests.cpp (the test launcher), and your
 43 new code will be built automatically.
 44 
 45 
 46 You can launch your new test by invoking one of
 47 
 48   make -C $OBJDIR/ipc/ipdl/test/cxx check-proc     (test process-based tests)
 49   make -C $OBJDIR/ipc/ipdl/test/cxx check-threads  (test thread-based tests)
 50   make -C $OBJDIR/ipc/ipdl/test/cxx check          (tests both)
 51 
 52 If you want to launch only your test, run
 53 
 54   cd $OBJDIR/dist/bin
 55   ./run-mozilla.sh ./ipdlunittest TestFoo          (test in two processes, if appl.)
 56   ./run-mozilla.sh ./ipdlunittest thread:TestFoo   (test in two threads, if appl.)
 57 
 58 
 59 For a bare-bones example of adding a test, take a look at
 60 PTestSanity.ipdl, TestSanity.h, TestSanity.cpp, and how "TestSanity"
 61 is included in ipdl.mk and Makefile.in.


this gives some information about ipdl.


if change the Testfoo to 'Testopens'

1.3 files :

PTestOpens.ipdl

TestOpens.h

TestOpens.cpp



2.(make sure all are in the namespace mozilla::_ipdltest)    ???


3.add PTestFoo.ipdl(here,change as Testopen.ipdl) to ipdl.mk


i don't know where is ipdl.mk ,cannot find out it ,so just copy from internet,

https://searchcode.com/codesearch/view/883109/

IPDLSRCS =          \
  PWyciwygChannel.ipdl \
  $(NULL)
but i found that there is a moz.build and they add a lot of ipdl files in it.




4.append TestFoo to the variable IPDLTESTS in Makefile.in





5.You must define three methods in your |TestFooParent| class:


- static methods |bool RunTestInProcesses()| and     |bool RunTestInThreads()|.


- an instance method |void Main()|.



6.call

|MOZ_IPDL_TESTPASS("msg")| and "exit gracefully".


or ,

|MOZ_IPDL_TESTFAIL("msg")| and "exit ungracefully"




7.if all goes well,

make -C $OBJDIR/ipc/ipdl/test/cxx


8.

If you want to launch only your test, run


cd $OBJDIR/dist/bin   

./run-mozilla.sh ./ipdlunittest TestFoo          (test in two processes, if appl.)  

./run-mozilla.sh ./ipdlunittest thread:TestFoo   (test in two threads, if appl.) 


just have a try.


so where is parent and child ,where can i add the complement codes of hello world?


and is there anything should be done  in object dictionary ?



购物商城项目采用PHP+mysql有以及html+css jq以及layer.js datatables bootstorap等插件等开发,采用了MVC模式,建立一个完善的电商系统,通过不同用户的不同需求,进行相应的调配和处理,提高对购买用户进行配置….zip项目工程资源经过严格测试可直接运行成功且功能正常的情况才上传,可轻松复刻,拿到资料包后可轻松复现出一样的项目,本人系统开发经验充足(全领域),有任何使用问题欢迎随时与我联系,我会及时为您解惑,提供帮助。 【资源内容】:包含完整源码+工程文件+说明(如有)等。答辩评审平均分达到96分,放心下载使用!可轻松复现,设计报告也可借鉴此项目,该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的。 【提供帮助】:有任何使用问题欢迎随时与我联系,我会及时解答解惑,提供帮助 【附带帮助】:若还需要相关开发工具、学习资料等,我会提供帮助,提供资料,鼓励学习进步 【项目价值】:可用在相关项目设计中,皆可应用在项目、毕业设计、课程设计、期末/期中/大作业、工程实训、大创等学科竞赛比赛、初期项目立项、学习/练手等方面,可借鉴此优质项目实现复刻,设计报告也可借鉴此项目,也可基于此项目来扩展开发出更多功能 下载后请首先打开README文件(如有),项目工程可直接复现复刻,如果基础还行,也可在此程序基础上进行修改,以实现其它功能。供开源学习/技术交流/学习参考,勿用于商业用途。质量优质,放心下载使用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值