-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
36 lines (31 loc) · 1001 Bytes
/
run_tests.sh
File metadata and controls
36 lines (31 loc) · 1001 Bytes
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
#! /bin/bash
# **********************************************************
# 2024 : Arthur JEULIN
# Copyright (c) Arthur JEULIN
# Created by Arthur JEULIN on 06/22/2024.
# **********************************************************
#
# Module : Run the unit tests
#
# to run this script on windows
# open wsl terminal and go to cd /mnt/c/dev/rtmaps/inventory
# ./run_test.sh
# Chemin vers le dossier de tests
TEST_DIR="./build/bin/test/Debug"
# Dossier pour stocker les rapports de test
REPORT_DIR="./test_reports"
mkdir -p $REPORT_DIR
# Vérifiez si le dossier existe
if [ -d "$TEST_DIR" ]; then
# Naviguer au dossier de tests
cd "$TEST_DIR"
# Exécuter tous les fichiers exécutables de tests et générer des rapports XML
for test_exec in ./*.exe; do
if [ -x "$test_exec" ]; then
# echo "Exécution de $test_exec"
./"$test_exec" --gtest_output="xml:$REPORT_DIR/$(basename "$test_exec").xml"
fi
done
else
echo "Dossier $TEST_DIR non trouvé."
fi