Commit baa01d7d by Christine Lytwynec

added script and tasks to run some of the paver tests in test_build_server

parent f7bc5d09
......@@ -14,8 +14,5 @@
#
# vars are namespace with the module name.
#
test_runner_user: jenkins
test_suite_args: ['unit']
test_shard_args: ['shard_1']
edx_platform_base_path: /home/jenkins
clone_repo: yes
test_build_server_user: jenkins
test_build_server_repo_path: /home/jenkins
#!/usr/bin/env bash
################################################################################
# This executes a small subset of the edx-platform tests. It is intended as
# a means of testing newly provisioned AMIs for our jenkins workers.
#
# The two main things that happen here:
# 1. The setup from edx-platform/scripts/all-tests.sh, the script that is
# run by the jenkins workers to kick off tests.
# 2. The paver command for tests, coverage and quality reports are run.
# For the tests, it runs only a small number of test cases for each
# test suite.
###############################################################################
# Doing this rather than copying the file into the scripts folder so that
# this file doesn't get cleaned out by the 'git clean' in all-tests.sh.
cd edx-platform-clone
# This will run all of the setup it usually runs, but none of the
# tests because TEST_SUITE isn't defined.
source scripts/all-tests.sh
# Now we can run a subset of the tests via paver.
# Run some of the common/lib unit tests
paver test_lib -t common/lib/xmodule/xmodule/tests/test_stringify.py
# Generate some coverage reports
paver coverage
# Run some of the djangoapp unit tests
paver test_system -t lms/djangoapps/courseware/tests/tests.py
paver test_system -t cms/djangoapps/course_creators/tests/test_views.py
# Run some of the javascript unit tests
paver test_js_run -s xmodule
# Run some of the bok-choy tests
paver test_bokchoy -t test_lms.py:RegistrationTest
# Run some of the lettuce acceptance tests
paver test_acceptance -s lms --extra_args="lms/djangoapps/courseware/features/problems.feature"
paver test_acceptance -s cms --extra_args="cms/djangoapps/contentstore/features/html-editor.feature"
# Generate quality reports
paver run_quality
......@@ -19,19 +19,23 @@
#
# Example play:
#
#
- name: Create shallow clone of edx-platform
- name: Create clone of edx-platform
git: >
repo=https://github.com/edx/edx-platform.git
dest={{ edx_platform_base_path }}/shallow-clone
dest={{ test_build_server_repo_path }}/edx-platform-clone
version=master
depth=1
sudo_user: "{{ test_runner_user }}"
sudo_user: "{{ test_build_server_user }}"
- name: Copy test-development-environment.sh to somewhere the jenkins user can access it
copy: >
src=test-development-environment.sh
dest="{{ test_build_server_repo_path }}"
mode=0755
sudo_user: "{{ test_build_server_user }}"
- name: run edx tests
shell:
"export TEST_SUITE=unit && scripts/all-tests.sh"
- name: Validate build environment
shell: "bash test-development-environment.sh"
args:
chdir: "{{ edx_platform_base_path }}/shallow-clone"
sudo_user: root
chdir: "{{ test_build_server_repo_path }}/"
sudo_user: "{{ test_build_server_user }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment