Skip to content

Commit aaaaf7f

Browse files
authored
End-to-end validation (#235)
* 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
1 parent fda2348 commit aaaaf7f

File tree

8 files changed

+651
-2
lines changed

8 files changed

+651
-2
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
os:
22
- linux
33
- osx
4-
osx_image: xcode8.3
54
language: cpp
65
compiler: g++
76
git:
@@ -21,7 +20,9 @@ addons:
2120
- g++-5
2221
- cmake
2322
- cmake-data
24-
script: mkdir build && cd build && cmake -Dtest=ON .. && make && make test
23+
script:
24+
- mkdir build && cd build && cmake -Dtest=ON .. && make && make test
25+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd ../test/js && npm i -g npm && npm install && npm run test && cd ../../build; fi
2526
after_success:
2627
- if [ ! -z "$TRAVIS_TAG" ]; then
2728
export RELEASE=`echo "$TRAVIS_TAG"| awk -F"-" '{print $1}'`;

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADASaxFrameworkLoad
101101
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADABaseUtils/include)
102102
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/COLLADAFramework/include)
103103
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/GeneratedSaxParser/include)
104+
include_directories(dependencies/OpenCOLLADA/OpenCOLLADA/Externals/pcre/include)
104105
if(NOT OpenCOLLADA)
105106
add_subdirectory(dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader)
106107
set(OpenCOLLADA COLLADASaxFrameworkLoader)

dependencies/OpenCOLLADA/modules/COLLADASaxFrameworkLoader/COLLADAFramework/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ include_directories(${BASE_PATH}/Externals/MathMLSolver/include)
2020
include_directories(${BASE_PATH}/Externals/MathMLSolver/include/AST)
2121
add_subdirectory(MathMLSolver)
2222

23+
# pcre
24+
include_directories(${BASE_PATH}/Externals/pcre/include)
25+
2326
add_library(${PROJECT_NAME} ${HEADERS} ${SOURCES})
2427
target_link_libraries(${PROJECT_NAME} COLLADABaseUtils MathMLSolver)

test/js/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

test/js/README.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# COLLADA2GLTF E2E Validation
2+
This subproject implements COLLADA2GLTF end-to-end validation.
3+
4+
COLLADA source models are pulled from the
5+
[glTF-Sample-Models](https://github.com/KhronosGroup/glTF-Sample-Models)
6+
repository and the built converter binary is used to convert them to glTF.
7+
8+
The
9+
[glTF-Validator](https://github.com/KhronosGroup/glTF-Validator)
10+
is then used to validate the converted models, to make sure that they:
11+
* Have the expected number of primitives
12+
* Use the expected glTF features:
13+
* Animations
14+
* Morph Targets
15+
* Skins
16+
* Textures
17+
* Have no:
18+
* Errors
19+
* Infos
20+
* Warnings
21+
22+
These tests are implemented as a set of ES6 Mocha tests. You can run them
23+
with:
24+
25+
```bash
26+
npm install
27+
28+
npm run test
29+
```

test/js/package-lock.json

+251
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/js/package.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "collada2gltf-test",
3+
"version": "1.0.0",
4+
"description": "Integration testing COLLADA2GLTF converter",
5+
"scripts": {
6+
"test": "mocha -r esm"
7+
},
8+
"author": "Rob Taglang",
9+
"license": "BSD",
10+
"devDependencies": {},
11+
"dependencies": {
12+
"bluebird": "^3.5.3",
13+
"chai": "^4.2.0",
14+
"chai-subset": "^1.6.0",
15+
"esm": "^3.0.84",
16+
"gltf-validator": "^2.0.0-dev.2.7",
17+
"mocha": "^5.2.0",
18+
"tmp": "0.0.33"
19+
}
20+
}

0 commit comments

Comments
 (0)