Skip to content

Commit

Permalink
[sandbox] Rename SSU_TEST_SANDBOX env variable
Browse files Browse the repository at this point in the history
Use the name SSU_SANDBOX_PATH as introduced by 34f3c3c.
  • Loading branch information
martyone committed May 24, 2013
1 parent 1831e39 commit 4be8a49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions libssu/sandbox.cpp
Expand Up @@ -37,7 +37,7 @@
* deactivated upon destruction.
*
* When constructed without arguments, path to sandbox directory is get from
* @c SSU_TESTS_SANDBOX environment variable.
* @c SSU_SANDBOX_DIR environment variable.
*
* @attention When constructed without arguments, it is activated automatically
* and failure to do so is reported with @c qFatal(), i.e., application will be
Expand All @@ -48,15 +48,15 @@
* stay untouched. Also see addWorldFiles().
*
* The argument @scopes allows to control if the sandbox will be used by this
* process, its children processes (@c SSU_TESTS_SANDBOX environment variable
* process, its children processes (@c SSU_SANDBOX_DIR environment variable
* will be exported), or both.
*/

Sandbox *Sandbox::s_activeInstance = 0;

Sandbox::Sandbox()
: m_defaultConstructed(true), m_usage(UseDirectly), m_scopes(ThisProcess),
m_sandboxPath(QProcessEnvironment::systemEnvironment().value("SSU_TESTS_SANDBOX")),
m_sandboxPath(QProcessEnvironment::systemEnvironment().value("SSU_SANDBOX_DIR")),
m_prepared(false){
if (!activate()){
qFatal("%s: Failed to activate", Q_FUNC_INFO);
Expand Down Expand Up @@ -93,7 +93,7 @@ bool Sandbox::activate(){
}

if (m_scopes & ChildProcesses){
setenv("SSU_TESTS_SANDBOX", qPrintable(m_workingSandboxDir.path()), 1);
setenv("SSU_SANDBOX_DIR", qPrintable(m_workingSandboxDir.path()), 1);
}

s_activeInstance = this;
Expand All @@ -104,7 +104,7 @@ void Sandbox::deactivate(){
Q_ASSERT(isActive());

if (m_scopes & ChildProcesses){
unsetenv("SSU_TESTS_SANDBOX");
unsetenv("SSU_SANDBOX_DIR");
}

s_activeInstance = 0;
Expand Down
2 changes: 1 addition & 1 deletion tests/ut_ssuurlresolver/ssuurlresolvertest.cpp
Expand Up @@ -21,7 +21,7 @@

void SsuUrlResolverTest::initTestCase(){
setenv("LD_PRELOAD", qPrintable(QString("%1/libsandboxhook.so").arg(TESTS_PATH)), 1);
setenv("SSU_TESTS_SANDBOX", qPrintable(QString("%1/configroot").arg(TESTS_DATA_PATH)), 1);
setenv("SSU_SANDBOX_DIR", qPrintable(QString("%1/configroot").arg(TESTS_DATA_PATH)), 1);
}

void SsuUrlResolverTest::test_data(){
Expand Down

0 comments on commit 4be8a49

Please sign in to comment.