def copy_var_log_dragen_files()

in app/source/dragen/src/dragen_qs.py [0:0]


    def copy_var_log_dragen_files(self):
        files = list(filter(os.path.isfile, glob.glob("/var/log/dragen/dragen_run*")))
        if files:
            newest_run_file = sorted(files, key=lambda x: os.path.getmtime(x), reverse=True)[0]
            shutil.copy2(newest_run_file, self.output_dir)

        files = list(filter(os.path.isfile, glob.glob("/var/log/dragen/hang_diag*")))
        if files:
            newest_hang_file = sorted(files, key=lambda x: os.path.getmtime(x), reverse=True)[0]
            shutil.copy2(newest_hang_file, self.output_dir)

        files = list(filter(os.path.isfile, glob.glob("/var/log/dragen/pstack*")))
        if files:
            newest_pstack_file = sorted(files, key=lambda x: os.path.getmtime(x), reverse=True)[0]
            shutil.copy2(newest_pstack_file, self.output_dir)

        files = list(filter(os.path.isfile, glob.glob("/var/log/dragen/dragen_info*")))
        if files:
            newest_info_file = sorted(files, key=lambda x: os.path.getmtime(x), reverse=True)[0]
            shutil.copy2(newest_info_file, self.output_dir)

        files = list(filter(os.path.isfile, glob.glob("/var/log/dragen/dragen_replay*")))
        if files:
            newest_replay_file = sorted(files, key=lambda x: os.path.getmtime(x), reverse=True)[0]
            shutil.copy2(newest_replay_file, self.output_dir)

        return