Skip to content
Snippets Groups Projects
Commit 66dabfa9 authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- allow both \r\n and \n to separate environment vars

parent df7e2313
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ $config['environmentVars'] = $row['environmentVars'];
//parse environmentVars
if (isset($config['environmentVars'])) {
$keyValuePairs = explode("\r\n", $config['environmentVars']);
$keyValuePairs = preg_split("/\r\n|\n/", $config['environmentVars']);
$config['environmentVarsParsed'] = $keyValuePairs;
} else {
$config['environmentVarsParsed'] = NULL;
......
......@@ -384,7 +384,7 @@ A json object with the following properties (order does not matter)
* **dbConfigPw** : (string) -''- but for the config table
* **dbConfigTableName**: (string) the table name with the configuration (the *dbServer* and *dbName* options are used)
* **environmentVars** : (string, \r\n separate (phpmyadmin will auto use \r\n if you press enter)d, key value pairs are separated by = OR NULL) the environment variables for the test runner. All environment vars are cleared and only these are set (even if this is the empty string). The special delimiters `\n` and `=` must not be used inside keys or values.
* **environmentVars** : (string, \r\n or \n separated, key value pairs are separated by = OR NULL) the environment variables for the test runner. All environment vars are cleared and only these are set (even if this is the empty string). The special delimiters `\n` and `=` must not be used inside keys or values.
The test runner is called and these environment variables are set.
You can use `"path""` to escape paths or other strings
It is recommended that you at least specify the following: `USER, HOME ,PATH`
......@@ -415,7 +415,7 @@ If the config table has more than 1 row, the first row is taken!
"maxNumberOfTestsWithOneRequest": 20,
"runner": "\"C:\\Program Files (x86)\\JetBrains\\IntelliJ IDEA 14.1.4\\jdk1.8.0_65\\bin\\java\" -cp \"C:\\Users\\theju\\Documents\\WebProjects\\SyndromeAll\\DefaultTestRunner\\out\\production\\DefaultTestRunner\" Main",
"environmentVars": "USER=yapextester\r\nHOME=/home/yapextester\r\nPWD=\r\nLANG=de_DE.UTF-8\r\nPATH=/usr/local/bin:/usr/bin:/bin:/"
"environmentVars": "USER=yapextester\nHOME=/home/yapextester\nLANG=de_DE.UTF-8\nPATH=/usr/local/bin:/usr/bin:/bin:/"
}
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment