예제 #1
0
        raise TaskclusterRestFailure


stringDate = str
slugId = b"<new id>".lower
Queue = fromNow = MagicMock()
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(
    **{k: k
       for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
import decision_task

print("\n# Push:")
decision_task.main("github-push")

print("\n# Push with hot caches:")
decision_task.main("github-push")

print("\n# Mocked only:")
decision_task.mocked_only()

print("\n# Push to master:")
decision_task.CONFIG.git_ref = "refs/heads/master"
decision_task.main("github-push")

print("\n# Daily:")
decision_task.main("daily")

print()
예제 #2
0
class TaskclusterRestFailure(Exception):
    status_code = 404


class Index:
    __init__ = insertTask = lambda *_, **__: None

    def findTask(self, _):
        raise TaskclusterRestFailure


stringDate = str
slugId = b"id".lower
Queue = fromNow = MagicMock()
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(
    **{k: k
       for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
import decision_task as decision_task

print("\n# Push:")
decision_task.main("github-pull-request", mock=True)

print("\n# Push with hot caches:")
decision_task.main("github-pull-request", mock=True)

# print("\n# Daily:")
# decision_task.main("daily", mock=True)
예제 #3
0
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(
    **{k: k
       for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
os.environ[
    "TASKCLUSTER_ROOT_URL"] = "https://community-tc.services.mozilla.com"
os.environ["TASKCLUSTER_PROXY_URL"] = "http://taskcluster"
os.environ["NEW_AMI_WORKER_TYPE"] = "-"
import decision_task

decision_task.decisionlib.subprocess = MagicMock()

print("\n# Push:")
decision_task.main("github-push")

print("\n# Push with hot caches:")
decision_task.main("github-push")

print("\n# Push to master:")
decision_task.CONFIG.git_ref = "refs/heads/master"
decision_task.main("github-push")

print("\n# Daily:")
decision_task.main("daily")

print("\n# Try AMI:")
decision_task.main("try-windows-ami")

print("\n# PR:")
예제 #4
0
        if decision_task.CONFIG.git_ref == "refs/heads/master":
            return {"taskId": "<from index>"}
        raise TaskclusterRestFailure


stringDate = str
slugId = b"<new id>".lower
Queue = fromNow = MagicMock()
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(**{k: k for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
import decision_task

print("\n# Push:")
decision_task.main("github-push")

print("\n# Push with hot caches:")
decision_task.main("github-push")

print("\n# Mocked only:")
decision_task.mocked_only()

print("\n# Push to master:")
decision_task.CONFIG.git_ref = "refs/heads/master"
decision_task.main("github-push")

print("\n# Daily:")
decision_task.main("daily")

print("\n# PR:")
예제 #5
0
파일: mock.py 프로젝트: yawboakye/servo
class TaskclusterRestFailure(Exception):
    status_code = 404


class Index:
    __init__ = insertTask = lambda *_, **__: None

    def findTask(self, _):
        raise TaskclusterRestFailure


stringDate = str
slugId = b"id".lower
Queue = fromNow = MagicMock()
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(
    **{k: k
       for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
import decision_task

print("\n# Push:")
decision_task.main("github-push", mock=True)

print("\n# Push with hot caches:")
decision_task.main("github-push", mock=True)

print("\n# Daily:")
decision_task.main("daily", mock=True)
예제 #6
0
파일: mock.py 프로젝트: Coder206/servo
        if decision_task.CONFIG.git_ref == "refs/heads/master":
            return {"taskId": "<from index>"}
        raise TaskclusterRestFailure


stringDate = str
slugId = b"<new id>".lower
Queue = fromNow = MagicMock()
sys.modules["taskcluster"] = sys.modules[__name__]
sys.dont_write_bytecode = True
os.environ.update(**{k: k for k in "TASK_ID TASK_OWNER TASK_SOURCE GIT_URL GIT_SHA".split()})
os.environ["GIT_REF"] = "refs/heads/auto"
import decision_task

print("\n# Push:")
decision_task.main("github-push")

print("\n# Push with hot caches:")
decision_task.main("github-push")

print("\n# Mocked only:")
decision_task.mocked_only()

print("\n# Push to master:")
decision_task.CONFIG.git_ref = "refs/heads/master"
decision_task.main("github-push")

print("\n# Daily:")
decision_task.main("daily")

print()