]> git.lyx.org Git - lyx.git/commitdiff
LyXHTML validation tests: explicitly exit the Python script if it fails
authorThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 7 Jan 2023 20:27:50 +0000 (21:27 +0100)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Sat, 7 Jan 2023 20:27:50 +0000 (21:27 +0100)
development/thorough_export_tests/lyxhtml_validity.py

index 12c0cbd95837a97928eaa3a5bfe81a72014f91c7..3d50500a8e29acefd4b19f00b8b0d0b0c24a231c 100644 (file)
@@ -23,10 +23,13 @@ import html5validator
 
 if len(sys.argv) != 2:
     print('Expecting one argument, the path to the LyX binary to test')
+    sys.exit(-1)
 if not os.path.exists(sys.argv[1]):
     print('The given path does not point to an existing file')
+    sys.exit(-1)
 if not os.access(sys.argv[1], os.X_OK):
     print('The given path does not point to an executable file')
+    sys.exit(-1)
 
 
 PATH_SCRIPT = os.path.dirname(os.path.realpath(__file__))