Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Development offering
07-26-2011, 11:40 AM (This post was last modified: 07-26-2011 08:55 PM by soywiz.)
Post: #1
Question Development offering
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-26-2011, 05:13 PM
Post: #2
RE: Development offering
Sure! Big Grin
All help is welcome, and those tests could really be useful.

By the way, congratulations on the new release! Wink
Find all posts by this user
Quote this message in a reply
07-26-2011, 08:28 PM (This post was last modified: 07-26-2011 08:28 PM by gid15.)
Post: #3
RE: Development offering
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
Find all posts by this user
Quote this message in a reply
07-26-2011, 10:53 PM
Post: #4
RE: Development offering
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?
Visit this user's website Find all posts by this user
Quote this message in a reply
07-27-2011, 03:58 AM
Post: #5
RE: Development offering
Soywiz, excelent idea, your help would be a great plus for the Jpcsp team, no doubt about that Smile. Congratulions for your emu too Smile

People in videogames are blind

Dark Devils Translations team
Find all posts by this user
Quote this message in a reply
07-27-2011, 03:38 PM
Post: #6
RE: Development offering
(07-26-2011 10:53 PM)soywiz Wrote:  At this stage it is easy to start and restart the emulation?

Well, for small applications, it's quite easy to restart the emulation. I've done some resistance tests with the PSP SDK demos and the emulator seems to be capable of running a satisfactory ammount of files in a single run (by Load->Run->Restart->Load->Run) without causing any crashes.
However, heavier applications do introduce a lot of issues to this functionality, since they extensively modify the compiler's state and regularly cause RuntimeExceptions, as stated by this recent issue: http://www.emunewz.net/forum/showthread.php?tid=5913 Sad
Of course, this can and will be improved, since it's needed for the emulator to mimic the PSP properly, and your tests should be a great way to test this feature extensively too. Wink
Find all posts by this user
Quote this message in a reply
07-27-2011, 05:21 PM
Post: #7
RE: Development offering
Ok. I have created this project: http://code.google.com/p/pspautotests/
I'll move all my tests, and I'll prepare a better common way to do that. I'm still thinking about how to do some stuff.

Then we will be able to set a svn:external on each project being able to use tests on all the emulators.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-29-2011, 01:06 PM
Post: #8
RE: Development offering
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.
Find all posts by this user
Quote this message in a reply
07-30-2011, 07:30 AM
Post: #9
RE: Development offering
(07-29-2011 01:06 PM)Orphis Wrote:  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.
Great idea! We could use a log4j configuration to redirect the output of Kprintf to a different file for regression tests.

Always include a complete log file at INFO level in your reports. Thanks! How to post a log
Find all posts by this user
Quote this message in a reply
07-30-2011, 11:27 AM
Post: #10
RE: Development offering
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
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)