Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
5d250891
Commit
5d250891
authored
Mar 23, 2016
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TE-1014 Don't clean test_root/staticfiles when running JS tests.
parent
33327219
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
pavelib/utils/test/suites/js_suite.py
+1
-1
pavelib/utils/test/utils.py
+11
-2
No files found.
pavelib/utils/test/suites/js_suite.py
View file @
5d250891
...
@@ -33,7 +33,7 @@ class JsTestSuite(TestSuite):
...
@@ -33,7 +33,7 @@ class JsTestSuite(TestSuite):
super
(
JsTestSuite
,
self
)
.
__enter__
()
super
(
JsTestSuite
,
self
)
.
__enter__
()
self
.
report_dir
.
makedirs_p
()
self
.
report_dir
.
makedirs_p
()
if
not
self
.
skip_clean
:
if
not
self
.
skip_clean
:
test_utils
.
clean_test_files
()
test_utils
.
clean_test_files
(
skip_staticfiles
=
True
)
if
self
.
mode
==
'run'
and
not
self
.
run_under_coverage
:
if
self
.
mode
==
'run'
and
not
self
.
run_under_coverage
:
test_utils
.
clean_dir
(
self
.
report_dir
)
test_utils
.
clean_dir
(
self
.
report_dir
)
...
...
pavelib/utils/test/utils.py
View file @
5d250891
...
@@ -13,11 +13,20 @@ __test__ = False # do not collect
...
@@ -13,11 +13,20 @@ __test__ = False # do not collect
@task
@task
def
clean_test_files
():
def
clean_test_files
(
skip_staticfiles
=
False
):
"""
"""
Clean fixture files used by tests and .pyc files
Clean fixture files used by tests and .pyc files
:param skip_staticfiles: To reduce interference across test suites, some suites can skip
cleaning the staticfiles directory, which is expensive to create
but not relevant for all test types.
"""
"""
sh
(
"git clean -fqdx test_root/logs test_root/data test_root/staticfiles test_root/uploads"
)
static_files_str
=
""
if
skip_staticfiles
:
static_files_str
=
"test_root/staticfiles"
sh
(
"git clean -fqdx test_root/logs test_root/data {static_files_str} test_root/uploads"
.
format
(
static_files_str
=
static_files_str
))
# This find command removes all the *.pyc files that aren't in the .git
# This find command removes all the *.pyc files that aren't in the .git
# directory. See this blog post for more details:
# directory. See this blog post for more details:
# http://nedbatchelder.com/blog/201505/be_careful_deleting_files_around_git.html
# http://nedbatchelder.com/blog/201505/be_careful_deleting_files_around_git.html
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment