]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix tests under MSYS2 (Windows)
authorWolfgang Stöggl <c72578@yahoo.de>
Fri, 25 Mar 2022 18:09:59 +0000 (19:09 +0100)
committerWolfgang Stöggl <c72578@yahoo.de>
Mon, 28 Mar 2022 09:00:45 +0000 (11:00 +0200)
This is a follow-up to commit 7cd748e considering running the tests
in Windows under MSYS2. A similar approach has already been used in
tests\graph2 and tests\xport1 (see also: 847d679)

- Updates the following tests:
  graph1, rpn1, rpn2, vformatter1
- Avoid Windows drive letter in the path of DEF:vname=rrdfile
  under MSYS or MSYS2. Use only the filename of the rrd and not
  the full path if environmental variable MSYSTEM is set.

tests/graph1
tests/rpn1
tests/rpn2
tests/vformatter1

index 6c903018bf34771aabd0e7e223c7c7350e73d9fc..33c1fe71ef6bccd492117a855a5c7aea627c9a4e 100755 (executable)
@@ -5,7 +5,12 @@
 BASE=$BASEDIR/
 BUILD=$BUILDDIR/
 
-RRD=${BUILD}graph1.rrd
+if [ -n "$MSYSTEM" ]; then
+    # Avoid Windows drive letter issues in the path of DEF:vname=rrdfile under MSYS or MSYS2
+    RRD=graph1.rrd
+else
+    RRD=${BUILD}graph1.rrd
+fi
 
 $RRDTOOL create $RRD --start 920804400 DS:speed:COUNTER:600:U:U RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10
 report "create"
index 08c7482a43776a07232b14c8fff5674467631381..5c785eef4de55bbf209579363dfded12dd572176 100755 (executable)
@@ -5,7 +5,12 @@
 BASE=$BASEDIR/
 BUILD=$BUILDDIR/
 
-RRD=${BUILD}rpn1.rrd
+if [ -n "$MSYSTEM" ]; then
+    # Avoid Windows drive letter issues in the path of DEF:vname=rrdfile under MSYS or MSYS2
+    RRD=rpn1.rrd
+else
+    RRD=${BUILD}rpn1.rrd
+fi
 
 $RRDTOOL create $RRD --start 920804400 DS:speed:COUNTER:600:U:U RRA:AVERAGE:0.5:1:24 RRA:AVERAGE:0.5:6:10
 report "create"
index b64491d206049f767116dddfcaa35579eb4fee49..73d67b9fbffc1b3e1ee6225d9702552f2f174578 100755 (executable)
@@ -5,7 +5,12 @@
 BASE=$BASEDIR/
 BUILD=$BUILDDIR/
 
-RRD=${BUILD}rpn2.rrd
+if [ -n "$MSYSTEM" ]; then
+    # Avoid Windows drive letter issues in the path of DEF:vname=rrdfile under MSYS or MSYS2
+    RRD=rpn2.rrd
+else
+    RRD=${BUILD}rpn2.rrd
+fi
 
 $RRDTOOL create $RRD --step 7200 --start 1167487000 DS:speed:DCOUNTER:14000:U:U RRA:AVERAGE:0.5:1:30
 report "create"
index 6f01e62134ce3b013b849011a6eb0df236c9061b..6669baf1ecc32e06ffee27a4b8fae46b550f9f45 100755 (executable)
@@ -5,7 +5,12 @@
 BASE=$BASEDIR/
 BUILD=$BUILDDIR/
 
-RRD=${BUILD}vfmt1.rrd
+if [ -n "$MSYSTEM" ]; then
+    # Avoid Windows drive letter issues in the path of DEF:vname=rrdfile under MSYS or MSYS2
+    RRD=vfmt1.rrd
+else
+    RRD=${BUILD}vfmt1.rrd
+fi
 
 export TZ=UTC