Csound Csound-dev Csound-tekno Search About

[Cs-dev] CS6 - Unit Tests, Integration Tests

Date2013-02-01 16:54
FromSteven Yi
Subject[Cs-dev] CS6 - Unit Tests, Integration Tests
Hi All,

I wanted to mention an update regarding unit testing and integration
testing in Csound 6.  Currently in the CS6 repo there is a tests
folder. Within it are 3  subfolders:

1) commandline - This is where CSD's for testing are placed.  CSD's
should be added as entries to the test.py file.  To run, a build
target has been added to CMake so that you can call "make csdtests"
(or "ninja csdtests", etc., depending on what build system you use).
This target will setup up the path to the built csound executable and
OPCODE6DIR64, then run the test.py suite with it.  This is used for
testing csound language and integration kind of testing.

2) c - these are c-code unit tests.  The test files should be added as
test entries in tests/c/CMakeFiles.txt (one can copy the other test
entries there, hopefully should be easy to intuit what to modify).
The test entries are using the CTest functionality that is included
with CMake to run tests.  In addition, we are using CUnit for writing
tests.  CUnit provides a number of macros for asserting results (i.e.
that a value is null, equals a string value, a number, etc.). To add a
test, add a .c file to tests/c, add a test entry in CMakeFiles.txt,
then rebuild csound.  To run the tests, you can use "make test" or
call "ctest".  Using ctest allows some options for setting what tests
to run; more information here:

http://www.cmake.org/Wiki/CMake/Testing_With_CTest

3) python - this folder currently just has a stub.  The intention for
this folder is write Csound API tests using python.  (Python seemed to
be the most common language amongst us for host languages).  Hopefully
the tests in this folder will not only benefit csound devs for
testing, but also be a sort of cookbook for application developers
wanting to use Csound in their apps.

Note: so far, the above is mostly for automated testing.  The above
folder structure was just something I had reorganized and put in, but
if others have suggestions we can move things around.  Also, we should
have a place for non-automated tests, things that would be useful to
have around but run once in a while.

Just wanted to make everyone aware that that stuff is there and how to
use it.  Please do look to include any testing files you use to one of
these test locations so we can build up our test suites!

Thanks!
steven

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-03-18 01:39
FromFelipe Sateler
SubjectRe: [Cs-dev] CS6 - Unit Tests, Integration Tests
AttachmentsNone  None  

On Fri, Feb 1, 2013 at 1:54 PM, Steven Yi <stevenyi@gmail.com> wrote:
To run the tests, you can use "make test" or
call "ctest".

It's not running anything for me (current git)...

% make test     
Running tests...
Test project /home/felipe/src/deb/csound/up/csound6/build
No tests were found!!!


--

Saludos,
Felipe Sateler

Date2013-03-18 10:50
FromSteven Yi
SubjectRe: [Cs-dev] CS6 - Unit Tests, Integration Tests
Hi Felipe,

I think the issue there may be that you need to have CUnit installed.
Could you check that?

Thanks!
steven

On Mon, Mar 18, 2013 at 1:39 AM, Felipe Sateler  wrote:
>
> On Fri, Feb 1, 2013 at 1:54 PM, Steven Yi  wrote:
>>
>> To run the tests, you can use "make test" or
>> call "ctest".
>
>
> It's not running anything for me (current git)...
>
> % make test
> Running tests...
> Test project /home/felipe/src/deb/csound/up/csound6/build
> No tests were found!!!
>
>
> --
>
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-03-20 13:12
FromFelipe Sateler
SubjectRe: [Cs-dev] CS6 - Unit Tests, Integration Tests
Hi Steven,

I (still) haven't been able to get back to my csound machine to test
that. Will try as soon as possible. THanks for the hint.

On Mon, Mar 18, 2013 at 7:50 AM, Steven Yi  wrote:
> Hi Felipe,
>
> I think the issue there may be that you need to have CUnit installed.
> Could you check that?
>
> Thanks!
> steven
>
> On Mon, Mar 18, 2013 at 1:39 AM, Felipe Sateler  wrote:
>>
>> On Fri, Feb 1, 2013 at 1:54 PM, Steven Yi  wrote:
>>>
>>> To run the tests, you can use "make test" or
>>> call "ctest".
>>
>>
>> It's not running anything for me (current git)...
>>
>> % make test
>> Running tests...
>> Test project /home/felipe/src/deb/csound/up/csound6/build
>> No tests were found!!!
>>
>>
>> --
>>
>> Saludos,
>> Felipe Sateler
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel



-- 

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2013-03-23 13:56
FromFelipe Sateler
SubjectRe: [Cs-dev] CS6 - Unit Tests, Integration Tests
On Mon, Mar 18, 2013 at 7:50 AM, Steven Yi  wrote:
> I think the issue there may be that you need to have CUnit installed.
> Could you check that?


Indeed, that was the problem.

Thanks!


--

Saludos,
Felipe Sateler

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net