From 36be1cafe9844568c76537a91f6c813a0550e7d6 Mon Sep 17 00:00:00 2001
From: Axel Naumann <Axel.Naumann@cern.ch>
Date: Mon, 15 Mar 2021 14:27:55 +0100
Subject: [PATCH] [cling] Bring `vanilla-cling` lit feature back:

it is needed for test/Autoloading/AutoForwarding.C.
---
 interpreter/cling/test/lit.cfg | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/interpreter/cling/test/lit.cfg b/interpreter/cling/test/lit.cfg
index 98387571d71..8eb82df4aa6 100644
--- a/interpreter/cling/test/lit.cfg
+++ b/interpreter/cling/test/lit.cfg
@@ -123,6 +123,11 @@ if platform.system() not in ['Windows'] or lit_config.getBashPath() != '':
 if platform.system() not in ['Windows']:
     config.available_features.add('not_system-windows')
 
+# ROOT adds features that "heal" some of cling's tests; need to detect
+# vanilla vs cling-as-part-of-ROOT. The latter has no `lib/UserInterface/textinput/`:
+if os.path.isdir(os.path.join(config.cling_src_root, 'lib', 'UserInterface', 'textinput')):
+  config.available_features.add('vanilla-cling')
+
 libcudart_path = lit.util.which('libcudart.so', config.environment.get('LD_LIBRARY_PATH',''))
 if libcudart_path is not None:
   config.available_features.add('cuda-runtime')
-- 
GitLab