This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Development offering
#1
Question 
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.
Reply
#2
Sure! Big Grin
All help is welcome, and those tests could really be useful.

By the way, congratulations on the new release! Wink
Reply
#3
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
Reply
#4
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?
Reply
#5
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
Reply
#6
(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
Reply
#7
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.
Reply
#8
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.
Reply
#9
(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
Reply
#10
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)