Commit Graph

102 Commits

Author SHA1 Message Date
Dmitry Dygalo
9fc1cfc4f1 Fix undefined variable on errors in Cycles ctests.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2201
2016-09-10 23:04:14 +02:00
Campbell Barton
83ebec7322 Replace pep8 with flake8 checker 2016-08-01 11:02:01 +10:00
Sergey Sharybin
ac655be0e3 Add GMock library which is responsive for dealing with mock objects 2016-07-29 22:19:30 +02:00
e0c7aaf5ad Fix Cycles OSL hair BSDF inconsistencies with SVM. 2016-07-29 03:29:05 +02:00
52fb441c13 Fix Cycles ctests not always deleting fail.png files on success. 2016-07-29 03:29:05 +02:00
Sergey Sharybin
04b3d682bb Cycles tests: Don't create fail file on idiff warning 2016-07-06 17:39:09 +02:00
Bastien Montagne
d3b27bd19c Fix bmesh test after recent refactor. 2016-07-04 11:48:48 +02:00
Campbell Barton
475b7f5a2c BLI_array_utils: add BLI_array_rfindindex
Array search from back to front.
2016-06-23 11:36:49 +10:00
9b618c1a5a Cycles tests: raise failure threshold, copy failed image for comparison. 2016-06-19 20:17:26 +02:00
Campbell Barton
dccf5afbef BLI_rand: add BLI_rng_get_char_n
Use to fill an array of bytes to random values.
2016-06-12 00:41:02 +10:00
Bastien Montagne
1482826075 Add 'multi small' testcase to performance Ghash tests.
This new test simply inserts and lookup a lot of time on very small ghashes
(most are < 17 items).
2016-05-30 20:04:43 +02:00
Campbell Barton
8a7d1f3b3c BLI_array_store tests
Ensure the data is valid once expanded,
and that de-duplication is working as expected.
2016-05-30 16:27:12 +10:00
Campbell Barton
f28c626574 Fix bl_load_py_modules test
- scripts that execute directly need to include their basedir in the sys.path
- modules which are in a directory without an __init__.py weren't importing.
2016-05-02 21:06:15 +10:00
Sergey Sharybin
3fcbb2bb58 Tests: Fix wrong hash after "no redundant zeroes" commit 2016-04-15 10:37:57 +02:00
Sergey Sharybin
f76dec9238 Update hash for an OBJ unit test 2016-04-04 15:22:31 +02:00
Campbell Barton
70fcecc1f7 Fix BLI_strncasestr use with a single character 2016-03-24 23:30:51 +11:00
Campbell Barton
80a7efdc1d UI: multi word filtering in search menu
D1080 by @rockets, with own improvements to tests
2016-03-23 18:51:29 +11:00
Campbell Barton
298aac33cc Tests: improve RNA default reporting
Float values were often reported with extra precision from float32 -> 64 conversion.

Add repr_float_32 to give cleaner output.
2016-02-29 11:55:44 +11:00
Bastien Montagne
fe9b21a44a Add GHash/GSet pop() feature.
Behavior is similar to python's set.pop(), it removes and returns a 'random' entry from the hash.

Notes:
* Popping will return items in same order as ghash/gset iterators (i.e. increasing
  order in internal buckets-based storage), unless ghash/gset is modified in between.
* We are keeping a track of the latest bucket we popped out (through a 'state' parameter),
  this allows for similar performances to iterators when iteratively popping a whole hash
  (without it, we are roughly O(n!), with it we are roughly O(n)...).

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1808
2016-02-20 15:28:25 +01:00
Bastien Montagne
2f7237ac78 Fix broken ghash performance gtest.
Regression from rB2dba2b3d71d9781bce45. Do not understand why MSVC needs this convoluted
allocation (looks like broken compiler crap?), but at least let's do it correctly!
2016-02-16 22:22:41 +01:00
Sergey Sharybin
2dba2b3d71 Fix gtests on Windows/MSVC
There were some missing stubs and some tests were specifically
written for Linux. Also, apparently MSVC has a limit of 64K for
the insource strings..
2016-02-06 21:21:55 +05:00
Sergey Sharybin
5508cc2d63 Fix typo in 32bytes aligned malloc test 2016-02-06 16:42:19 +01:00
Sergey Sharybin
e1f5b2b4c1 Fix GTests compilations on Windows
Unfortunately this doesn't make all tests compilable due
to all sort of weird and wonderful bad levels includes
on Windows (G referenced from bf_blenlib) but at least
allows to selectively build tests for now.
2016-02-06 15:12:28 +01:00
Campbell Barton
d924998d3e Cleanup: pep8 2016-02-01 00:47:10 +11:00
Campbell Barton
dea38d78c4 GTests: were using C++11 feature 2016-01-19 20:44:57 +11:00
Campbell Barton
9b8eb41567 GTests: split array_utils tests 2016-01-19 19:55:25 +11:00
Campbell Barton
4e6ad37fc1 GTests: array_utils 2016-01-19 08:23:08 +11:00
Sergey Sharybin
0e5e407007 Correct include directories for GTests 2016-01-04 22:16:14 +05:00
Sergey Sharybin
5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
Bastien Montagne
6ca6d29e6b Fix memleaks in our gtests. 2015-12-28 23:19:24 +01:00
858b680a50 Eigen: move C API into intern/eigen. 2015-12-10 01:58:06 +01:00
Campbell Barton
9964eed9ac PyAPI: add optional filter argument to KDTree.find 2015-12-06 21:35:32 +11:00
Bastien Montagne
be72df4f06 BLI_math: add mat3_polar_decompose, interp_m3_m3m3 and interp_m4_m4m4.
mat3_polar_decompose gives the right polar decomposition of given matrix,
as a pair (U, P) of matrices.

interp_m3_m3m3 uses that polar decomposition to perform a correct matrix interpolation,
even with non-uniformly scaled ones (where blend_m3_m3m3 would fail).

interp_m4_m4m4 just adds translation interpolation to the _m3 variant.
2015-10-09 21:26:33 +02:00
Campbell Barton
fc6f4c11ae Add test scripts to ctest & rename 2015-09-24 20:52:58 +10:00
Campbell Barton
0cf842a989 Update module test to pass w/o freestyle enabled 2015-09-23 03:36:32 +10:00
Campbell Barton
7615073e77 Update test to RNA API 2015-09-23 03:11:17 +10:00
Sybren A. Stüvel
8383a2d4cc Fix: Made bpy.path.ensure_ext compatible with compound extensions.
Extensions such as ".tar.gz" are now also supported. Before this patch,
ensure_ext('demo.tar.gz', '.tar.gz') would return 'demo.tar.tar.gz'.

This results in issues with the `ExportHelper` mix-in class; clicking
an existing file in the file dialogue warns about overwriting it
(highlighting the input box in red), but then saves to a different
file.

Also added a unit test for the new behaviour.

Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1498
2015-09-03 13:09:16 +02:00
Sergey Sharybin
8031f36261 Tests: Ignore preview render script in module loading tests 2015-08-24 09:46:41 +02:00
Bastien Montagne
7837f0e833 BLI_math 'compare' cleanup & enhancements.
This commit:
* Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats.
* Makes 'compare_vxvx' functions use that new 'compare_ff' one.
* Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats.
* Adds matching 'compare_vxvx_relative' functions.
* Adds some basic tests for compare_ff_relative.

See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative
(using a very small absolute max_diff), but these do not have exact same behavior...
Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-07-10 15:02:43 +02:00
Bastien Montagne
079b41dd37 Remove WITH_TESTS_PERFORMANCE option.
Performance tests now have their own CMake macro, which ensures they do not get
added to ctest list, so we do not have to bother about them anymore, and can always
build them (when GTests are enabled, of course).
2015-06-29 20:26:58 +02:00
Bastien Montagne
117bcfe039 GTests: do not add 'performance' tests to auto-ran tests (with ctest or 'make test')... 2015-06-29 18:15:02 +02:00
Bastien Montagne
a8bc5f0cdb Fix .obj testing. 2015-06-29 18:14:27 +02:00
Bastien Montagne
c68322c7e5 Cleanup: int/uint mismatch in printf... 2015-06-27 11:02:58 +02:00
Bastien Montagne
e170d6be7f Cleanup: all params of BLI_str partition funcs can be const... 2015-06-27 11:00:47 +02:00
Bastien Montagne
ff7a46cfad GTests for new 'end' option of BLI_str_partition_ex(). 2015-06-27 10:24:54 +02:00
Campbell Barton
1c81bcffde addon_utils default mismatch /w enable/disable
default_set argument is now False for both.
2015-06-14 05:14:43 +10:00
Campbell Barton
6e844da9da GTest: add test for listbase sorting
Check for correct sort and stable order for matching values.
2015-06-10 20:26:56 +10:00
Campbell Barton
99fba34b8d rename wiki -> manual 2015-06-08 11:34:07 +10:00
Campbell Barton
bf010c4a15 Cleanup: pep8 2015-06-07 17:28:02 +10:00
Campbell Barton
6fbb580e51 BLI_stack: gtest for clear 2015-06-03 18:09:12 +10:00