Skip to content

Commit

Permalink
End-to-end validation (#235)
Browse files Browse the repository at this point in the history
* Updated to latest OpenCOLLADA

* Write animation clips out as animation groups

* Fix writer test

* Point gitmodules at our fork

* Use OpenCOLLADA fork

* Updated CHANGES.md

* Update OpenCOLLADA with fix for VC conversion

* Added js subfolder with validation in tests

* Added validation to CI

* Updated license to BSD

* Need to go up one more directory

* Fix placement of merge animations

* Fix it in the non-group section as well

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Updated OpenCOLLADA

* Update .travis.yml

* Invalidate appveyor cache when CMake changes

* Added PCRE to COLLADAFramework module include

* PCRE include in COLLADASaxFrameworkLoader

* Missing PCRE include

* Hopefully fixes the build

* Remove redundant include
  • Loading branch information
lasalvavida committed May 2, 2019
1 parent fda2348 commit aaaaf7f
Show file tree
Hide file tree
Showing 8 changed files with 651 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
os:
- linux
- osx
osx_image: xcode8.3
language: cpp
compiler: g++
git:
Expand All @@ -21,7 +20,9 @@ addons:
- g++-5
- cmake
- cmake-data
script: mkdir build && cd build && cmake -Dtest=ON .. && make && make test
script:
- mkdir build && cd build && cmake -Dtest=ON .. && make && make test
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd ../test/js && npm i -g npm && npm install && npm run test && cd ../../build; fi
after_success:
- if [ ! -z "$TRAVIS_TAG" ]; then
export RELEASE=`echo "$TRAVIS_TAG"| awk -F"-" '{print $1}'`;
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADASaxFrameworkLoad
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADABaseUtils/include)
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADAFramework/include)
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/GeneratedSaxParser/include)
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/Externals/pcre/include)
if(NOT OpenCOLLADA)
add_subdirectory(dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader)
set(OpenCOLLADA COLLADASaxFrameworkLoader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ include_directories(${BASE_PATH}/Externals/MathMLSolver/include)
include_directories(${BASE_PATH}/Externals/MathMLSolver/include/AST)
add_subdirectory(MathMLSolver)

# pcre
include_directories(${BASE_PATH}/Externals/pcre/include)

add_library(${PROJECT_NAME} ${HEADERS} ${SOURCES})
target_link_libraries(${PROJECT_NAME} COLLADABaseUtils MathMLSolver)
1 change: 1 addition & 0 deletions test/js/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
29 changes: 29 additions & 0 deletions test/js/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# COLLADA2GLTF E2E Validation
This subproject implements COLLADA2GLTF end-to-end validation.

COLLADA source models are pulled from the
[glTF-Sample-Models](https://github.com/KhronosGroup/glTF-Sample-Models)
repository and the built converter binary is used to convert them to glTF.

The
[glTF-Validator](https://github.com/KhronosGroup/glTF-Validator)
is then used to validate the converted models, to make sure that they:
* Have the expected number of primitives
* Use the expected glTF features:
* Animations
* Morph Targets
* Skins
* Textures
* Have no:
* Errors
* Infos
* Warnings

These tests are implemented as a set of ES6 Mocha tests. You can run them
with:

```bash
npm install

npm run test
```
251 changes: 251 additions & 0 deletions test/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions test/js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "collada2gltf-test",
"version": "1.0.0",
"description": "Integration testing COLLADA2GLTF converter",
"scripts": {
"test": "mocha -r esm"
},
"author": "Rob Taglang",
"license": "BSD",
"devDependencies": {},
"dependencies": {
"bluebird": "^3.5.3",
"chai": "^4.2.0",
"chai-subset": "^1.6.0",
"esm": "^3.0.84",
"gltf-validator": "^2.0.0-dev.2.7",
"mocha": "^5.2.0",
"tmp": "0.0.33"
}
}
Loading

0 comments on commit aaaaf7f

Please sign in to comment.