<commit_before>#!/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 lms/test_lms.py:LanguageTest
paver test_bokchoy -t discussion/test_discussion.py:DiscussionTabSingleThreadTest --fasttest
paver test_bokchoy -t studio/test_studio_with_ora_component.py:ORAComponentTest --fasttest
paver test_bokchoy -t lms/test_lms_matlab_problem.py:MatlabProblemTest --fasttest

# Run some of the lettuce acceptance tests
paver test_acceptance -s lms --extra_args="lms/djangoapps/courseware/features/problems.feature -s 1"
paver test_acceptance -s cms --extra_args="cms/djangoapps/contentstore/features/html-editor.feature -s 1"

# Generate quality reports
paver run_quality<commit_msg>Update with latest changes on platform.<commit_after>#!/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/jenkins-common.sh

# Now we can run a subset of the tests via paver.
# Run some of the common/lib unit tests
# TODO: The following verification is waiting on a fix for SOL-570.
# 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 lms/test_lms.py:LanguageTest
paver test_bokchoy -t discussion/test_discussion.py:DiscussionTabSingleThreadTest --fasttest
paver test_bokchoy -t studio/test_studio_with_ora_component.py:ORAComponentTest --fasttest
paver test_bokchoy -t lms/test_lms_matlab_problem.py:MatlabProblemTest --fasttest

# Run some of the lettuce acceptance tests
paver test_acceptance -s lms --extra_args="lms/djangoapps/courseware/features/problems.feature -s 1"
paver test_acceptance -s cms --extra_args="cms/djangoapps/contentstore/features/html-editor.feature -s 1"

# Generate quality reports
paver run_quality
{'fraction_non_alphanumeric': 0.1359087735629509, 'fraction_numerical': 0.002559925529439144, 'mean_word_length': 4.655263157894737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2654917', 'n_tokens_mistral': 1288, 'n_tokens_neox': 1246, 'n_words': 479}