Keck-DataReductionPipelines / OsirisDRP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BackboneError: The backbone doesn't appear to have finished DRF tests/test_emission_line/001.emission_obj.waiting

JoshuaJoseph23 opened this issue · comments

This error occurs for me in the testing phase of the installation, after issuing the command 'make test'. Specifically, it is when py.test is run. The test_emission_line.py test fails, and the error seen in the title occurs at tests/drptestbones/backbone.py:84: BackboneError. The code leading up to the error is below:

`
def consume_queue_directory(queue_directory, test_directory=None):
"""Run the DRP until it has consumed a single queue directory.

    The DRP is run by IDL in a subprocess using the python subprocess module.

    :param str queue_directory: The path to the queue directory with DRFs which should be consumed.
    :param str test_directory: Optionally, set the root directory for test code. By default, it will be set from the relevant OSIRIS environment variable, ``OSIRIS_ROOT``.

    """
    test_directory = test_directory or os.path.join(
        os.environ["OSIRIS_ROOT"], "tests")

    if not queue_directory.endswith(os.path.sep):
        queue_directory += "/"
    if not os.path.isdir(queue_directory):
        raise IOError("The queue directory '{0}' does not exist".format(queue_directory))

    # Check for queue files which need to pass.
    waiting_drfs = glob.glob(os.path.join(queue_directory, "*.waiting"))

    # Set up the subprocess to consume the queue directory.
    idl_startup_file = os.path.join(test_directory, "drpStartup.pro")
    args = ["idl", "-IDL_STARTUP", idl_startup_file, "-e", "drpTestSingle, '{0}'".format(queue_directory)]

    kwargs = {}
    kwargs['stdin'] = None
    kwargs['stdout'] = subprocess.PIPE
    kwargs['stderr'] = subprocess.STDOUT
    kwargs['bufsize'] = 0
    # Run a subprocess IDL
    proc = subprocess.Popen(args, **kwargs)

    for line in iter(proc.stdout.readline,''):
       sys.stdout.write(line)
    sys.stdout.flush()
    proc.wait()

    for drf in waiting_drfs:
        drf = os.path.relpath(os.path.abspath(drf), os.path.realpath(os.environ["OSIRIS_ROOT"]))
        done_drf = os.path.splitext(drf)[0] + ".done"
        failed_drf = os.path.splitext(drf)[0] + ".failed"
        if os.path.exists(failed_drf):
            raise BackboneError("The backbone seems to have failed on DRF {0}".format(drf))
        if not os.path.exists(done_drf):
          raise BackboneError("The backbone doesn't appear to have finished DRF {0}".format(drf))

E BackboneError: The backbone doesn't appear to have finished DRF tests/test_emission_line/001.emission_obj.waiting
`

I would greatly appreciate it if anyone knew of the reason for the problem and a subsequent fix!

Is the pipeline able to run (run_odrp)?

Is there a .log file in the tests/test_emission_line directory? That would help to narrow down the problem.

Could you try checking out the 'release' branch and see if this problem remains?