summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/task_generation/task_types/fuzzer_tasks.py9
-rw-r--r--buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py13
-rw-r--r--etc/evergreen.yml54
-rwxr-xr-xevergreen/check_resmoke_failure.sh5
-rw-r--r--evergreen/resmoke_tests_execute.sh1
5 files changed, 40 insertions, 42 deletions
diff --git a/buildscripts/task_generation/task_types/fuzzer_tasks.py b/buildscripts/task_generation/task_types/fuzzer_tasks.py
index 61ce29527f3..7e6294c9a75 100644
--- a/buildscripts/task_generation/task_types/fuzzer_tasks.py
+++ b/buildscripts/task_generation/task_types/fuzzer_tasks.py
@@ -10,8 +10,6 @@ from buildscripts.task_generation.task_types.multiversion_decorator import Multi
MultiversionDecoratorParams
from buildscripts.util import taskname
-_MINIMIZABLE_FUZZERS = ["agg-fuzzer", "query-fuzzer"]
-
class FuzzerTask(NamedTuple):
"""
@@ -62,11 +60,6 @@ class FuzzerGenTaskParams(NamedTuple):
large_distro_name: Optional[str]
config_location: str
- @property
- def is_minimizable(self) -> bool:
- """Return whether this fuzzer in minimizable."""
- return self.npm_command in _MINIMIZABLE_FUZZERS
-
def jstestfuzz_params(self) -> Dict[str, str]:
"""Build a dictionary of parameters to pass to jstestfuzz."""
return {
@@ -144,7 +137,5 @@ class FuzzerGenTaskService:
FunctionCall("run jstestfuzz", params.jstestfuzz_params()),
FunctionCall(RUN_GENERATED_TESTS, run_tests_vars)
]
- if params.is_minimizable:
- commands.append(FunctionCall("minimize jstestfuzz", params.jstestfuzz_params()))
return Task(sub_task_name, commands, {TaskDependency(ARCHIVE_DIST_TEST_DEBUG_TASK)})
diff --git a/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py b/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py
index 34c1d1eb3e5..7d1ce8bf119 100644
--- a/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py
+++ b/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py
@@ -87,7 +87,7 @@ class TestBuildFuzzerSubTask(unittest.TestCase):
def tearDown(self) -> None:
inject.clear()
- def test_sub_task_should_be_built_correct_no_minimize_command(self):
+ def test_sub_task_should_be_built_correct(self):
mock_params = build_mock_fuzzer_params(npm_command="jstestfuzz")
fuzzer_service = under_test.FuzzerGenTaskService()
@@ -95,17 +95,6 @@ class TestBuildFuzzerSubTask(unittest.TestCase):
self.assertEqual(sub_task.name, f"{mock_params.task_name}_3_{mock_params.variant}")
self.assertEqual(len(sub_task.commands), 6)
- self.assertNotEqual(sub_task.commands[-1].as_dict()["func"], "minimize jstestfuzz")
-
- def test_sub_task_should_be_built_correct_with_minimize_command(self):
- mock_params = build_mock_fuzzer_params(npm_command="agg-fuzzer")
- fuzzer_service = under_test.FuzzerGenTaskService()
-
- sub_task = fuzzer_service.build_fuzzer_sub_task(3, mock_params)
-
- self.assertEqual(sub_task.name, f"{mock_params.task_name}_3_{mock_params.variant}")
- self.assertEqual(len(sub_task.commands), 7)
- self.assertEqual(sub_task.commands[-1].as_dict()["func"], "minimize jstestfuzz")
def test_sub_task_should_include_timeout_info(self):
mock_params = build_mock_fuzzer_params()
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 092216dc802..2ba27d60483 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1021,6 +1021,14 @@ functions:
args:
- "./src/evergreen/extract_generated_test_configuration.sh"
+ "minimize jstestfuzz": &minimize_jstestfuzz
+ command: subprocess.exec
+ type: test
+ params:
+ binary: bash
+ args:
+ - "./src/evergreen/jstestfuzz_minimize.sh"
+
"generate selected tests":
- *f_expansions_write
- *configure_evergreen_api_credentials
@@ -1161,6 +1169,7 @@ functions:
args:
- "./src/evergreen/implicit_multiversions_tasks_generate.sh"
- *execute_resmoke_tests
+ - *minimize_jstestfuzz
# The existence of the "run_tests_infrastructure_failure" file indicates this failure isn't
# directly actionable. We use type=setup rather than type=system or type=test for this command
# because we don't intend for any human to look at this failure.
@@ -1170,6 +1179,12 @@ functions:
binary: bash
args:
- "./src/evergreen/check_run_tests_infrastructure_failure.sh"
+ - command: subprocess.exec
+ type: test
+ params:
+ binary: bash
+ args:
+ - "./src/evergreen/check_resmoke_failure.sh"
"run tests":
- *f_expansions_write
@@ -1206,6 +1221,12 @@ functions:
binary: bash
args:
- "./src/evergreen/check_run_tests_infrastructure_failure.sh"
+ - command: subprocess.exec
+ type: test
+ params:
+ binary: bash
+ args:
+ - "./src/evergreen/check_resmoke_failure.sh"
"scons lint":
- *f_expansions_write
@@ -1426,14 +1447,7 @@ functions:
content_type: application/gzip
display_name: npm logs - Execution ${execution}
- "minimize jstestfuzz":
- - *f_expansions_write
- - command: subprocess.exec
- type: test
- params:
- binary: bash
- args:
- - "./src/evergreen/jstestfuzz_minimize.sh"
+ "upload jstestfuzz minimized output":
- command: s3.put
params:
optional: true
@@ -1458,6 +1472,16 @@ functions:
visibility: signed
content_type: text/javascript
display_name: Minimized jstestfuzz Test - Execution ${execution}
+ - *f_expansions_write
+ - command: subprocess.exec
+ params:
+ binary: bash
+ args:
+ - "./src/evergreen/wiki_page_minimized_agg_query_fuzzer.sh"
+ - command: attach.artifacts
+ params:
+ files:
+ - wiki_page_running_minimized_test_location.json
"run idl tests":
- *f_expansions_write
@@ -2028,18 +2052,6 @@ functions:
files:
- wiki_page_location.json
- "attach running minimized tests wiki page":
- - *f_expansions_write
- - command: subprocess.exec
- params:
- binary: bash
- args:
- - "./src/evergreen/wiki_page_minimized_agg_query_fuzzer.sh"
- - command: attach.artifacts
- params:
- files:
- - wiki_page_running_minimized_test_location.json
-
# Pre task steps
pre:
@@ -2054,7 +2066,7 @@ post:
- func: "attach artifacts"
- func: "save ec2 task artifacts"
- func: "attach wiki page"
- - func: "attach running minimized tests wiki page"
+ - func: "upload jstestfuzz minimized output"
- func: "kill processes"
- func: "save local client logs"
- func: "save code coverage data"
diff --git a/evergreen/check_resmoke_failure.sh b/evergreen/check_resmoke_failure.sh
new file mode 100755
index 00000000000..4718098b70c
--- /dev/null
+++ b/evergreen/check_resmoke_failure.sh
@@ -0,0 +1,5 @@
+set -o verbose
+cd src
+if [ -f resmoke_error_code ]; then
+ exit $(cat resmoke_error_code)
+fi
diff --git a/evergreen/resmoke_tests_execute.sh b/evergreen/resmoke_tests_execute.sh
index fa33383c34d..3815c507758 100644
--- a/evergreen/resmoke_tests_execute.sh
+++ b/evergreen/resmoke_tests_execute.sh
@@ -170,6 +170,7 @@ if [[ ${disable_unit_tests} = "false" && ! -f ${skip_tests} ]]; then
elif [ $resmoke_exit_code != 0 ]; then
# On failure save the resmoke exit code.
echo $resmoke_exit_code > resmoke_error_code
+ exit 0
elif [ $resmoke_exit_code = 0 ]; then
# On success delete core files.
core_files=$(/usr/bin/find -H .. \( -name "*.core" -o -name "*.mdmp" \) 2> /dev/null)