forked from open-mpi/mtt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Environ plugin which enables setting environment variables.
Modified configparse optionxform str to make option names case sensitive. Bug fix for ModuleCmd to use io.StringIO.seek() instead of StringIO.StringIO.len(). Signed-off-by: Noah van Dresser <[email protected]>
- Loading branch information
Showing
4 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved. | ||
# $COPYRIGHT$ | ||
# | ||
# Additional copyrights may follow | ||
# | ||
# $HEADER$ | ||
# | ||
|
||
import shutil | ||
import os | ||
from BaseMTTUtility import * | ||
|
||
class Environ(BaseMTTUtility): | ||
def __init__(self): | ||
BaseMTTUtility.__init__(self) | ||
self.options = {} | ||
|
||
def print_name(self): | ||
return "Environ" | ||
|
||
def print_options(self, testDef, prefix): | ||
lines = testDef.printOptions(self.options) | ||
for line in lines: | ||
print prefix + line | ||
return | ||
|
||
def execute(self, log, keyvals, testDef): | ||
testDef.logger.verbose_print("Environ Execute") | ||
|
||
# Set any provided key values | ||
kvkeys = keyvals.keys() | ||
for kvkey in kvkeys: | ||
os.environ[kvkey] = keyvals[kvkey] | ||
log['status'] = 0 | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# | ||
# Copyright (c) 2015-2016 Intel, Inc. All rights reserved. | ||
# $COPYRIGHT$ | ||
# | ||
# Additional copyrights may follow | ||
# | ||
# $HEADER$ | ||
# | ||
|
||
[Core] | ||
Name = Environ | ||
Module = Environ | ||
|
||
[Documentation] | ||
Author = Noah van Dresser | ||
Version = 0.1 | ||
Website = N/A | ||
Description = Set environment variables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters