def METHOD_NAME(self, expect_works, extra_args, build_name=None):
    if self.NO_BATCH:
        extra_args += " --no-batch"
    # Need these flags to test dashboard if e3sm
    if self._config.test_mode == "e3sm" and build_name is not None:
        extra_args += (
            " -p ACME_test --submit-to-cdash --cdash-build-group=Nightly -c %s"
            % build_name
        )
    self.run_cmd_assert_result(
        "%s/jenkins_generic_job -r %s %s -B %s"
        % (self.TOOLS_DIR, self._testdir, extra_args, self._baseline_area),
        from_dir=self._testdir,
        expected_stat=(0 if expect_works else utils.TESTS_FAILED_ERR_CODE),
        shell=False,
    )