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.py2
-rw-r--r--etc/evergreen.yml48
-rwxr-xr-xevergreen/check_resmoke_failure.sh5
-rw-r--r--evergreen/resmoke_tests_execute.sh1
5 files changed, 32 insertions, 33 deletions
diff --git a/buildscripts/task_generation/task_types/fuzzer_tasks.py b/buildscripts/task_generation/task_types/fuzzer_tasks.py
index 7e6294c9a75..61ce29527f3 100644
--- a/buildscripts/task_generation/task_types/fuzzer_tasks.py
+++ b/buildscripts/task_generation/task_types/fuzzer_tasks.py
@@ -10,6 +10,8 @@ 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):
"""
@@ -60,6 +62,11 @@ 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 {
@@ -137,5 +144,7 @@ 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 55e6effde70..34c1d1eb3e5 100644
--- a/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py
+++ b/buildscripts/tests/task_generation/task_types/test_fuzzer_tasks.py
@@ -95,6 +95,7 @@ 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")
@@ -104,6 +105,7 @@ class TestBuildFuzzerSubTask(unittest.TestCase):
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 a306d8b1956..c3d58fbcfb8 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1021,14 +1021,6 @@ 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
@@ -1169,7 +1161,6 @@ 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.
@@ -1179,12 +1170,6 @@ 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
@@ -1441,7 +1426,14 @@ functions:
content_type: application/gzip
display_name: npm logs - Execution ${execution}
- "upload jstestfuzz minimized output":
+ "minimize jstestfuzz":
+ - *f_expansions_write
+ - command: subprocess.exec
+ type: test
+ params:
+ binary: bash
+ args:
+ - "./src/evergreen/jstestfuzz_minimize.sh"
- command: s3.put
params:
optional: true
@@ -1466,16 +1458,6 @@ 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
@@ -2046,6 +2028,18 @@ 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:
@@ -2060,7 +2054,7 @@ post:
- func: "attach artifacts"
- func: "save ec2 task artifacts"
- func: "attach wiki page"
- - func: "upload jstestfuzz minimized output"
+ - func: "attach running minimized tests wiki page"
- 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
deleted file mode 100755
index 4718098b70c..00000000000
--- a/evergreen/check_resmoke_failure.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-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 3815c507758..fa33383c34d 100644
--- a/evergreen/resmoke_tests_execute.sh
+++ b/evergreen/resmoke_tests_execute.sh
@@ -170,7 +170,6 @@ 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)