File: test-utils.h

package info (click to toggle)
libabigail 2.6-2
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 1,019,172 kB
  • sloc: xml: 572,532; cpp: 108,400; sh: 12,117; ansic: 4,199; makefile: 3,355; python: 1,672; ada: 62
file content (38 lines) | stat: -rw-r--r-- 890 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// -*- Mode: C++ -*-
//
// Copyright (C) 2013-2024 Red Hat, Inc.

#ifndef __TEST_UTILS_H__
#define __TEST_UTILS_H__

#include "config.h"
#include <string>

#define BRIGHT_YELLOW_COLOR "\e[1;33m"
#define BRIGHT_RED_COLOR "\e[1;31m"
#define DEFAULT_TERMINAL_COLOR "\033[0m"

#define TEST_FAILURE_COLOR BRIGHT_RED_COLOR
#define TEST_SUCCESS_COLOR BRIGHT_YELLOW_COLOR

namespace abigail
{
namespace tests
{

const char* get_src_dir();
const char* get_build_dir();
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);
}//end namespace tests
}//end namespace abigail
#endif //__TEST_UTILS_H__