File: tests

package info (click to toggle)
libeatmydata 105-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,064 kB
  • sloc: sh: 12,301; ansic: 745; makefile: 113
file content (23 lines) | stat: -rw-r--r-- 683 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: avoid failing tests when strace is absent. instead, just skip the
 entire test suite.
 Note: this is probably not the better way to handle this case. Maybe a check
 in debian/rules would be better...
Author: Mattia Rizzolo <mattia@mapreri.org>
Last-Update: 2014-11-15

--- a/test_run.sh
+++ b/test_run.sh
@@ -11,6 +11,13 @@
 # COPYING file in the root project directory for full text.
 #
 
+CHECKOUT=$(which strace)
+CHECKRET="$?"
+if [ ! "$CHECKRET" -eq 0 ];then
+    echo "Could not find strace. Not running tests, but marking them as pass."
+    exit 0
+fi
+
 # Get filename we want to run without path
 name=`echo $1 | sed 's/.*\/\(libeatmydata\/.*[^\/]*\)$/\1/'`