From 33a961f6636a8198dd528e8399628917db400542 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Sat, 23 Nov 2024 16:38:22 +0000 Subject: [PATCH] Run tests from top directory. --- .github/scripts/test.sh | 3 +-- HACKING.md | 9 ++++++--- tests/graphs/user_shapes.gv | 4 ++-- tests/svg_user_shape.dot | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/scripts/test.sh b/.github/scripts/test.sh index 92d05f1..e55ffe9 100755 --- a/.github/scripts/test.sh +++ b/.github/scripts/test.sh @@ -1,4 +1,3 @@ #!/bin/sh set -ex -cd tests -LANG=C exec xvfb-run -a -s '-screen 0 1024x768x24' /usr/bin/python3 ../test.py *.dot graphs/*.gv +LANG=C exec xvfb-run -a -s '-screen 0 1024x768x24' /usr/bin/python3 test.py tests/*.dot tests/graphs/*.gv diff --git a/HACKING.md b/HACKING.md index 98deece..18dc165 100644 --- a/HACKING.md +++ b/HACKING.md @@ -1,5 +1,8 @@ # Testing - cd tests - ../test.py *.dot - ../test.py graphs/*.gv + ./test.py tests/*.dot + ./test.py tests/graphs/*.gv + +or simply + + .github/scripts/test.sh diff --git a/tests/graphs/user_shapes.gv b/tests/graphs/user_shapes.gv index 549bf79..6be1a19 100644 --- a/tests/graphs/user_shapes.gv +++ b/tests/graphs/user_shapes.gv @@ -1,5 +1,5 @@ digraph G { - n [label="", shapefile="graphs/jcr.gif"] - x [width=3, height=3, label="", shapefile="graphs/jcr.gif"] + n [label="", shapefile="tests/graphs/jcr.gif"] + x [width=3, height=3, label="", shapefile="tests/graphs/jcr.gif"] m -> n -> x } diff --git a/tests/svg_user_shape.dot b/tests/svg_user_shape.dot index 38cdae5..39bb191 100644 --- a/tests/svg_user_shape.dot +++ b/tests/svg_user_shape.dot @@ -1,5 +1,5 @@ digraph G { - n [label="", shapefile="sample.svg"] - x [width=3, height=3, label="", shapefile="sample.svg"] + n [label="", shapefile="tests/sample.svg"] + x [width=3, height=3, label="", shapefile="tests/sample.svg"] m -> n -> x }