summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/dc/files/run-ptest
diff options
context:
space:
mode:
authorEver ATILANO <ever.atilano@smile.fr>2023-03-24 15:44:55 +0100
committerKhem Raj <raj.khem@gmail.com>2023-04-05 15:57:09 -0700
commit1dc02603095d4d0d0e6c856b1123526b01801b35 (patch)
tree1124ea07146cef2ae6032e0902bc29ecd78fdf96 /meta-oe/recipes-support/dc/files/run-ptest
parent74dcb3aa174a60a2343803d6b038a2a10113c926 (diff)
downloadmeta-openembedded-1dc02603095d4d0d0e6c856b1123526b01801b35.tar.gz
meta-oe: recipes-support: dc: Add ptest
Signed-off-by: Ever ATILANO <ever.atilano@smile.fr> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/dc/files/run-ptest')
-rw-r--r--meta-oe/recipes-support/dc/files/run-ptest23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/dc/files/run-ptest b/meta-oe/recipes-support/dc/files/run-ptest
new file mode 100644
index 0000000000..9240a3f851
--- /dev/null
+++ b/meta-oe/recipes-support/dc/files/run-ptest
@@ -0,0 +1,23 @@
1#!/bin/sh
2
3# This script runs tests taken from the github CI for the Double-Conversion library.
4# For more information, please see: https://github.com/google/double-conversion/blob/master/.github/workflows/ci.yml#L60
5
6# Count the number of failed tests
7NUM_FAILS=0
8
9# Run all tests using ctest
10ctest -V
11
12# VCount the number of failed tests by checking the LastTest.log file generated by ctest
13NUM_FAILS=$(grep -c "Failed" Testing/Temporary/LastTest.log)
14
15# Run the tests directly as well, just in case we forgot to add it to ctest
16test/cctest/cctest
17if [ $? -ne 0 ]; then
18 # If the test failed, increment the number of failed tests
19 NUM_FAILS=$(expr $NUM_FAILS + 1)
20fi
21
22# Return the number of failed tests
23exit $NUM_FAILS