biometrics / likely

A compiler intermediate representation for image recognition and heterogeneous computing.
http://www.liblikely.org
Other
78 stars 11 forks source link

Add regression tests #40

Closed anatol closed 10 years ago

anatol commented 10 years ago

As a software developer and package maintainer I think it is a good idea to have a set of regression tests that allow to check that compiled library/binary really works on the system. So I can use make check during my package build.

jklontz commented 10 years ago

In addition to providing speed measurements, correctness testing this is the other purpose of benchmark. We should bind make check to call this function.

jklontz commented 10 years ago

make check was taken, run make test for regression testing

anatol commented 10 years ago

Thanks for doing this. When I run make test on Linux Arch I have the binary crash. Here is the log

copysign{-1}    u16     4096    Parallel    
copysign{-1}    i32     4096    Serial      
copysign{-1}    i32     4096    Parallel    
copysign{-1}    f32     4096    Serial      
copysign{-1}    f32     4096    Parallel    
copysign{-1}    f64     4096    Serial      
copysign{-1}    f64     4096    Parallel    
floor   u8  4096    Serial      
floor   u8  4096    Parallel    
floor   u16     4096    Serial      
floor   u16     4096    Parallel    
floor   i32     4096    Serial      
floor   i32     4096    Parallel    
floor   f32     4096    Serial      
floor   f32     4096    Parallel    
floor   f64     4096    Serial      
floor   f64     4096    Parallel    
ceil    u8  4096    Serial      
ceil    u8  4096    Parallel    
ceil    u16     4096    Serial      
ceil    u16     4096    Parallel    
ceil    i32     4096    Serial      
ceil    i32     4096    Parallel    
ceil    f32     4096    Serial      
ceil    f32     4096    Parallel    
ceil    f64     4096    Serial      
ceil    f64     4096    Parallel    
trunc   u8  4096    Serial      
trunc   u8  4096    Parallel    
trunc   u16     4096    Serial      
trunc   u16     4096    Parallel    
trunc   i32     4096    Serial      
trunc   i32     4096    Parallel    
trunc   f32     4096    Serial      
trunc   f32     4096    Parallel    
trunc   f64     4096    Serial      
trunc   f64     4096    Parallel    
rint    u8  4096    Serial      
rint    u8  4096    Parallel    
rint    u16     4096    Serial      
rint    u16     4096    Parallel    
rint    i32     4096    Serial      
rint    i32     4096    Parallel    
rint    f32     4096    Serial      
rint    f32     4096    Parallel    
rint    f64     4096    Serial      
rint    f64     4096    Parallel    
nearbyint   u8  4096    Serial      
nearbyint   u8  4096    Parallel    
nearbyint   u16     4096    Serial      
nearbyint   u16     4096    Parallel    
nearbyint   i32     4096    Serial      
nearbyint   i32     4096    Parallel    
nearbyint   f32     4096    Serial      
nearbyint   f32     4096    Parallel    
nearbyint   f64     4096    Serial      
nearbyint   f64     4096    Parallel    
round   u8  4096    Serial      
round   u8  4096    Parallel    
round   u16     4096    Serial      
round   u16     4096    Parallel    
round   i32     4096    Serial      
round   i32     4096    Parallel    
round   f32     4096    Serial      
round   f32     4096    Parallel    
round   f64     4096    Serial      
round   f64     4096    Parallel    
cast{f32}   u8  4096    Serial      
cast{f32}   u8  4096    Parallel    
cast{f32}   u16     4096    Serial      
cast{f32}   u16     4096    Parallel    
cast{f32}   i32     4096    Serial      
cast{f32}   i32     4096    Parallel    
cast{f32}   f32     4096    Serial      
cast{f32}   f32     4096    Parallel    
cast{f32}   f64     4096    Serial      
cast{f32}   f64     4096    Parallel    
Likely [string "return tostring(threshold{127})"]:1: attempt to call global 'threshold' (a nil value).
/bin/sh: line 1: 31881 Aborted                 (core dumped) /home/anatol/sources/archpackages/liblikely-git/src/likely/build/bin/benchmark -size 4096 --nospeed
src/CMakeFiles/test.dir/build.make:52: recipe for target 'src/CMakeFiles/test' failed
make[3]: *** [src/CMakeFiles/test] Error 134
CMakeFiles/Makefile2:17332: recipe for target 'src/CMakeFiles/test.dir/all' failed
make[2]: *** [src/CMakeFiles/test.dir/all] Error 2
CMakeFiles/Makefile2:17340: recipe for target 'src/CMakeFiles/test.dir/rule' failed
make[1]: *** [src/CMakeFiles/test.dir/rule] Error 2
Makefile:5149: recipe for target 'test' failed
make: *** [test] Error 2

Let me know if you need more information or want to me to file a separate issue.

jklontz commented 10 years ago

Forgot to expose this function in the standard library, should work now!