# Path: test/framework/abstract_api.py
# class AbstractApiJob(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def invoke(self, securitytoken, build_params, cause, description):
#         raise Exception("AbstractNotImplemented")
# 
#     # The following should be declare abstract, but since they are 'implemented' by proxy we can't do that (conveniently)
#     # def is_running(self):
#     # def is_queued(self):
#     # def get_last_build_or_none(self):
#     # def get_build_triggerurl(self):
#     # def update_config(self, config_xml):
#     # def poll(self):
# 
# class AbstractApiJenkins(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def create_job(self, job_name, config_xml):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def delete_job(self, job_name):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def get_job(self, name):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def poll(self):
#         raise Exception("AbstractNotImplemented")
# 
# Path: test/framework/config.py



import abc
import os
from collections import OrderedDict
from os.path import join as jp
from jenkinsflow.api_base import UnknownJobException, BuildResult, Progress
from .abstract_api import AbstractApiJob, AbstractApiJenkins
from .config import test_tmp_dir
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.




def _mkdir(path):
    try:
        os.mkdir(path)
    except OSError:
        if not os.path.exists(path):

# Path: test/framework/abstract_api.py
# class AbstractApiJob(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def invoke(self, securitytoken, build_params, cause, description):
#         raise Exception("AbstractNotImplemented")
# 
#     # The following should be declare abstract, but since they are 'implemented' by proxy we can't do that (conveniently)
#     # def is_running(self):
#     # def is_queued(self):
#     # def get_last_build_or_none(self):
#     # def get_build_triggerurl(self):
#     # def update_config(self, config_xml):
#     # def poll(self):
# 
# class AbstractApiJenkins(metaclass=abc.ABCMeta):
#     @abc.abstractmethod
#     def create_job(self, job_name, config_xml):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def delete_job(self, job_name):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def get_job(self, name):
#         raise Exception("AbstractNotImplemented")
# 
#     @abc.abstractmethod
#     def poll(self):
#         raise Exception("AbstractNotImplemented")
# 
# Path: test/framework/config.py



# Path: test/framework/base_test_api.py
import abc
import os
from collections import OrderedDict
from os.path import join as jp
from jenkinsflow.api_base import UnknownJobException, BuildResult, Progress
from .abstract_api import AbstractApiJob, AbstractApiJenkins
from .config import test_tmp_dir

# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.




def _mkdir(path):
    try:
        os.mkdir(path)
    except OSError:
        if not os.path.exists(path):

            raise