Class FailureReader

    • Field Detail

      • indication

        protected Indication indication
        The indication we are looking for.
    • Constructor Detail

      • FailureReader

        public FailureReader​(Indication indication)
        Standard constructor.
        Parameters:
        indication - the indication to look for.
    • Method Detail

      • scan

        public FoundIndication scan​(Run build)
                             throws IOException
        Scans a build log.
        Parameters:
        build - - the build whose log should be scanned.
        Returns:
        a FoundIndication if the pattern given by this FailureReader is found in the log of the given build; return null otherwise.
        Throws:
        IOException - if so.
      • scan

        public FoundIndication scan​(Run build,
                                    PrintStream buildLog)
        Scans for indications of a failure cause.
        Parameters:
        build - the build to scan for indications.
        buildLog - the log of the build.
        Returns:
        a FoundIndication if something was found, null if not.
      • scanSingleLinePatterns

        public static List<FoundFailureCause> scanSingleLinePatterns​(List<FailureCause> causes,
                                                                     Run build,
                                                                     BufferedReader reader,
                                                                     String currentFile)
                                                              throws IOException
        Checks all patterns one-by-one for entire file.
        Parameters:
        causes - list of failure causes that we a looking for.
        build - current build.
        reader - file reader.
        currentFile - file name.
        Returns:
        found indications.
        Throws:
        IOException - Exception.
      • scanMultiLineOneFile

        protected FoundIndication scanMultiLineOneFile​(Run build,
                                                       LineNumberReader reader,
                                                       String currentFile)
                                                throws IOException
        Scans one file for the required multi-line pattern.
        Parameters:
        build - the build we are processing.
        reader - the reader to read from.
        currentFile - the file path of the file we want to scan.
        Returns:
        a FoundIndication if we find the pattern, null if not.
        Throws:
        IOException - if problems occur in the reader handling.