Permalink
Browse files

Squashed commit of the following:

commit 356b9f6
Author: Niklas Rosenstein <rosensteinniklas@gmail.com>
Date:   Wed Jan 11 15:30:33 2017 +0800

    assert call() succeeds, download and unpack Ninja

commit e56b89b
Author: Niklas Rosenstein <rosensteinniklas@gmail.com>
Date:   Wed Jan 11 15:25:43 2017 +0800

    add tests/ directory and run examples.c with it
  • Loading branch information...
NiklasRosenstein committed Jan 11, 2017
1 parent b356852 commit 77cde69211d75266ca44d3558de63497605eef2d
Showing with 25 additions and 2 deletions.
  1. +8 −2 .travis.yml
  2. +17 −0 tests/test_examples.py
View
@@ -3,6 +3,12 @@ python:
- "3.4"
- "3.5"
install:
- pip install nr
- pip install nose wget
- pip install -e .
script: echo "nothing to do yet"
# Download and extract Ninja
- mkdir .tmp
- curl -L https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip -o .tmp/ninja-linux.zip
- unzip .tmp/ninja-linux.zip -d .tmp
- export PATH=$PWD/.tmp:$PATH
script:
- nosetests tests
View
@@ -0,0 +1,17 @@
from os import chdir
from os.path import join, dirname
from subprocess import call
from nose.tools import *
basedir = dirname(dirname(__file__))
def export_and_build(directory):
chdir(join(basedir, directory))
assert_equals(call('craftr export'.split()), 0)
assert_equals(call('craftr build'.split()), 0)
def test_example_c():
export_and_build('examples/examples.c')

0 comments on commit 77cde69

Please sign in to comment.