• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2 // -*- Mode: C++ -*-
3 //
4 // Copyright (C) 2013-2020 Red Hat, Inc.
5 
6 #ifndef __TEST_UTILS_H__
7 #define __TEST_UTILS_H__
8 
9 #include "config.h"
10 #include <string>
11 
12 #define BRIGHT_YELLOW_COLOR "\e[1;33m"
13 #define BRIGHT_RED_COLOR "\e[1;31m"
14 #define DEFAULT_TERMINAL_COLOR "\033[0m"
15 
16 #define TEST_FAILURE_COLOR BRIGHT_RED_COLOR
17 #define TEST_SUCCESS_COLOR BRIGHT_YELLOW_COLOR
18 
19 namespace abigail
20 {
21 namespace tests
22 {
23 
24 const char* get_src_dir();
25 const char* get_build_dir();
26 void
27 emit_test_status_and_update_counters(bool test_passed,
28 				     const std::string& test_cmd,
29 				     unsigned& passed_count,
30 				     unsigned& failed_count,
31 				     unsigned& total_count);
32 void
33 emit_test_summary(unsigned total_count,
34 		  unsigned passed_count,
35 		  unsigned failed_count);
36 }//end namespace tests
37 }//end namespace abigail
38 #endif //__TEST_UTILS_H__
39