File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* Copyright 2017 Victor Penso, Matteo Dessalvi
2
+
3
+ This program is free software: you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation, either version 3 of the License, or
6
+ (at your option) any later version.
7
+
8
+ This program is distributed in the hope that it will be useful,
9
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ GNU General Public License for more details.
12
+
13
+ You should have received a copy of the GNU General Public License
14
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
15
+
16
+ package main
17
+
18
+ import (
19
+ "testing"
20
+ "os"
21
+ "io/ioutil"
22
+ )
23
+
24
+ func TestCoresMetrics (t * testing.T ) {
25
+ // Read the input data from a file
26
+ file , err := os .Open ("test_data/sinfo_cores.txt" )
27
+ if err != nil { t .Fatalf ("Can not open test data: %v" , err ) }
28
+ data , err := ioutil .ReadAll (file )
29
+ t .Logf ("%+v" , ParseCoresMetrics (data ))
30
+ }
31
+
32
+ func TestCoresGetMetrics (t * testing.T ) {
33
+ t .Logf ("%+v" , CoresGetMetrics ())
34
+ }
You can’t perform that action at this time.
0 commit comments