aboutsummaryrefslogtreecommitdiff
path: root/tests/validate-html/run-validator.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-09-11 00:30:49 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-09-11 19:58:54 +0200
commit644ef0aa848c2cef6621e0ae6be8b14322b015d0 (patch)
treecd7bbb442f735378e095ca3aba04756dd119c66f /tests/validate-html/run-validator.scm
parentAdd documentation for translation procedures. (diff)
downloadcalp-644ef0aa848c2cef6621e0ae6be8b14322b015d0.tar.gz
calp-644ef0aa848c2cef6621e0ae6be8b14322b015d0.tar.xz
Change how entry point is handled.
Replaces the old main sh bootstrap entry point to one written in C. The reasons are in the C file, but in short, Guile's command line is less than ideal.
Diffstat (limited to 'tests/validate-html/run-validator.scm')
-rwxr-xr-xtests/validate-html/run-validator.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/validate-html/run-validator.scm b/tests/validate-html/run-validator.scm
index 0c4ee0bc..b363e3ea 100755
--- a/tests/validate-html/run-validator.scm
+++ b/tests/validate-html/run-validator.scm
@@ -1,12 +1,16 @@
#!/usr/bin/bash
# -*- mode: scheme; geiser-scheme-implementation: guile -*-
-here=$(dirname $(realpath $0))
+root=$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")
-. "$(dirname "$(dirname "$here")")/env"
+eval "$(env __PRINT_ENVIRONMENT=1 ${root}/calp)"
exec $GUILE -e main -s "$0" -- "$@"
!#
+(unless (getenv "CALP_TEST_ENVIRONMENT")
+ (format (current-error-port) "Not running in test environment, abandoning~%")
+ (exit 1))
+
(use-modules (sxml simple)
((sxml xpath) :select (sxpath))
(sxml match)