From 43d8951eb73d235c4b8b905e6d6bcf30e1dd842f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sat, 18 Jan 2025 10:53:55 -0500
Subject: [PATCH] Add support for a skipif file in each directory.

If this file contains valid JS code that returns a true value, the
directory is skipped.
---
 exec/tests/test.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/exec/tests/test.js b/exec/tests/test.js
index 6b8f493119..36983289cd 100755
--- a/exec/tests/test.js
+++ b/exec/tests/test.js
@@ -16,13 +16,22 @@ function depth_first(root, parent)
 {
 	var entries;
 
+	if (file_exists(root+'skipif')) {
+		try {
+			if (load(root+'skipif')) {
+				stdout.writeln("Skipping "+root);
+				return;
+			}
+		}
+		catch(e) {}
+	}
 	parent[root] = {tests:[]};
 	entries = directory(root+'*');
 
 	entries.forEach(function(entry) {
 		var last_ch;
 
-		if (entry === './' || entry === '../')
+		if (entry === './' || entry === '../' || entry === 'skipif')
 			return;
 		if (entry.length < 1)
 			return;
-- 
GitLab