[tracker/sam/functional-tests-quiet: 15/15] utils/sandbox: Set TRACKER_SANDBOX in environment



commit a2cee1e8e6dddcbb60229639114af50439916def
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Aug 31 04:32:28 2019 +0300

    utils/sandbox: Set TRACKER_SANDBOX in environment
    
    Potentially destructive testcases can now require that this is set
    in the environment, to prevent users accidentally destroying their
    real tracker-store.

 utils/sandbox/tracker-sandbox.py | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/utils/sandbox/tracker-sandbox.py b/utils/sandbox/tracker-sandbox.py
index 1e07fe968..db24679f3 100755
--- a/utils/sandbox/tracker-sandbox.py
+++ b/utils/sandbox/tracker-sandbox.py
@@ -158,6 +158,9 @@ def environment_set(index_location, prefix, verbosity=0, dbus_config=None):
     # Important, other subprocesses must use our new bus
     os.environ['DBUS_SESSION_BUS_ADDRESS'] = dbus.get_address()
 
+    # So tests can detect if they are run under sandbox or not.
+    os.environ['TRACKER_SANDBOX'] = '1'
+
     return dbus
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]