Commit 1cef170 1 parent 11104d4 commit 1cef170 Copy full SHA for 1cef170
File tree 2 files changed +50
-0
lines changed
2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 6
6
"runtime"
7
7
8
8
cmds "github.com/ipfs/go-ipfs/commands"
9
+ config "github.com/ipfs/go-ipfs/repo/config"
9
10
10
11
manet "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net"
11
12
psud "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/shirou/gopsutil/disk"
@@ -51,6 +52,8 @@ Prints out information about your computer to aid in easier debugging.
51
52
return
52
53
}
53
54
55
+ info ["ipfs_version" ] = config .CurrentVersionNumber
56
+ info ["ipfs_git_sha" ] = config .CurrentCommit
54
57
res .SetOutput (info )
55
58
},
56
59
}
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2015 Jeromy Johnson
4
+ # MIT Licensed; see the LICENSE file in this repository.
5
+ #
6
+
7
+ test_description=" test output of sysdiag command"
8
+
9
+ . lib/test-lib.sh
10
+
11
+ test_init_ipfs
12
+
13
+ test_expect_success " ipfs diag sys succeeds" '
14
+ ipfs diag sys > output
15
+ '
16
+
17
+ test_expect_success " output contains some expected keys" '
18
+ grep "virt" output &&
19
+ grep "interface_addresses" output &&
20
+ grep "arch" output
21
+ '
22
+
23
+ test_expect_success " uname succeeds" '
24
+ UOUT=$(uname)
25
+ '
26
+
27
+ test_expect_success " output is similar to uname" '
28
+ case $UOUT in
29
+ Linux)
30
+ grep linux output > /dev/null
31
+ ;;
32
+ Darwin)
33
+ grep darwin output > /dev/null
34
+ ;;
35
+ FreeBSD)
36
+ grep freebsd output > /dev/null
37
+ ;;
38
+ CYGWIN*)
39
+ grep windows output > /dev/null
40
+ ;;
41
+ *)
42
+ test_fsh echo system check for $UOUT failed, unsupported system?
43
+ ;;
44
+ esac
45
+ '
46
+
47
+ test_done
You can’t perform that action at this time.
0 commit comments