2020-05-29 14:26:04 +00:00
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2013-07-16 19:58:43 +00:00
|
|
|
// -*- Mode: C++ -*-
|
|
|
|
//
|
2024-04-26 13:29:50 +00:00
|
|
|
// Copyright (C) 2013-2024 Red Hat, Inc.
|
2013-03-21 22:42:41 +00:00
|
|
|
|
|
|
|
#ifndef __TEST_UTILS_H__
|
|
|
|
#define __TEST_UTILS_H__
|
|
|
|
|
2019-01-24 10:06:57 +00:00
|
|
|
#include "config.h"
|
2013-03-21 22:42:41 +00:00
|
|
|
#include <string>
|
|
|
|
|
2021-11-09 12:27:59 +00:00
|
|
|
#define BRIGHT_YELLOW_COLOR "\e[1;33m"
|
|
|
|
#define BRIGHT_RED_COLOR "\e[1;31m"
|
|
|
|
#define DEFAULT_TERMINAL_COLOR "\033[0m"
|
|
|
|
|
2021-11-17 10:58:31 +00:00
|
|
|
#define TEST_FAILURE_COLOR BRIGHT_RED_COLOR
|
|
|
|
#define TEST_SUCCESS_COLOR BRIGHT_YELLOW_COLOR
|
|
|
|
|
2013-03-21 22:42:41 +00:00
|
|
|
namespace abigail
|
|
|
|
{
|
|
|
|
namespace tests
|
|
|
|
{
|
|
|
|
|
2016-01-15 12:34:16 +00:00
|
|
|
const char* get_src_dir();
|
|
|
|
const char* get_build_dir();
|
2021-11-17 11:00:52 +00:00
|
|
|
void
|
|
|
|
emit_test_status_and_update_counters(bool test_passed,
|
|
|
|
const std::string& test_cmd,
|
|
|
|
unsigned& passed_count,
|
|
|
|
unsigned& failed_count,
|
|
|
|
unsigned& total_count);
|
|
|
|
void
|
|
|
|
emit_test_summary(unsigned total_count,
|
|
|
|
unsigned passed_count,
|
|
|
|
unsigned failed_count);
|
2013-03-21 22:42:41 +00:00
|
|
|
}//end namespace tests
|
|
|
|
}//end namespace abigail
|
|
|
|
#endif //__TEST_UTILS_H__
|