Posts: 37
Threads: 3
Joined: Jul 2011
Reputation:
0
07-26-2011, 11:40 AM
(This post was last modified: 07-26-2011, 08:55 PM by soywiz.)
I wanted to help Jpcsp some time ago. But I didn't feel comfortable enough with PSP architecture, and I wanted to get more experience on it.
Now that I'm running commercial games already I have decided to offer my help. I'm not going to drop the DPspEmu development, but I want to help jpcsp with too.
I have been working on automated tests for the D Psp Emulator for a while. Since they are plain PSP programs and are only depending on Kprintf syscall for working, they should be able to work on any emulator.
I don't have lot of time, but I could help implementing a way to run those automated tests on the Jpcsp. And then with the confidence of the automated tests, I could help with refactorings and cleanups of the code.
What do you think about that?
Btw. Sorry about my bad english.
Regards.
Posts: 2,420
Threads: 30
Joined: Dec 2009
Reputation:
50
07-26-2011, 08:28 PM
(This post was last modified: 07-26-2011, 08:28 PM by gid15.)
Hi Soywiz!
congratulations about your emulator, you are making amazing progress considering you are working alone on it!
Your idea about automated tests is great! We are lacking of lot of test programs, and regression tests would be very helpful! To have them not depending on a particular emulator is really the best solution, as they can be reused by pspemu or pcsp!
gid
Posts: 37
Threads: 3
Joined: Jul 2011
Reputation:
0
Great then!
I will check the jpcsp sourcecode when I get some time and I will see how to do that.
In my emulator I run automated tests using the command line.
:: pspemu.exe --unit_tests
It launches all the tests I have done. It iterates recursively the tests_ex folder searching for .expected files. Then search for a file with the same name and .elf extension and executes it. It compares the Kprintf ouput with the one in the .expected file and shows a visual diff of the changes.
Also I can run only one tests or a few ones while I'm developing a functionality:
:: pspemu.exe --unit_tests cwd
Then before every commit I launch all the tests to check if I have introduced any regression. The more tests covering all the psp API, the less regressions can I make because I launch every test on every commit. (Still some are failing sometimes because of the multithreaded cpu execution [it introduces some indeterminacy on execution]).
In order to make this on jpcsp, I will need to start a new emulation state or reset a previous one. In a way I can load/unload several executables in a single run. And all the stuff should be independant of the display, and don't have static states that can't be resetted.
Then I will have to implement Kprintf on jpcsp and allow to hook it to be able to check on the automated tests.
At this stage it is easy to start and restart the emulation?
Posts: 75
Threads: 4
Joined: Nov 2010
Reputation:
0
Soywiz, excelent idea, your help would be a great plus for the Jpcsp team, no doubt about that
. Congratulions for your emu too
People in videogames are blind
Dark Devils Translations team
Posts: 224
Threads: 8
Joined: May 2009
Reputation:
3
It would be great if the tests programs produced a file on the memory stick that could be analysed later. Then, I would be able to run them nightly on the buildbot and we would then have automated regression tests.
Posts: 2,420
Threads: 30
Joined: Dec 2009
Reputation:
50
Kprintf implemented in r2240, sending its output to kprintf.txt (configured in log4j).
Always include a complete log file at INFO level in your reports. Thanks! How to post a log