Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
fe1bcd99
Commit
fe1bcd99
authored
8 years ago
by
Matt Kwong
Browse files
Options
Downloads
Patches
Plain Diff
Remove sanity test filtering
parent
7e9bd6ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/run_tests/filter_pull_request_tests.py
+5
-6
5 additions, 6 deletions
tools/run_tests/filter_pull_request_tests.py
tools/run_tests/sanity/check_test_filtering.py
+16
-5
16 additions, 5 deletions
tools/run_tests/sanity/check_test_filtering.py
with
21 additions
and
11 deletions
tools/run_tests/filter_pull_request_tests.py
+
5
−
6
View file @
fe1bcd99
...
@@ -56,7 +56,6 @@ class TestSuite:
...
@@ -56,7 +56,6 @@ class TestSuite:
# Create test suites
# Create test suites
_SANITY_TEST_SUITE
=
TestSuite
([
'
sanity
'
])
_CORE_TEST_SUITE
=
TestSuite
([
'
c
'
])
_CORE_TEST_SUITE
=
TestSuite
([
'
c
'
])
_CPP_TEST_SUITE
=
TestSuite
([
'
c++
'
])
_CPP_TEST_SUITE
=
TestSuite
([
'
c++
'
])
_CSHARP_TEST_SUITE
=
TestSuite
([
'
csharp
'
])
_CSHARP_TEST_SUITE
=
TestSuite
([
'
csharp
'
])
...
@@ -68,10 +67,10 @@ _RUBY_TEST_SUITE = TestSuite(['ruby'])
...
@@ -68,10 +67,10 @@ _RUBY_TEST_SUITE = TestSuite(['ruby'])
_LINUX_TEST_SUITE
=
TestSuite
([
'
linux
'
])
_LINUX_TEST_SUITE
=
TestSuite
([
'
linux
'
])
_WINDOWS_TEST_SUITE
=
TestSuite
([
'
windows
'
])
_WINDOWS_TEST_SUITE
=
TestSuite
([
'
windows
'
])
_MACOS_TEST_SUITE
=
TestSuite
([
'
macos
'
])
_MACOS_TEST_SUITE
=
TestSuite
([
'
macos
'
])
_ALL_TEST_SUITES
=
[
_SANITY_TEST_SUITE
,
_CORE_TEST_SUITE
,
_CPP_TEST_SUITE
,
_ALL_TEST_SUITES
=
[
_CORE_TEST_SUITE
,
_CPP_TEST_SUITE
,
_CSHARP_TEST_SUITE
,
_CSHARP_TEST_SUITE
,
_NODE_TEST_SUITE
,
_OBJC_TEST_SUITE
,
_NODE_TEST_SUITE
,
_OBJC_TEST_SUITE
,
_PHP_TEST_SUITE
,
_PHP_TEST_SUITE
,
_PYTHON_TEST_SUITE
,
_RUBY_TEST_SUITE
,
_PYTHON_TEST_SUITE
,
_RUBY_TEST_SUITE
,
_LINUX_TEST_SUITE
,
_LINUX_TEST_SUITE
,
_WINDOWS_TEST_SUITE
,
_MACOS_TEST_SUITE
]
_WINDOWS_TEST_SUITE
,
_MACOS_TEST_SUITE
]
# Dictionary of whitelistable files where the key is a regex matching changed files
# Dictionary of whitelistable files where the key is a regex matching changed files
# and the value is a list of tests that should be run. An empty list means that
# and the value is a list of tests that should be run. An empty list means that
...
@@ -90,7 +89,7 @@ _WHITELIST_DICT = {
...
@@ -90,7 +89,7 @@ _WHITELIST_DICT = {
'
^src/php/
'
:
[
_PHP_TEST_SUITE
],
'
^src/php/
'
:
[
_PHP_TEST_SUITE
],
'
^src/python/
'
:
[
_PYTHON_TEST_SUITE
],
'
^src/python/
'
:
[
_PYTHON_TEST_SUITE
],
'
^src/ruby/
'
:
[
_RUBY_TEST_SUITE
],
'
^src/ruby/
'
:
[
_RUBY_TEST_SUITE
],
'
^templates/
'
:
[
_SANITY_TEST_SUITE
],
'
^templates/
'
:
[],
'
^test/core/
'
:
[
_CORE_TEST_SUITE
],
'
^test/core/
'
:
[
_CORE_TEST_SUITE
],
'
^test/cpp/
'
:
[
_CPP_TEST_SUITE
],
'
^test/cpp/
'
:
[
_CPP_TEST_SUITE
],
'
^test/distrib/cpp/
'
:
[
_CPP_TEST_SUITE
],
'
^test/distrib/cpp/
'
:
[
_CPP_TEST_SUITE
],
...
...
This diff is collapsed.
Click to expand it.
tools/run_tests/sanity/check_test_filtering.py
+
16
−
5
View file @
fe1bcd99
...
@@ -40,7 +40,7 @@ sys.path.insert(0, os.path.abspath('tools/run_tests/'))
...
@@ -40,7 +40,7 @@ sys.path.insert(0, os.path.abspath('tools/run_tests/'))
from
run_tests_matrix
import
_create_test_jobs
,
_create_portability_test_jobs
from
run_tests_matrix
import
_create_test_jobs
,
_create_portability_test_jobs
import
filter_pull_request_tests
import
filter_pull_request_tests
_LIST_OF_LANGUAGE_LABELS
=
[
'
sanity
'
,
'
c
'
,
'
c++
'
,
'
csharp
'
,
'
node
'
,
'
objc
'
,
'
php
'
,
'
php7
'
,
'
python
'
,
'
ruby
'
]
_LIST_OF_LANGUAGE_LABELS
=
[
'
c
'
,
'
c++
'
,
'
csharp
'
,
'
node
'
,
'
objc
'
,
'
php
'
,
'
php7
'
,
'
python
'
,
'
ruby
'
]
_LIST_OF_PLATFORM_LABELS
=
[
'
linux
'
,
'
macos
'
,
'
windows
'
]
_LIST_OF_PLATFORM_LABELS
=
[
'
linux
'
,
'
macos
'
,
'
windows
'
]
class
TestFilteringTest
(
unittest
.
TestCase
):
class
TestFilteringTest
(
unittest
.
TestCase
):
...
@@ -65,6 +65,19 @@ class TestFilteringTest(unittest.TestCase):
...
@@ -65,6 +65,19 @@ class TestFilteringTest(unittest.TestCase):
print
print
filtered_jobs
=
filter_pull_request_tests
.
filter_tests
(
all_jobs
,
"
test
"
)
filtered_jobs
=
filter_pull_request_tests
.
filter_tests
(
all_jobs
,
"
test
"
)
# Make sure sanity tests aren't being filtered out
sanity_tests_in_all_jobs
=
0
sanity_tests_in_filtered_jobs
=
0
for
job
in
all_jobs
:
if
"
sanity
"
in
job
.
labels
:
sanity_tests_in_all_jobs
+=
1
all_jobs
=
[
job
for
job
in
all_jobs
if
"
sanity
"
not
in
job
.
labels
]
for
job
in
filtered_jobs
:
if
"
sanity
"
in
job
.
labels
:
sanity_tests_in_filtered_jobs
+=
1
filtered_jobs
=
[
job
for
job
in
filtered_jobs
if
"
sanity
"
not
in
job
.
labels
]
self
.
assertEquals
(
sanity_tests_in_all_jobs
,
sanity_tests_in_filtered_jobs
)
for
label
in
labels
:
for
label
in
labels
:
for
job
in
filtered_jobs
:
for
job
in
filtered_jobs
:
self
.
assertNotIn
(
label
,
job
.
labels
)
self
.
assertNotIn
(
label
,
job
.
labels
)
...
@@ -82,8 +95,6 @@ class TestFilteringTest(unittest.TestCase):
...
@@ -82,8 +95,6 @@ class TestFilteringTest(unittest.TestCase):
# Changing core should trigger all tests
# Changing core should trigger all tests
self
.
test_filtering
([
'
src/core/foo.bar
'
],
[
_LIST_OF_LANGUAGE_LABELS
])
self
.
test_filtering
([
'
src/core/foo.bar
'
],
[
_LIST_OF_LANGUAGE_LABELS
])
# Testing individual languages
# Testing individual languages
self
.
test_filtering
([
'
templates/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
filter_pull_request_tests
.
_SANITY_TEST_SUITE
.
labels
])
self
.
test_filtering
([
'
test/core/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
self
.
test_filtering
([
'
test/core/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
filter_pull_request_tests
.
_CORE_TEST_SUITE
.
labels
])
filter_pull_request_tests
.
_CORE_TEST_SUITE
.
labels
])
self
.
test_filtering
([
'
src/cpp/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
self
.
test_filtering
([
'
src/cpp/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
...
@@ -102,9 +113,9 @@ class TestFilteringTest(unittest.TestCase):
...
@@ -102,9 +113,9 @@ class TestFilteringTest(unittest.TestCase):
filter_pull_request_tests
.
_RUBY_TEST_SUITE
.
labels
])
filter_pull_request_tests
.
_RUBY_TEST_SUITE
.
labels
])
def
test_combined_language_filters
(
self
):
def
test_combined_language_filters
(
self
):
self
.
test_filtering
([
'
templates
/foo.bar
'
,
'
test/core/foo.bar
'
],
self
.
test_filtering
([
'
src/cpp
/foo.bar
'
,
'
test/core/foo.bar
'
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
filter_pull_request_tests
.
_
SANITY
_TEST_SUITE
.
labels
and
label
not
in
filter_pull_request_tests
.
_
CPP
_TEST_SUITE
.
labels
and
label
not
in
filter_pull_request_tests
.
_CORE_TEST_SUITE
.
labels
])
filter_pull_request_tests
.
_CORE_TEST_SUITE
.
labels
])
self
.
test_filtering
([
'
src/node/foo.bar
'
,
'
src/cpp/foo.bar
'
,
"
src/csharp/foo.bar
"
],
self
.
test_filtering
([
'
src/node/foo.bar
'
,
'
src/cpp/foo.bar
'
,
"
src/csharp/foo.bar
"
],
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
[
label
for
label
in
_LIST_OF_LANGUAGE_LABELS
if
label
not
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment