[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] Testpackage gets better

From: Peeter Vois
Subject: [avr-libc-dev] Testpackage gets better
Date: Wed, 16 Nov 2005 21:33:25 +0200

Hi all,

The testpackage can be found at:


I have set up the package structure for tests.
+ the test scripts must be placed as the corresponding source is in
   directories under directory testcases and named as test_*.py
+ the test scripts do not need to import any modules and they are 
   started in master script test.py, which searches through
   all testcases subdirectories for test files
+ there is global statistics and iteration counter object i that must
   be used for statistical output in tests.

+ Kickstart documentation
+ support for single test execution
+ support for other data types than float

P.S. I've created test for log() calculation. (No edge effects under
account now). This test shows that log() does not match exactly to what
PC expects. See the example output below.

Best Regards ...

---- my testrun example ----
address@hidden:~/Projektid/avrtest$ sh testit.sh 
/usr/lib/python2.4/whrandom.py:38: DeprecationWarning: the whrandom
module is deprecated; please use the random module  DeprecationWarning)
// avr-gcc -O0 -mmcu=atmega8 <src> -o <elf> avrlib/avr/lib/avr4/libm.a
#include <math.h>

volatile float a;
volatile float c;

int main( void )
        c = log( a );

testing logarithm :  1 %      
ERROR: expected 9.79560947418 result 9.79560852051
testing logarithm : STOPPED 
// avr-gcc -O0 -mmcu=atmega8 <src> -o <elf> avrlib/avr/lib/avr4/libm.a
#include <math.h>

volatile float a;
volatile float b;
volatile float c;

int main( void )
        c = a * b;

testing concrete multiplication :       
test 2.136 * 3 =  6.40799999237  but got 6.40799999237
testing different multiplicatin : FINISHED    
testing sequential multiplication : FINISHED    

Number of tests performed:  4
Number of failed tests   :  1 

List of failed tests:
-> testing logarithm in testcases/libm/fplib/test_log.py

reply via email to

[Prev in Thread] Current Thread [Next in Thread]