Browse Source

python: use CgltfImporter instead of TinyGltfImporter in tests.

It compiles significantly faster and there's no time to waste these
days!!
pull/15/head
Vladimír Vondruš 4 years ago
parent
commit
fda9e34b9d
  1. 2
      package/ci/appveyor-desktop-gles.bat
  2. 2
      package/ci/appveyor-desktop.bat
  3. 2
      package/ci/unix-desktop-gles.sh
  4. 2
      package/ci/unix-desktop.sh
  5. 6
      src/python/magnum/test/test_trade.py

2
package/ci/appveyor-desktop-gles.bat

@ -76,7 +76,7 @@ cmake .. ^
-DBUILD_STATIC=%BUILD_STATIC% ^
-DWITH_DDSIMPORTER=ON ^
-DWITH_STBIMAGEIMPORTER=ON ^
-DWITH_TINYGLTFIMPORTER=ON ^
-DWITH_CGLTFIMPORTER=ON ^
-G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b

2
package/ci/appveyor-desktop.bat

@ -83,7 +83,7 @@ cmake .. ^
-DBUILD_STATIC=%BUILD_STATIC% ^
-DWITH_DDSIMPORTER=ON ^
-DWITH_STBIMAGEIMPORTER=ON ^
-DWITH_TINYGLTFIMPORTER=ON ^
-DWITH_CGLTFIMPORTER=ON ^
%COMPILER_EXTRA% -G Ninja || exit /b
cmake --build . || exit /b
cmake --build . --target install || exit /b

2
package/ci/unix-desktop-gles.sh

@ -59,7 +59,7 @@ cmake .. \
-DBUILD_STATIC=$BUILD_STATIC \
-DWITH_DDSIMPORTER=ON \
-DWITH_STBIMAGEIMPORTER=ON \
-DWITH_TINYGLTFIMPORTER=ON \
-DWITH_CGLTFIMPORTER=ON \
-G Ninja
ninja install
cd ../..

2
package/ci/unix-desktop.sh

@ -67,7 +67,7 @@ cmake .. \
-DBUILD_STATIC=$BUILD_STATIC \
-DWITH_DDSIMPORTER=ON \
-DWITH_STBIMAGEIMPORTER=ON \
-DWITH_TINYGLTFIMPORTER=ON \
-DWITH_CGLTFIMPORTER=ON \
-G Ninja
ninja install
cd ../..

6
src/python/magnum/test/test_trade.py

@ -91,7 +91,7 @@ class ImageData(unittest.TestCase):
class MeshData(unittest.TestCase):
def test(self):
# The only way to get a mesh instance is through a manager
importer = trade.ImporterManager().load_and_instantiate('TinyGltfImporter')
importer = trade.ImporterManager().load_and_instantiate('CgltfImporter')
importer.open_file(os.path.join(os.path.dirname(__file__), 'mesh.glb'))
mesh = importer.mesh(0)
@ -209,7 +209,7 @@ class Importer(unittest.TestCase):
def test_mesh(self):
# importer refcounting tested in image2d
importer = trade.ImporterManager().load_and_instantiate('TinyGltfImporter')
importer = trade.ImporterManager().load_and_instantiate('CgltfImporter')
importer.open_file(os.path.join(os.path.dirname(__file__), 'mesh.glb'))
self.assertEqual(importer.mesh_count, 3)
self.assertEqual(importer.mesh_level_count(0), 1)
@ -221,7 +221,7 @@ class Importer(unittest.TestCase):
def test_mesh_index_oob(self):
# importer refcounting tested in image2d
importer = trade.ImporterManager().load_and_instantiate('TinyGltfImporter')
importer = trade.ImporterManager().load_and_instantiate('CgltfImporter')
importer.open_file(os.path.join(os.path.dirname(__file__), 'mesh.glb'))
with self.assertRaises(IndexError):

Loading…
Cancel
Save