Commit Graph

119 Commits

Author SHA1 Message Date
Campbell Barton
bc0b5d611c Cleanup: minor edits to path test
No need for redundant ID's and correct arg order
2017-03-24 17:48:22 +11:00
Campbell Barton
50f9fc7a53 BLI_path_util: Add BLI_path_join
There weren't any convenient ways to join multiple paths in C
that accounted for corner cases.
2017-03-24 17:40:35 +11:00
Campbell Barton
d0253b2ea4 BLI_path_util: add BLI_path_name_at_index
Utility to get a file/dir in the path by index,
supporting negative indices to start from the end of the path.

Without this it wasn't straightforward to get
the a files parent directory name from a filepath.
2017-03-22 19:34:43 +11:00
Jacques Lucke
56d3cc9341 PyAPI: ID Property tests 2017-03-19 03:57:40 +11:00
Campbell Barton
f7d67835e9 Cleanup: typo in struct name 2017-02-28 00:38:33 +11:00
Sergey Sharybin
26c8d559fe Register test for mesh.split_faces() 2017-02-16 15:36:00 +01:00
Sergey Sharybin
5cbaf56b26 Cyctes tests: Commit blender.git side changes 2017-02-16 10:36:22 +01:00
Sergey Sharybin
e33e58bf23 CTests: Initial work to cover Cycles nodes with OpenGL tests
Works similar to regular Cycles tests, just does OpenGL render to
get output image.

Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.
2017-02-10 14:52:54 +01:00
Sergey Sharybin
e991af0934 Cleanup: Trailing whitespace 2017-02-10 14:08:12 +01:00
Sergey Sharybin
030e99588d Tests: Use proper order for EXPECT_EQ() 2017-02-03 12:03:59 +01:00
Sergey Sharybin
aea17a612d Tests: Use EXPECT_FALSE() instead of EXPECT_EQ(foo, false) 2017-02-03 11:52:47 +01:00
Sergey Sharybin
dc1b45ff1a Tests: Use EXPECT_TRUE() instead of EXPECT_EQ(foo, true) 2017-02-03 11:52:29 +01:00
Sergey Sharybin
c231c29afa Cycles tests: Allow python auto-exec 2017-02-01 10:13:40 +01:00
lazydodo
64f5afdb89 [Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons

1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.

This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there

5 has been fixed in rBL61751

Reviewers: juicyfruit, brecht, sergey

Reviewed By: sergey

Subscribers: Blendify

Tags: #cycles, #automated_testing

Differential Revision: https://developer.blender.org/D2367
2017-01-25 09:37:19 -07:00
Sergey Sharybin
67f68295be Cycles tests: Rework output messages
Made them closer to how GTest shows the output, so reading test logs
is easier now (at least feels more uniform).

Additionally now we know how much time tests are taking so can tweak
samples/resolution to reduce render time of slow tests.

It is now also possible to enable colored messages using magic
CYCLESTEST_COLOR environment variable. This makes it even easier to
visually grep failed/passed tests using `ctest -R cycles -V`.
2017-01-12 09:47:54 +01:00
Bastien Montagne
acbb84b021 Add BLI_string_utf8 specific test.
This test should ensure we correctly detect all invalid utf-8 sequences in a given string.

DISCLAIMER:
Do not run this with current code - you'll either laugh or cry, nearly *all* checks fail!

Based on utf-8 decoder stress-test (https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
2016-12-31 16:10:20 +01:00
Sergey Sharybin
c5510df268 tests: Update hash for OBJ
Was a recent update of UV precision.
2016-11-02 15:35:18 +01:00
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