- Just sanity checks to make sure all the system modules load and there are no syntax errorsdev
# travis-ci integration for the kll compiler | |||||
sudo: | |||||
- false | |||||
os: | |||||
- linux | |||||
# Python osx builds are not yet supported by Travis | |||||
#- osx | |||||
language: | |||||
- python | |||||
python: | |||||
- "3.2" | |||||
- "3.3" | |||||
- "3.4" | |||||
- "3.5" | |||||
- "3.5-dev" | |||||
- "nightly" | |||||
addons: | |||||
apt: | |||||
packages: | |||||
- tree | |||||
# Package Setup | |||||
before_install: | |||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi | |||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install tree; fi | |||||
# Test Scripts | |||||
env: | |||||
# Basic KLL Tests | |||||
- DIR=tests SCRIPT=sanity.bash | |||||
# Exclusions | |||||
matrix: | |||||
allow_failures: | |||||
- python: "3.5-dev" | |||||
- python: "nightly" | |||||
# System setup | |||||
install: | |||||
# Info about OS | |||||
- uname -a | |||||
# Directory tree to validate kll.git | |||||
- tree | |||||
# Python Version | |||||
- python3 --version | |||||
# Run test script(s) | |||||
script: | |||||
- (cd ${DIR} && ./${SCRIPT}) | |||||
# Post test script commands | |||||
after_script: | |||||
- tree | |||||
#!/bin/bash | |||||
# Basic sanity check for kll compiler | |||||
# Currently runs both versions of the compiler | |||||
set +x | |||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |||||
PASSED=0 | |||||
FAILED=0 | |||||
# Results | |||||
result() { | |||||
echo "--- Results ---" | |||||
echo "${PASSED}/$((PASSED+FAILED))" | |||||
if (( FAILED == 0 )); then | |||||
return 0 | |||||
else | |||||
return 1 | |||||
fi | |||||
} | |||||
# Runs a command, increments test passed/failed | |||||
# Args: Command | |||||
cmd() { | |||||
# Run command | |||||
echo "CMD: $@" | |||||
$@ | |||||
# Check command | |||||
if [[ $? -ne 0 ]]; then | |||||
((FAILED++)) | |||||
else | |||||
((PASSED++)) | |||||
fi | |||||
} | |||||
# Start in kll top-level directory | |||||
cd ${SCRIPT_DIR}/.. | |||||
cmd ./kll.py --version | |||||
cmd ./kll --version | |||||
result | |||||
exit $? | |||||