Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test suite #295

Merged
merged 3 commits into from Apr 5, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add Travis dispatching script to run test suite

Use a dispatch script to direct Travis to either run a Salt highstate
for most nodes, or the test script for the test node.

This reduces the amount of project-specific configuration in .travis.yml
and moves it into a separate file.
  • Loading branch information
aneeshusa committed Apr 5, 2016
commit 39bfbaef859ea06641c0bf22de9c6b6e8c11d666
@@ -20,23 +20,16 @@ matrix:
os: linux
sudo: required
dist: trusty
- env: SALT_NODE_ID=test # Not a Salt node, runs test suite instead
os: linux
sudo: required
dist: trusty
language: python
python: 3.5
allow_failures:
- env: SALT_NODE_ID=servo-linux-cross1

before_install:
- .travis/install_salt.sh -F -c .travis -- "${TRAVIS_OS_NAME}"

install:
- .travis/setup_salt_roots.sh

# For debugging, check the grains reported by the Travis builder
- sudo salt-call --id="${SALT_NODE_ID}" grains.items

script:
# Minimally validate YAML and Jinja at a basic level
- sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough state.show_highstate
# Full on installation test
- sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough --log-level=warning state.highstate
script: .travis/dispatch.sh

notifications:
webhooks: http://build.servo.org:54856/travis
@@ -0,0 +1,23 @@
#!/usr/bin/env sh

set -o errexit
set -o nounset

if [ "${SALT_NODE_ID}" = "test" ]; then
# Using .travis.yml to specify Python 3.5 to be preinstalled, just to check
printf "Using $(python3 --version) at $(which python3)\n"

# Run test suite separately for parallelism
./test.py
else
.travis/install_salt.sh -F -c .travis -- "${TRAVIS_OS_NAME}"
.travis/setup_salt_roots.sh

# For debugging, check the grains reported by the Travis builder
sudo salt-call --id="${SALT_NODE_ID}" grains.items

# Minimally validate YAML and Jinja at a basic level
sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough state.show_highstate
# Full on installation test
sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough --log-level=warning state.highstate
fi
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.