Devin Lim | f517519 | 2018-05-14 19:13:22 -0700 | [diff] [blame^] | 1 | // Copyright 2017 Open Networking Foundation (ONF) |
| 2 | // |
| 3 | // Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>, |
| 4 | // the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>, |
| 5 | // or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg> |
| 6 | // |
| 7 | // TestON is free software: you can redistribute it and/or modify |
| 8 | // it under the terms of the GNU General Public License as published by |
| 9 | // the Free Software Foundation, either version 2 of the License, or |
| 10 | // (at your option) any later version. |
| 11 | // |
| 12 | // TestON is distributed in the hope that it will be useful, |
| 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | // GNU General Public License for more details. |
| 16 | // |
| 17 | // You should have received a copy of the GNU General Public License |
| 18 | // along with TestON. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | // This is the dependency Jenkins script. |
| 21 | // it has some general functionality of making database command, basic graph part, and get list of the test |
| 22 | |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 23 | #!groovy |
| 24 | |
Devin Lim | f517519 | 2018-05-14 19:13:22 -0700 | [diff] [blame^] | 25 | // make the init part of the database command |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 26 | def database_command_create( pass, host, port, user ){ |
| 27 | return pass + "|psql --host=" + host + " --port=" + port + " --username=" + user + " --password --dbname onostest -c " |
| 28 | } |
Devin Lim | f517519 | 2018-05-14 19:13:22 -0700 | [diff] [blame^] | 29 | |
| 30 | // make the basic graph part for the Rscript |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 31 | def basicGraphPart( rFileName, host, port, user, pass, subject, branchName ){ |
| 32 | return " Rscript " + rFileName + " " + host + " " + port + " " + user + " " + pass + " " + subject + " " + branchName |
| 33 | } |
Devin Lim | f517519 | 2018-05-14 19:13:22 -0700 | [diff] [blame^] | 34 | |
| 35 | // get the list of the test as dictionary then return as a string |
Devin Lim | 6164376 | 2017-12-07 15:55:38 -0800 | [diff] [blame] | 36 | def getTestList( tests ){ |
| 37 | list = "" |
| 38 | for( String test : tests.keySet() ) |
| 39 | list += test + "," |
| 40 | return list[ 0..-2 ] |
| 41 | } |
Devin Lim | fe9a4cb | 2018-05-11 17:06:21 -0700 | [diff] [blame] | 42 | return this; |