From cf24beb85e8ae5da10960e1e8ec40830b382a2d0 Mon Sep 17 00:00:00 2001 From: scurest Date: Sun, 10 Feb 2019 06:05:39 -0600 Subject: [PATCH] Fixes for Travis --- .travis.yml | 20 +++++++++++++++----- test/bl_generate_report.py | 4 ++++ test/test.py | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3efe4b6..cf2ba81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,14 +2,24 @@ language: python python: "3.5" +# From michaeldegroot/cats-blender-plugin +before_install: + - sudo apt-get update -qq + # install blender from official sources. + # This will most propably install an outdated blender version, + # but it will resolve all system dependencies blender has to be able to run. + - sudo apt-get install blender + install: - - sudo add-apt-repository -y ppa:thomas-schiex/blender - - sudo apt-get update - - sudo apt-get install -y --allow-unauthenticated blender - - blender --version + # Then update blender + - mkdir tmp && cd tmp + - wget http://mirror.cs.umn.edu/blender.org/release/Blender2.79/blender-2.79-linux-glibc219-x86_64.tar.bz2 + - tar jxf blender-2.79-linux-glibc219-x86_64.tar.bz2 + - mv blender-2.79-linux-glibc219-x86_64 blender + - cd .. script: - python test/test.py run + python test/test.py run --exe ./tmp/blender/blender #deploy: # provider: pages diff --git a/test/bl_generate_report.py b/test/bl_generate_report.py index 37e835e..1e492d7 100644 --- a/test/bl_generate_report.py +++ b/test/bl_generate_report.py @@ -8,9 +8,13 @@ import json import os from timeit import default_timer as timer +import sys import bpy +print('bpy.app.version:', bpy.app.version) +print('python sys.version:', sys.version) + base_dir = os.path.dirname(os.path.abspath(__file__)) samples_path = os.path.join(base_dir, 'glTF-Sample-Models', '2.0') site_local_path = os.path.join(base_dir, 'site_local') diff --git a/test/test.py b/test/test.py index f7c4cf3..825fea5 100755 --- a/test/test.py +++ b/test/test.py @@ -150,7 +150,7 @@ def cmd_report_times(args=None): p = argparse.ArgumentParser(description='glTF importer tests') -subs = p.add_subparsers(title='subcommands', required=True) +subs = p.add_subparsers(title='subcommands') run = subs.add_parser('run', help='Run tests and generate report') run.add_argument('--exe', default='blender', help='Blender executable')