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
76ae9800
Commit
76ae9800
authored
Jun 03, 2013
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean the report directories before each test run,
to ensure we don't get coverage results from a previous test run.
parent
34d1ea9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
rakefiles/tests.rake
+13
-6
No files found.
rakefiles/tests.rake
View file @
76ae9800
...
...
@@ -45,6 +45,11 @@ end
directory
REPORT_DIR
task
:clean_test_files
do
# Delete all non-folder files in the reports directory
sh
(
"find
#{
REPORT_DIR
}
-type f -print0 | xargs -0 rm"
)
# Reset the test fixtures
sh
(
"git clean -fqdx test_root"
)
end
...
...
@@ -81,12 +86,11 @@ TEST_TASK_DIRS = []
end
Dir
[
"common/lib/*"
].
select
{
|
lib
|
File
.
directory?
(
lib
)}.
each
do
|
lib
|
task_name
=
"test_
#{
lib
}
"
report_dir
=
report_dir_path
(
lib
)
desc
"Run tests for common lib
#{
lib
}
"
task
task_name
=>
report_dir
do
task
"test_
#{
lib
}
"
=>
[
"clean_test_files"
,
report_dir
]
do
ENV
[
'NOSE_XUNIT_FILE'
]
=
File
.
join
(
report_dir
,
"nosetests.xml"
)
cmd
=
"nosetests
#{
lib
}
"
sh
(
run_under_coverage
(
cmd
,
lib
))
do
|
ok
,
res
|
...
...
@@ -95,10 +99,13 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib|
end
TEST_TASK_DIRS
<<
lib
desc
"Run tests for common lib
#{
lib
}
(without coverage)"
task
"fasttest_
#{
lib
}
"
do
sh
(
"nosetests
#{
lib
}
"
)
end
# There used to be a fasttest_#{lib} command that ran without coverage.
# However, this is an inconsistent usage of "fast":
# When running tests for lms and cms, "fast" means skipping
# staticfiles collection, but still running under coverage.
# We keep the fasttest_#{lib} command for backwards compatibility,
# but make it an alias to the normal test command.
task
"fasttest_
#{
lib
}
"
=>
"test_
#{
lib
}
"
end
task
:report_dirs
...
...
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