aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/README
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-20 21:08:55 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-20 21:08:55 +0100
commit84490e821deee16fe8155df2b9328c23d953c4fb (patch)
treefd5375aecd92a64c156191fc3293a414184af06e /testsuite/gna/README
parentc3ed5c426b8be1144574b9e33135450cf6ceab1a (diff)
downloadghdl-84490e821deee16fe8155df2b9328c23d953c4fb.tar.gz
ghdl-84490e821deee16fe8155df2b9328c23d953c4fb.tar.bz2
ghdl-84490e821deee16fe8155df2b9328c23d953c4fb.zip
testsuite/gna: adjust for windows.
Diffstat (limited to 'testsuite/gna/README')
-rw-r--r--testsuite/gna/README25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/gna/README b/testsuite/gna/README
new file mode 100644
index 000000000..f2489f91a
--- /dev/null
+++ b/testsuite/gna/README
@@ -0,0 +1,25 @@
+Tests
+-----
+
+This directory contains a regression testsuite. See the driver testsuite.sh
+for naming convention.
+
+The tests are run by a unix shell like bash (not a c-shell). This is fine
+under Linux and MacOS-X, but creates issues on Windows.
+
+Here are some tips for portability.
+
+- Do not create complex driver, keep them simple.
+- pipes (commands list separated by |) do not work well on windows if one
+ process exits early. On unix, writers are killed by SIGPIPE but on windows
+ they aren't (SIGPIPE doesn't exist) and reports errors.
+ So avoid program that may exit before reading all the input:
+ * instead of 'grep -q xxx', use 'grep xxx > /dev/null'
+- reference files use unix end of line. Use 'diff --strip-trailing-cr' to
+ compare expected output with a reference file.
+- don't forget that executable files have a .exe suffix on windows, but most
+ cygwin tools transparently add the suffix.
+- For VPI tests, the directory containing the dll file must be added in PATH.
+ See issue98 for an example.
+- As a last resort, you can test if you are on Windows:
+ if [ "$OS" = "Windows_NT" ]; then ...