Example #1
0
def main():
    init_logging()
    if get_bool_env_var('YB_SKIP_POSTGRES_BUILD'):
        logging.info(
            "Skipping PostgreSQL build (YB_SKIP_POSTGRES_BUILD is set)")
        return
    PostgresBuilder().run()
Example #2
0
                "PostgreSQL is already up-to-date in directory %s, not rebuilding.",
                self.pg_build_root)
            if self.export_compile_commands:
                self.should_build = False
                logging.info(
                    "Still need to create compile_commands.json, proceeding.")
            else:
                return
        with WorkDirContext(self.pg_build_root):
            if self.should_build:
                self.sync_postgres_source()
                if os.environ.get('YB_PG_SKIP_CONFIGURE', '0') != '1':
                    self.configure_postgres()
            self.make_postgres()

        final_build_stamp_no_env = self.get_build_stamp(include_env_vars=False)
        if final_build_stamp_no_env == initial_build_stamp_no_env:
            logging.info("Updating build stamp file at %s",
                         self.build_stamp_path)
            with open(self.build_stamp_path, 'w') as build_stamp_file:
                build_stamp_file.write(initial_build_stamp)
        else:
            logging.warning(
                "PostgreSQL build stamp changed during the build! Not updating."
            )


if __name__ == '__main__':
    init_logging()
    PostgresBuilder().run()
def main():
    init_logging()
    PvsStudioAnalyzerTool().run()
                    test_kvs["time"] = float(time_str)
                except ValueError as ex:
                    test_kvs["time"] = None
                    parsing_errors.append(
                        "Could not parse time: %s. Error: %s" %
                        (time_str, str(ex)))
            if parsing_errors:
                test_kvs["parsing_errors"] = parsing_errors
            rename_key(test_kvs, 'name', 'test_name')
            rename_key(test_kvs, 'classname', 'class_name')
            self.set_common_test_kvs(test_kvs)
            tests.append(test_kvs)

        output_path = os.path.splitext(
            self.args.junit_xml_path)[0] + '_test_report.json'
        if len(tests) == 1:
            tests = tests[0]
        with open(output_path, 'w') as output_file:
            output_file.write(json.dumps(tests, indent=2))
        logging.info("Wrote JSON test report file: %s", output_path)


def main():
    postprocessor = Postprocessor()
    postprocessor.run()


if __name__ == '__main__':
    yugabyte_pycommon.init_logging()
    main()
Example #5
0
                    logging.info("Running make in the %s directory", work_dir)
                make_result = run_program(make_cmd)
                write_program_output_to_file('make', make_result, work_dir)
                make_install_result = run_program(['make', 'install'])
                write_program_output_to_file('make_install', make_install_result, work_dir)
                logging.info("Successfully ran make in the %s directory", work_dir)

    def run(self):
        if get_bool_env_var('YB_SKIP_POSTGRES_BUILD'):
            logging.info("Skipping PostgreSQL build (YB_SKIP_POSTGRES_BUILD is set)")
            return

        self.parse_args()
        self.build_postgres()

    def build_postgres(self):
        if self.args.clean:
            self.clean_postgres()

        mkdir_p(self.pg_build_root)

        with WorkDirContext(self.pg_build_root):
            self.sync_postgres_source()
            self.configure_postgres()
            self.make_postgres()


if __name__ == '__main__':
    init_logging()
    PostgresBuilder().run()
def main() -> None:
    yugabyte_pycommon.init_logging()
    args = parse_args()
    aggregate_test_reports(args)
Example #7
0
 def test_mkdir_p(self):
     for log_level in [
             logging.INFO, logging.WARN, logging.DEBUG, logging.ERROR,
             logging.FATAL
     ]:
         init_logging(log_level=log_level)